updated to new monogame and mlem versions partly
This commit is contained in:
parent
d184731134
commit
d4bd862b04
7 changed files with 454 additions and 5294 deletions
|
@ -2,7 +2,6 @@ using System;
|
||||||
using Android.App;
|
using Android.App;
|
||||||
using Android.Content;
|
using Android.Content;
|
||||||
using Android.Content.PM;
|
using Android.Content.PM;
|
||||||
using Android.Gms.Ads;
|
|
||||||
using Android.Gms.Common;
|
using Android.Gms.Common;
|
||||||
using Android.Gms.Games;
|
using Android.Gms.Games;
|
||||||
using Android.OS;
|
using Android.OS;
|
||||||
|
@ -10,6 +9,7 @@ using Android.Views;
|
||||||
using Android.Widget;
|
using Android.Widget;
|
||||||
using GameAnalyticsSDK;
|
using GameAnalyticsSDK;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
|
using Microsoft.Xna.Framework.Input;
|
||||||
using MLEM.Extensions;
|
using MLEM.Extensions;
|
||||||
using MLEM.Misc;
|
using MLEM.Misc;
|
||||||
using TouchyTickets;
|
using TouchyTickets;
|
||||||
|
@ -41,15 +41,12 @@ namespace Android {
|
||||||
adLayout.SetGravity(GravityFlags.Bottom);
|
adLayout.SetGravity(GravityFlags.Bottom);
|
||||||
|
|
||||||
// set up the game
|
// set up the game
|
||||||
TextInputWrapper.Current = new TextInputWrapper.Mobile();
|
MlemPlatform.Current = new MlemPlatform.Mobile(KeyboardInput.Show, l => this.StartActivity(new Intent(Intent.ActionView, Uri.Parse(l))));
|
||||||
this.platform = new AndroidPlatform(this, adLayout);
|
this.platform = new AndroidPlatform(this, adLayout);
|
||||||
this.game = new GameImpl(this.platform);
|
this.game = new GameImpl(this.platform);
|
||||||
this.game.GraphicsDeviceManager.ResetWidthAndHeight(this.game.Window);
|
this.game.GraphicsDeviceManager.ResetWidthAndHeight(this.game.Window);
|
||||||
this.game.GraphicsDeviceManager.IsFullScreen = true;
|
this.game.GraphicsDeviceManager.IsFullScreen = true;
|
||||||
this.game.OnLoadContent += game => {
|
this.game.OnLoadContent += game => game.InputHandler.HandleMouse = false;
|
||||||
game.InputHandler.HandleMouse = false;
|
|
||||||
game.UiSystem.LinkBehavior = l => this.StartActivity(new Intent(Intent.ActionView, Uri.Parse(l.Match.Groups[1].Value)));
|
|
||||||
};
|
|
||||||
|
|
||||||
var gameView = this.game.Services.GetService(typeof(View)) as View;
|
var gameView = this.game.Services.GetService(typeof(View)) as View;
|
||||||
gameView.LayoutChange += (o, args) => {
|
gameView.LayoutChange += (o, args) => {
|
||||||
|
|
|
@ -78,11 +78,11 @@
|
||||||
</MonoGameContentReference>
|
</MonoGameContentReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Contentless" Version="3.0.0" />
|
<PackageReference Include="Contentless" Version="3.0.6" />
|
||||||
<PackageReference Include="GameAnalytics.Xamarin.SDK" Version="4.1.1" />
|
<PackageReference Include="GameAnalytics.Xamarin.SDK" Version="5.2.3" />
|
||||||
<PackageReference Include="MonoGame.Content.Builder" Version="3.7.0.9" />
|
<PackageReference Include="MonoGame.Content.Builder" Version="3.7.0.9" />
|
||||||
<PackageReference Include="MonoGame.Framework.Android" Version="3.7.1.189" />
|
<PackageReference Include="MonoGame.Framework.Android" Version="3.8.0.1641" />
|
||||||
<PackageReference Include="Xamarin.GooglePlayServices.Games" Version="29.0.0.2" />
|
<PackageReference Include="Xamarin.GooglePlayServices.Games" Version="121.0.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\TouchyTickets\TouchyTickets.csproj">
|
<ProjectReference Include="..\TouchyTickets\TouchyTickets.csproj">
|
||||||
|
|
|
@ -3,7 +3,6 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Android.App;
|
using Android.App;
|
||||||
using Android.Content;
|
using Android.Content;
|
||||||
using Android.Gms.Ads;
|
|
||||||
using Android.Gms.Common;
|
using Android.Gms.Common;
|
||||||
using Android.Gms.Common.Apis;
|
using Android.Gms.Common.Apis;
|
||||||
using Android.Gms.Extensions;
|
using Android.Gms.Extensions;
|
||||||
|
@ -62,11 +61,12 @@ namespace Android {
|
||||||
public override void SetupOnlineInteractions(Dictionary<string, object> analyticsJson) {
|
public override void SetupOnlineInteractions(Dictionary<string, object> analyticsJson) {
|
||||||
// Analytics
|
// Analytics
|
||||||
GameAnalytics.SetAutoDetectAppVersion(true);
|
GameAnalytics.SetAutoDetectAppVersion(true);
|
||||||
GameAnalytics.Initialize(this.activity, GA_MiniJSON.JsonEncode(new Hashtable(analyticsJson)));
|
GameAnalytics.Initialize(this.activity, GA_MiniJSON.Serialize(new Hashtable(analyticsJson)));
|
||||||
AndroidEnvironment.UnhandledExceptionRaiser += (o, args) => GameAnalytics.NewErrorEvent(GAErrorSeverity.Critical, args.Exception.ToString());
|
AndroidEnvironment.UnhandledExceptionRaiser += (o, args) => GameAnalytics.NewErrorEvent(GAErrorSeverity.Critical, args.Exception.ToString());
|
||||||
|
|
||||||
|
// TODO fix ads
|
||||||
// Ads
|
// Ads
|
||||||
try {
|
/*try {
|
||||||
var ad = new AdView(this.activity) {
|
var ad = new AdView(this.activity) {
|
||||||
AdUnitId = "ca-app-pub-5754829579653773/7841535920",
|
AdUnitId = "ca-app-pub-5754829579653773/7841535920",
|
||||||
AdSize = AdSize.SmartBanner
|
AdSize = AdSize.SmartBanner
|
||||||
|
@ -77,9 +77,10 @@ namespace Android {
|
||||||
this.adLayout.AddView(ad);
|
this.adLayout.AddView(ad);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
GameAnalytics.NewErrorEvent(GAErrorSeverity.Error, "Ads " + e);
|
GameAnalytics.NewErrorEvent(GAErrorSeverity.Error, "Ads " + e);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
// Google Play game services
|
// TODO fix google play game services
|
||||||
|
/*// Google Play game services
|
||||||
try {
|
try {
|
||||||
this.GoogleApi = new GoogleApiClient.Builder(this.activity)
|
this.GoogleApi = new GoogleApiClient.Builder(this.activity)
|
||||||
.AddApi(GamesClass.API)
|
.AddApi(GamesClass.API)
|
||||||
|
@ -95,7 +96,7 @@ namespace Android {
|
||||||
this.GoogleApi.Connect();
|
this.GoogleApi.Connect();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
GameAnalytics.NewErrorEvent(GAErrorSeverity.Error, "GoogleApiClient " + e);
|
GameAnalytics.NewErrorEvent(GAErrorSeverity.Error, "GoogleApiClient " + e);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
// Sanity check to ensure that all achievements are mapped
|
// Sanity check to ensure that all achievements are mapped
|
||||||
|
|
5660
Android/Resources/Resource.Designer.cs
generated
5660
Android/Resources/Resource.Designer.cs
generated
File diff suppressed because it is too large
Load diff
|
@ -5,12 +5,12 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Coroutine" Version="2.0.0" />
|
<PackageReference Include="Coroutine" Version="2.1.3" />
|
||||||
<PackageReference Include="MLEM.Startup" Version="4.1.0-228" />
|
<PackageReference Include="MLEM.Startup" Version="5.3.0-365" />
|
||||||
<PackageReference Include="MonoGame.Framework.Portable" Version="3.7.1.189">
|
<PackageReference Include="MonoGame.Framework.Portable" Version="3.7.1.189">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
|
@ -13,6 +13,7 @@ using MLEM.Font;
|
||||||
using MLEM.Formatting.Codes;
|
using MLEM.Formatting.Codes;
|
||||||
using MLEM.Input;
|
using MLEM.Input;
|
||||||
using MLEM.Misc;
|
using MLEM.Misc;
|
||||||
|
using MLEM.Sound;
|
||||||
using MLEM.Startup;
|
using MLEM.Startup;
|
||||||
using MLEM.Textures;
|
using MLEM.Textures;
|
||||||
using MLEM.Ui;
|
using MLEM.Ui;
|
||||||
|
@ -51,7 +52,7 @@ namespace TouchyTickets {
|
||||||
rainingTickets.Add(new RainingTicket());
|
rainingTickets.Add(new RainingTicket());
|
||||||
},
|
},
|
||||||
OnDrawn = (e, time, batch, alpha) => {
|
OnDrawn = (e, time, batch, alpha) => {
|
||||||
batch.Draw(batch.GetBlankTexture(), e.DisplayArea, ColorExtensions.FromHex(0xff86bccf) * alpha);
|
batch.Draw(batch.GetBlankTexture(), e.DisplayArea, ColorHelper.FromHexRgb(0x86bccf) * alpha);
|
||||||
foreach (var ticket in rainingTickets)
|
foreach (var ticket in rainingTickets)
|
||||||
ticket.Draw(batch, e.DisplayArea.Size, e.Scale, Color.White * alpha);
|
ticket.Draw(batch, e.DisplayArea.Size, e.Scale, Color.White * alpha);
|
||||||
}
|
}
|
||||||
|
@ -75,13 +76,13 @@ namespace TouchyTickets {
|
||||||
ticketGroup.AddChild(new Paragraph(Anchor.AutoCenter, 1, p => GameImpl.Instance.Map.TicketsPerSecond.ToString("#,0.##") + "<i ticket>/s", true));
|
ticketGroup.AddChild(new Paragraph(Anchor.AutoCenter, 1, p => GameImpl.Instance.Map.TicketsPerSecond.ToString("#,0.##") + "<i ticket>/s", true));
|
||||||
BigInteger lastTickets = 0;
|
BigInteger lastTickets = 0;
|
||||||
ActiveCoroutine storeWobble = null;
|
ActiveCoroutine storeWobble = null;
|
||||||
var storeGroup = main.AddChild(new CustomDrawGroup(Anchor.AutoCenter, new Vector2(1, 0.425F), null, null, false) {
|
var storeGroup = main.AddChild(new Group(Anchor.AutoCenter, new Vector2(1, 0.425F), false) {
|
||||||
OnUpdated = (e, time) => {
|
OnUpdated = (e, time) => {
|
||||||
if (lastTickets != GameImpl.Instance.Tickets) {
|
if (lastTickets != GameImpl.Instance.Tickets) {
|
||||||
lastTickets = GameImpl.Instance.Tickets;
|
lastTickets = GameImpl.Instance.Tickets;
|
||||||
// only wobble if we're not already wobbling
|
// only wobble if we're not already wobbling
|
||||||
if (storeWobble == null || storeWobble.IsFinished)
|
if (storeWobble == null || storeWobble.IsFinished)
|
||||||
storeWobble = CoroutineHandler.Start(WobbleElement((CustomDrawGroup) e));
|
storeWobble = CoroutineHandler.Start(WobbleElement(e));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -145,10 +146,10 @@ namespace TouchyTickets {
|
||||||
// buy ui
|
// buy ui
|
||||||
var buyUi = new Group(Anchor.TopLeft, Vector2.One, false) {
|
var buyUi = new Group(Anchor.TopLeft, Vector2.One, false) {
|
||||||
IsHidden = true,
|
IsHidden = true,
|
||||||
OnDrawn = (e, time, batch, alpha) => batch.Draw(batch.GetBlankTexture(), e.DisplayArea, ColorExtensions.FromHex(0xff86bccf) * alpha)
|
OnDrawn = (e, time, batch, alpha) => batch.Draw(batch.GetBlankTexture(), e.DisplayArea, ColorHelper.FromHexRgb(0x86bccf) * alpha)
|
||||||
};
|
};
|
||||||
buyUi.AddChild(new Paragraph(Anchor.AutoCenter, 1, Localization.Get("Attractions"), true) {TextScale = 0.15F});
|
buyUi.AddChild(new Paragraph(Anchor.AutoCenter, 1, Localization.Get("Attractions"), true) {TextScale = 0.15F});
|
||||||
var buyList = buyUi.AddChild(new Panel(Anchor.AutoLeft, Vector2.One, Vector2.Zero, false, true, new Point(10, 30), false) {
|
var buyList = buyUi.AddChild(new Panel(Anchor.AutoLeft, Vector2.One, Vector2.Zero, false, true, false) {
|
||||||
ChildPadding = new Padding(5, 15, 5, 5),
|
ChildPadding = new Padding(5, 15, 5, 5),
|
||||||
PreventParentSpill = true
|
PreventParentSpill = true
|
||||||
});
|
});
|
||||||
|
@ -156,7 +157,7 @@ namespace TouchyTickets {
|
||||||
BigInteger price = 0;
|
BigInteger price = 0;
|
||||||
var attractionAmount = 0;
|
var attractionAmount = 0;
|
||||||
var button = buyList.AddChild(new Button(Anchor.AutoLeft, new Vector2(1, 40)) {
|
var button = buyList.AddChild(new Button(Anchor.AutoLeft, new Vector2(1, 40)) {
|
||||||
ChildPadding = new Vector2(4),
|
ChildPadding = new Padding(4),
|
||||||
PositionOffset = new Vector2(0, 1),
|
PositionOffset = new Vector2(0, 1),
|
||||||
OnPressed = e => {
|
OnPressed = e => {
|
||||||
if (this.swipeProgress != 0)
|
if (this.swipeProgress != 0)
|
||||||
|
@ -196,7 +197,7 @@ namespace TouchyTickets {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
var image = button.AddChild(new Image(Anchor.CenterLeft, new Vector2(0.2F, 40), Assets.AttractionTexture[attraction.Value.TextureRegion]) {
|
var image = button.AddChild(new Image(Anchor.CenterLeft, new Vector2(0.2F, 40), Assets.AttractionTexture[attraction.Value.TextureRegion]) {
|
||||||
Padding = new Vector2(4)
|
Padding = new Padding(4)
|
||||||
});
|
});
|
||||||
var right = button.AddChild(new Group(Anchor.TopRight, new Vector2(0.8F, 1), false) {CanBeMoused = false});
|
var right = button.AddChild(new Group(Anchor.TopRight, new Vector2(0.8F, 1), false) {CanBeMoused = false});
|
||||||
var name = right.AddChild(new Paragraph(Anchor.TopLeft, 1, Localization.Get(attraction.Key), true));
|
var name = right.AddChild(new Paragraph(Anchor.TopLeft, 1, Localization.Get(attraction.Key), true));
|
||||||
|
@ -218,10 +219,10 @@ namespace TouchyTickets {
|
||||||
// modifier ui
|
// modifier ui
|
||||||
var modifierUi = new Group(Anchor.TopLeft, Vector2.One, false) {
|
var modifierUi = new Group(Anchor.TopLeft, Vector2.One, false) {
|
||||||
IsHidden = true,
|
IsHidden = true,
|
||||||
OnDrawn = (e, time, batch, alpha) => batch.Draw(batch.GetBlankTexture(), e.DisplayArea, ColorExtensions.FromHex(0xff86bccf) * alpha)
|
OnDrawn = (e, time, batch, alpha) => batch.Draw(batch.GetBlankTexture(), e.DisplayArea, ColorHelper.FromHexRgb(0x86bccf) * alpha)
|
||||||
};
|
};
|
||||||
modifierUi.AddChild(new Paragraph(Anchor.AutoCenter, 1, Localization.Get("Modifiers"), true) {TextScale = 0.15F});
|
modifierUi.AddChild(new Paragraph(Anchor.AutoCenter, 1, Localization.Get("Modifiers"), true) {TextScale = 0.15F});
|
||||||
var modifierList = modifierUi.AddChild(new Panel(Anchor.AutoLeft, Vector2.One, Vector2.Zero, false, true, new Point(10, 30), false) {
|
var modifierList = modifierUi.AddChild(new Panel(Anchor.AutoLeft, Vector2.One, Vector2.Zero, false, true, false) {
|
||||||
ChildPadding = new Padding(5, 15, 5, 5),
|
ChildPadding = new Padding(5, 15, 5, 5),
|
||||||
PreventParentSpill = true
|
PreventParentSpill = true
|
||||||
});
|
});
|
||||||
|
@ -229,7 +230,7 @@ namespace TouchyTickets {
|
||||||
var button = modifierList.AddChild(new Button(Anchor.AutoLeft, new Vector2(1)) {
|
var button = modifierList.AddChild(new Button(Anchor.AutoLeft, new Vector2(1)) {
|
||||||
SetHeightBasedOnChildren = true,
|
SetHeightBasedOnChildren = true,
|
||||||
PositionOffset = new Vector2(0, 1),
|
PositionOffset = new Vector2(0, 1),
|
||||||
ChildPadding = new Vector2(4),
|
ChildPadding = new Padding(4),
|
||||||
OnPressed = e => {
|
OnPressed = e => {
|
||||||
if (this.swipeProgress != 0)
|
if (this.swipeProgress != 0)
|
||||||
return;
|
return;
|
||||||
|
@ -287,7 +288,7 @@ namespace TouchyTickets {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
var image = button.AddChild(new Image(Anchor.CenterLeft, new Vector2(0.2F, 40), Assets.UiTexture[modifier.Texture]) {
|
var image = button.AddChild(new Image(Anchor.CenterLeft, new Vector2(0.2F, 40), Assets.UiTexture[modifier.Texture]) {
|
||||||
Padding = new Vector2(4)
|
Padding = new Padding(4)
|
||||||
});
|
});
|
||||||
var right = button.AddChild(new Group(Anchor.TopRight, new Vector2(0.8F, 1)) {CanBeMoused = false});
|
var right = button.AddChild(new Group(Anchor.TopRight, new Vector2(0.8F, 1)) {CanBeMoused = false});
|
||||||
var name = right.AddChild(new Paragraph(Anchor.TopLeft, 1, Localization.Get(modifier.Name), true));
|
var name = right.AddChild(new Paragraph(Anchor.TopLeft, 1, Localization.Get(modifier.Name), true));
|
||||||
|
@ -320,7 +321,7 @@ namespace TouchyTickets {
|
||||||
// upgrade ui
|
// upgrade ui
|
||||||
var upgradeUi = new Group(Anchor.TopLeft, Vector2.One, false) {
|
var upgradeUi = new Group(Anchor.TopLeft, Vector2.One, false) {
|
||||||
IsHidden = true,
|
IsHidden = true,
|
||||||
OnDrawn = (e, time, batch, alpha) => batch.Draw(batch.GetBlankTexture(), e.DisplayArea, ColorExtensions.FromHex(0xff86bccf) * alpha)
|
OnDrawn = (e, time, batch, alpha) => batch.Draw(batch.GetBlankTexture(), e.DisplayArea, ColorHelper.FromHexRgb(0x86bccf) * alpha)
|
||||||
};
|
};
|
||||||
var upgradeHeader = upgradeUi.AddChild(new Group(Anchor.AutoLeft, new Vector2(1)));
|
var upgradeHeader = upgradeUi.AddChild(new Group(Anchor.AutoLeft, new Vector2(1)));
|
||||||
upgradeHeader.AddChild(new Paragraph(Anchor.AutoCenter, 1, p => GameImpl.Instance.Stars + "<i star>", true) {TextScale = 0.3F});
|
upgradeHeader.AddChild(new Paragraph(Anchor.AutoCenter, 1, p => GameImpl.Instance.Stars + "<i star>", true) {TextScale = 0.3F});
|
||||||
|
@ -357,7 +358,7 @@ namespace TouchyTickets {
|
||||||
upgradeHeader.AddChild(new Paragraph(Anchor.AutoCenter, 1, p => string.Format(Localization.Get("RequiresTickets"), PrettyPrintNumber(GameImpl.Instance.GetStarPrice())), true) {
|
upgradeHeader.AddChild(new Paragraph(Anchor.AutoCenter, 1, p => string.Format(Localization.Get("RequiresTickets"), PrettyPrintNumber(GameImpl.Instance.GetStarPrice())), true) {
|
||||||
PositionOffset = new Vector2(0, 2)
|
PositionOffset = new Vector2(0, 2)
|
||||||
});
|
});
|
||||||
var upgradeList = upgradeUi.AddChild(new Panel(Anchor.AutoLeft, new Vector2(1), Vector2.Zero, false, true, new Point(10, 30), false) {
|
var upgradeList = upgradeUi.AddChild(new Panel(Anchor.AutoLeft, new Vector2(1), Vector2.Zero, false, true, false) {
|
||||||
ChildPadding = new Padding(5, 15, 5, 5)
|
ChildPadding = new Padding(5, 15, 5, 5)
|
||||||
});
|
});
|
||||||
upgradeHeader.OnAreaUpdated += e => upgradeList.Size = new Vector2(1, (upgradeUi.DisplayArea.Height - upgradeHeader.DisplayArea.Height) / e.Scale);
|
upgradeHeader.OnAreaUpdated += e => upgradeList.Size = new Vector2(1, (upgradeUi.DisplayArea.Height - upgradeHeader.DisplayArea.Height) / e.Scale);
|
||||||
|
@ -367,10 +368,10 @@ namespace TouchyTickets {
|
||||||
// options ui
|
// options ui
|
||||||
var optionsUi = new Group(Anchor.TopLeft, Vector2.One, false) {
|
var optionsUi = new Group(Anchor.TopLeft, Vector2.One, false) {
|
||||||
IsHidden = true,
|
IsHidden = true,
|
||||||
OnDrawn = (e, time, batch, alpha) => batch.Draw(batch.GetBlankTexture(), e.DisplayArea, ColorExtensions.FromHex(0xff86bccf) * alpha)
|
OnDrawn = (e, time, batch, alpha) => batch.Draw(batch.GetBlankTexture(), e.DisplayArea, ColorHelper.FromHexRgba(0x86bccf) * alpha)
|
||||||
};
|
};
|
||||||
optionsUi.AddChild(new Paragraph(Anchor.AutoCenter, 1, Localization.Get("Options"), true) {TextScale = 0.15F});
|
optionsUi.AddChild(new Paragraph(Anchor.AutoCenter, 1, Localization.Get("Options"), true) {TextScale = 0.15F});
|
||||||
var optionList = optionsUi.AddChild(new Panel(Anchor.AutoLeft, new Vector2(1), Vector2.Zero, false, true, new Point(10, 30), false) {
|
var optionList = optionsUi.AddChild(new Panel(Anchor.AutoLeft, new Vector2(1), Vector2.Zero, false, true, false) {
|
||||||
ChildPadding = new Padding(5, 15, 5, 5),
|
ChildPadding = new Padding(5, 15, 5, 5),
|
||||||
PreventParentSpill = true
|
PreventParentSpill = true
|
||||||
});
|
});
|
||||||
|
@ -461,7 +462,7 @@ namespace TouchyTickets {
|
||||||
var tex = new TextureRegion(GameImpl.Instance.SpriteBatch.GetBlankTexture());
|
var tex = new TextureRegion(GameImpl.Instance.SpriteBatch.GetBlankTexture());
|
||||||
swipeInfo.AddChild(new Image(Anchor.AutoInlineIgnoreOverflow, new Vector2(12, 6), tex) {
|
swipeInfo.AddChild(new Image(Anchor.AutoInlineIgnoreOverflow, new Vector2(12, 6), tex) {
|
||||||
MaintainImageAspect = false,
|
MaintainImageAspect = false,
|
||||||
Padding = new Vector2(1),
|
Padding = new Padding(1),
|
||||||
OnUpdated = (e, time) => ((Image) e).DrawAlpha = this.currentUi == ui ? 1 : 0.35F
|
OnUpdated = (e, time) => ((Image) e).DrawAlpha = this.currentUi == ui ? 1 : 0.35F
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -561,8 +562,7 @@ namespace TouchyTickets {
|
||||||
panel.AddChild(new Button(Anchor.AutoLeft, new Vector2(1, 30), Localization.Get("Okay")) {
|
panel.AddChild(new Button(Anchor.AutoLeft, new Vector2(1, 30), Localization.Get("Okay")) {
|
||||||
OnPressed = e2 => {
|
OnPressed = e2 => {
|
||||||
// create the (empty) flag file
|
// create the (empty) flag file
|
||||||
using (analyticsFlag.Create()) {
|
using (analyticsFlag.Create()) {}
|
||||||
}
|
|
||||||
splash.RemoveChild(panel);
|
splash.RemoveChild(panel);
|
||||||
CoroutineHandler.RaiseEvent(evt);
|
CoroutineHandler.RaiseEvent(evt);
|
||||||
}
|
}
|
||||||
|
@ -696,7 +696,7 @@ namespace TouchyTickets {
|
||||||
var button = upgradeList.AddChild(new Button(Anchor.AutoLeft, new Vector2(1)) {
|
var button = upgradeList.AddChild(new Button(Anchor.AutoLeft, new Vector2(1)) {
|
||||||
SetHeightBasedOnChildren = true,
|
SetHeightBasedOnChildren = true,
|
||||||
PositionOffset = new Vector2(0, 1),
|
PositionOffset = new Vector2(0, 1),
|
||||||
ChildPadding = new Vector2(4),
|
ChildPadding = new Padding(4),
|
||||||
ActionSound = new SoundEffectInfo(Assets.BuySound),
|
ActionSound = new SoundEffectInfo(Assets.BuySound),
|
||||||
OnPressed = e => {
|
OnPressed = e => {
|
||||||
GameImpl.Instance.Stars -= upgrade.Price;
|
GameImpl.Instance.Stars -= upgrade.Price;
|
||||||
|
@ -717,7 +717,7 @@ namespace TouchyTickets {
|
||||||
HideAndDisable();
|
HideAndDisable();
|
||||||
|
|
||||||
button.AddChild(new Image(Anchor.CenterLeft, new Vector2(0.2F, 40), Assets.UiTexture[upgrade.Texture]) {
|
button.AddChild(new Image(Anchor.CenterLeft, new Vector2(0.2F, 40), Assets.UiTexture[upgrade.Texture]) {
|
||||||
Padding = new Vector2(4)
|
Padding = new Padding(4)
|
||||||
});
|
});
|
||||||
var right = button.AddChild(new Group(Anchor.TopRight, new Vector2(0.8F, 1)) {CanBeMoused = false});
|
var right = button.AddChild(new Group(Anchor.TopRight, new Vector2(0.8F, 1)) {CanBeMoused = false});
|
||||||
right.AddChild(new Paragraph(Anchor.TopLeft, 1, Localization.Get(upgrade.Name), true));
|
right.AddChild(new Paragraph(Anchor.TopLeft, 1, Localization.Get(upgrade.Name), true));
|
||||||
|
@ -727,10 +727,10 @@ namespace TouchyTickets {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IEnumerator<Wait> WobbleElement(CustomDrawGroup element, float intensity = 0.02F) {
|
private static IEnumerator<Wait> WobbleElement(Element element, float intensity = 0.02F) {
|
||||||
var sin = 0F;
|
var sin = 0F;
|
||||||
while (sin < MathHelper.Pi) {
|
while (sin < MathHelper.Pi) {
|
||||||
element.ScaleOrigin(1 + (float) Math.Sin(sin) * intensity);
|
element.ScaleTransform(1 + (float) Math.Sin(sin) * intensity);
|
||||||
sin += 0.2F;
|
sin += 0.2F;
|
||||||
yield return new Wait(CoroutineEvents.Update);
|
yield return new Wait(CoroutineEvents.Update);
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,10 +131,10 @@
|
||||||
<InterfaceDefinition Include="LaunchScreen.storyboard" />
|
<InterfaceDefinition Include="LaunchScreen.storyboard" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Contentless" Version="3.0.0" />
|
<PackageReference Include="Contentless" Version="3.0.6" />
|
||||||
<PackageReference Include="GameAnalytics.Xamarin.SDK" Version="4.1.1" />
|
<PackageReference Include="GameAnalytics.Xamarin.SDK" Version="5.2.3" />
|
||||||
<PackageReference Include="MonoGame.Content.Builder" Version="3.7.0.9" />
|
<PackageReference Include="MonoGame.Content.Builder" Version="3.7.0.9" />
|
||||||
<PackageReference Include="MonoGame.Framework.iOS" Version="3.8.0.1375-develop" />
|
<PackageReference Include="MonoGame.Framework.iOS" Version="3.8.0.1641" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\TouchyTickets\TouchyTickets.csproj">
|
<ProjectReference Include="..\TouchyTickets\TouchyTickets.csproj">
|
||||||
|
|
Loading…
Reference in a new issue