|
@@ -52,7 +52,19 @@ namespace HexaCrazy
|
|
|
page=Layer("Page");fxLayer=Layer("Effects");toastLayer=Layer("Toasts");
|
|
page=Layer("Page");fxLayer=Layer("Effects");toastLayer=Layer("Toasts");
|
|
|
if(FindAnyObjectByType<EventSystem>()==null){var es=new GameObject("EventSystem",typeof(EventSystem),typeof(StandaloneInputModule));es.transform.SetParent(transform);}
|
|
if(FindAnyObjectByType<EventSystem>()==null){var es=new GameObject("EventSystem",typeof(EventSystem),typeof(StandaloneInputModule));es.transform.SetParent(transform);}
|
|
|
FitSafeArea();
|
|
FitSafeArea();
|
|
|
|
|
+ AppRuntimesEvents.OnPlatformOpen += HandlePlatformOpen;
|
|
|
}
|
|
}
|
|
|
|
|
+ void OnDestroy() => AppRuntimesEvents.OnPlatformOpen -= HandlePlatformOpen;
|
|
|
|
|
+
|
|
|
|
|
+ void HandlePlatformOpen()
|
|
|
|
|
+ {
|
|
|
|
|
+ audioPlayer.StopMusic();
|
|
|
|
|
+ if (!Profile.Data.music && Profile.Available) return;
|
|
|
|
|
+ Profile.Data.music = false;
|
|
|
|
|
+ Profile.Save();
|
|
|
|
|
+ if (currentPanel == "settings") Reopen("settings");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
void Start() { Ads = Ads != null ? Ads : AdMobRewardedAds.Shared(); ShowStart(); }
|
|
void Start() { Ads = Ads != null ? Ads : AdMobRewardedAds.Shared(); ShowStart(); }
|
|
|
RectTransform Layer(string name) => HexUI.Node(Root,name,375,667,750,1334);
|
|
RectTransform Layer(string name) => HexUI.Node(Root,name,375,667,750,1334);
|
|
|
void SyncAudio(){audioPlayer.Music=gameStarted&&Profile.Data.music;audioPlayer.Sound=Profile.Data.sound;}
|
|
void SyncAudio(){audioPlayer.Music=gameStarted&&Profile.Data.music;audioPlayer.Sound=Profile.Data.sound;}
|
|
@@ -91,7 +103,6 @@ namespace HexaCrazy
|
|
|
public void ShowStart()
|
|
public void ShowStart()
|
|
|
{
|
|
{
|
|
|
CleanPage("Start");Game=null;
|
|
CleanPage("Start");Game=null;
|
|
|
- HexUI.Image(page,"StartFrame","card",375,667,710,1255,null,true);
|
|
|
|
|
HexUI.Text(page,"SinglePlayer","FREE PLAY · NO CASH VALUE",375,280,600,30,19);
|
|
HexUI.Text(page,"SinglePlayer","FREE PLAY · NO CASH VALUE",375,280,600,30,19);
|
|
|
Logo(page,405,550);HexUI.Image(page,"Divider","ornament",375,510,280,24);
|
|
Logo(page,405,550);HexUI.Image(page,"Divider","ornament",375,510,280,24);
|
|
|
for(int i=0;i<6;i++){float a=i*Mathf.PI/3;HexUI.Tile(page,new[]{0,1,3,4,5,6}[i],2,375+Mathf.Cos(a)*113,685+Mathf.Sin(a)*105,111,false);}
|
|
for(int i=0;i<6;i++){float a=i*Mathf.PI/3;HexUI.Tile(page,new[]{0,1,3,4,5,6}[i],2,375+Mathf.Cos(a)*113,685+Mathf.Sin(a)*105,111,false);}
|
|
@@ -106,7 +117,7 @@ namespace HexaCrazy
|
|
|
{
|
|
{
|
|
|
CleanPage("Lobby");Game=null;
|
|
CleanPage("Lobby");Game=null;
|
|
|
var d=Profile.Data;
|
|
var d=Profile.Data;
|
|
|
- var bar = HexUI.Image(page, "PlayerBar", "dock_frame", 375, 74, 730, 100);
|
|
|
|
|
|
|
+ var bar = HexUI.Image(page, "PlayerBar", "player_header_rail", 375, 74, 730, 100);
|
|
|
var profile = HexUI.Button(bar.transform, "ProfileAvatar", "", 219, 50, 322, 84, () => OpenPanel("profile"), null);
|
|
var profile = HexUI.Button(bar.transform, "ProfileAvatar", "", 219, 50, 322, 84, () => OpenPanel("profile"), null);
|
|
|
var medal = HexUI.Image(profile.transform, "PortraitMedal", "medallion", 45, 42, 75, 75);
|
|
var medal = HexUI.Image(profile.transform, "PortraitMedal", "medallion", 45, 42, 75, 75);
|
|
|
profile.targetGraphic = medal;
|
|
profile.targetGraphic = medal;
|
|
@@ -139,7 +150,7 @@ namespace HexaCrazy
|
|
|
CarouselSelectionChanged(modeIndex);
|
|
CarouselSelectionChanged(modeIndex);
|
|
|
string[] panels = { "checkin", "shop", "draw", "help", "profile" };
|
|
string[] panels = { "checkin", "shop", "draw", "help", "profile" };
|
|
|
string[] labels = { "CHECK-IN", "SHOP", "DRAW", "HELP", "PROFILE" };
|
|
string[] labels = { "CHECK-IN", "SHOP", "DRAW", "HELP", "PROFILE" };
|
|
|
- var dock = HexUI.Image(page, "LobbyDock", "dock_frame", 375, 1248, 730, 140);
|
|
|
|
|
|
|
+ var dock = HexUI.Image(page, "LobbyDock", "lobby_nav_rail", 375, 1248, 730, 140);
|
|
|
for (int i = 0; i < panels.Length; i++)
|
|
for (int i = 0; i < panels.Length; i++)
|
|
|
{
|
|
{
|
|
|
string panel = panels[i];
|
|
string panel = panels[i];
|
|
@@ -234,7 +245,7 @@ namespace HexaCrazy
|
|
|
{
|
|
{
|
|
|
if (dockLayer == null) return;
|
|
if (dockLayer == null) return;
|
|
|
HexUI.Clear(dockLayer);
|
|
HexUI.Clear(dockLayer);
|
|
|
- var tray = HexUI.Image(dockLayer, "DockPanel", "dock_frame", 375, 1244, 730, 146);
|
|
|
|
|
|
|
+ var tray = HexUI.Image(dockLayer, "DockPanel", "game_tool_tray", 375, 1244, 730, 146);
|
|
|
const float slotWidth = 142;
|
|
const float slotWidth = 142;
|
|
|
for (int i = 0; i < HexUI.ItemIcons.Length; i++)
|
|
for (int i = 0; i < HexUI.ItemIcons.Length; i++)
|
|
|
{
|
|
{
|