From a2b44262f7d4d10427f9b1e7c8bbffb1a3d33a1b Mon Sep 17 00:00:00 2001 From: CaiYanPeng Date: Mon, 27 Dec 2021 09:39:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E8=AE=A1=E4=BF=AE=E6=AD=A3=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/BannerController.cs | 110 + Assets/BannerController.cs.meta | 11 + Assets/Resources/Images/NewDesign.meta | 8 + .../Resources/Images/NewDesign/ICON_Tools.png | Bin 0 -> 3543 bytes .../Images/NewDesign/ICON_Tools.png.meta | 128 + Assets/Resources/UI/Control/PfUIButton.prefab | 8 +- .../Resources/UI/Prefab/MainNav-mobile.prefab | 1916 ++++++++++++++ .../UI/Prefab/MainNav-mobile.prefab.meta | 7 + .../UI/Prefab/Panel/Mobile/HomePanel.prefab | 985 ++++--- Assets/Scenes/Test2.unity | 2356 +++++++++++++++++ Assets/Scenes/Test2.unity.meta | 7 + Assets/Scripts/Apis/MapApi.cs | 8 + Assets/Scripts/App.cs | 9 +- Assets/Scripts/Scenes/MainController.cs | 63 +- Assets/Scripts/UI/Prefab/NewMainNav.cs | 180 ++ Assets/Scripts/UI/Prefab/NewMainNav.cs.meta | 11 + .../Scripts/UI/Prefab/Panel/HomeController.cs | 5 + 17 files changed, 5498 insertions(+), 314 deletions(-) create mode 100644 Assets/BannerController.cs create mode 100644 Assets/BannerController.cs.meta create mode 100644 Assets/Resources/Images/NewDesign.meta create mode 100644 Assets/Resources/Images/NewDesign/ICON_Tools.png create mode 100644 Assets/Resources/Images/NewDesign/ICON_Tools.png.meta create mode 100644 Assets/Resources/UI/Prefab/MainNav-mobile.prefab create mode 100644 Assets/Resources/UI/Prefab/MainNav-mobile.prefab.meta create mode 100644 Assets/Scenes/Test2.unity create mode 100644 Assets/Scenes/Test2.unity.meta create mode 100644 Assets/Scripts/UI/Prefab/NewMainNav.cs create mode 100644 Assets/Scripts/UI/Prefab/NewMainNav.cs.meta diff --git a/Assets/BannerController.cs b/Assets/BannerController.cs new file mode 100644 index 00000000..475b68e0 --- /dev/null +++ b/Assets/BannerController.cs @@ -0,0 +1,110 @@ +using Assets.Scripts; +using Assets.Scripts.Apis.Models; +using DG.Tweening; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + +public class BannerController : MonoBehaviour +{ + // Start is called before the first frame update + private List itemList; + private List standardPositions; + private List list; + private int currentIndex = 1; + void Awake() + { + UIManager.AddEvent(transform.Find("L").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b => + { + Left(); + }); + UIManager.AddEvent(transform.Find("R").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b => + { + Right(); + }); + itemList = new List + { + transform.Find("1").GetComponent(), + transform.Find("2").GetComponent(), + transform.Find("3").GetComponent() + }; + standardPositions = new List + { + transform.Find("1").localPosition,transform.Find("2").localPosition,transform.Find("3").localPosition + }; + GetList(); + Debug.Log(standardPositions[0]); + Debug.Log(standardPositions[1]); + Debug.Log(standardPositions[2]); + } + async void GetList() + { + var res = await ConfigHelper.mapApi.GetRecommendAreaList(); + if (res.result) + { + Initial(res.data); + } + } + + public void Initial(List list) + { + int index = 0; + foreach (CanvasGroup c in itemList) + { + c.GetComponent().Initial(list[index++]); + } + currentIndex = 1; + this.list = list; + } + private void Right() + { + int center = GetCenterIndex(), + left = GetSideIndex(true), + right = GetSideIndex(false); + if (center == -1 || left == -1 || right == -1) return; + itemList[center].DOFade(0.5f, 0.5f); + itemList[center].GetComponent().DOScale(Vector3.one * 0.8f, 0.5f); + itemList[center].GetComponent().DOLocalMoveX(43, 0.5f); + itemList[right].GetComponent().DOLocalMoveX(-43, 0.5f); + itemList[right].GetComponent().Initial(list[((currentIndex++) + list.Count)% list.Count]); + if (currentIndex >= list.Count) currentIndex = 0; + itemList[left].DOFade(1, 0.5f); + itemList[left].GetComponent().DOScale(Vector3.one, 0.5f); + itemList[left].GetComponent().DOLocalMoveX(0, 0.5f); + itemList[left].transform.SetAsLastSibling(); + } + + private void Left() + { + int center = GetCenterIndex(), + left = GetSideIndex(true), + right = GetSideIndex(false); + if (center == -1 || left == -1 || right == -1) return; + itemList[center].DOFade(0.5f, 0.5f); + itemList[center].GetComponent().DOScale(Vector3.one*0.8f, 0.5f); + itemList[center].GetComponent().DOLocalMoveX(-43, 0.5f); + itemList[left].GetComponent().DOLocalMoveX(43, 0.5f); + itemList[left].GetComponent().Initial(list[((currentIndex--) + list.Count) % list.Count]); + if (currentIndex < 0) currentIndex = list.Count - 1; + itemList[right].DOFade(1, 0.5f); + itemList[right].GetComponent().DOScale(Vector3.one, 0.5f); + itemList[right].GetComponent().DOLocalMoveX(0, 0.5f); + itemList[right].transform.SetAsLastSibling(); + } + + int GetCenterIndex() + { + return itemList.FindIndex(x => x.transform.localPosition.x == 0); + } + int GetSideIndex(bool left) + { + return itemList.FindIndex(x => left ? x.transform.localPosition.x < 0 : x.transform.localPosition.x > 0); + } + // Update is called once per frame + void Update() + { + + } +} diff --git a/Assets/BannerController.cs.meta b/Assets/BannerController.cs.meta new file mode 100644 index 00000000..4b8d900c --- /dev/null +++ b/Assets/BannerController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 99085319355aa0f44a5db27b26f6ec95 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Images/NewDesign.meta b/Assets/Resources/Images/NewDesign.meta new file mode 100644 index 00000000..4e1f1f4b --- /dev/null +++ b/Assets/Resources/Images/NewDesign.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0c535875229f7974ebcc43ad53ddf539 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/Images/NewDesign/ICON_Tools.png b/Assets/Resources/Images/NewDesign/ICON_Tools.png new file mode 100644 index 0000000000000000000000000000000000000000..e0c25f6013ecb4756e2349ab539f8e7c0af9633d GIT binary patch literal 3543 zcmV;|4Jh)7P)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91K%fHv1ONa40RR91KmY&$07g+lumAuJK}keGRCod1TX}39#Tozh@NGZa ziDM^Rxe5_6AP7OUKwHHZf{H+FtXA}bRN{~TQJ_Ut)l&YT72;I?AcR6dl}bfT92DAe z_y{VbtrP;KB?eN63xTx0iO;-ix4&=p&3fOy-M9OmpF_kb&RpMo*L?HMw=?sI9O<&l zI+ryyw?`dKq{zyqrY)u{%Y0A&E=2%%bxI(W(aMT5f2C-nsH)Le@)Oz7yW#>_q_+4Q zqHL3>)pRN|H9BIX@kqKHGLcNs1SMqE&I6^eA-S-rxqV+#Q~U3njW!R?Mp+hm*woZM zOk{eBS{co!w_Q+5kQE8>ww{zuh4Vs-n_XuCxwY znv)%zGm~n6@2;m5MTt2(L|IjTz`3m`36M=HF#r@9sf4!?WHSi~?97>~{=V)KPeoU% z8a==2JmRS}<6twXAU8#s+uDxJ%d7JAIWcp2+DKB%p*Lt|E=dIGO*WtyXrb&J%&@v* z(m~j|Wu4rD^wNs+NlRcrii5W43>p?7{?8Dhr(q*?O%KuIGly-UYz2XU0diF$VH)@J z?%ZJ`kW{X^>e?E%Fnx+EB zV#rRf+?Ruw<}C-HsI=5~I_xSA^G%=wrfk|qg*wV@v3bK%B&IYB9+gwoGTKpe7PUs_2LsHs z9iw~9cdJgK@0Fe;C=wPDVL@$+e(VNQJP~}oYzck8{A9X(Xg}6Z)>*Y?!HxE3)oa8; z`cw4=x>T!kcc;}eIOtst1wv6RV`;Lc4U!e?PXAI>MY&TpY_DHWWMJ@U@L(R(-?!@= zVaj1=LK2d>*cxOdS0r*xq%EefNaSE9E=*Z+k?QdE1&XTN;~dQ6(m0Ta-1+9sTdSsL zCjJhShnB-7o}9kE?gxXQeHq{tp3frnB8WX`7<*8IXP>(<7r*2l8>a3%1!25t7y{v7 zl)ZcUyDwo_F$FxwQ_~ZZL4#M8l+sTd*3eqLTr4;<2`9s@BK2p&M=K`WAp2@`S^Wz2 z#K-9V_#rp?320-9U?8mdyD?;|zg)4A6lM&}{LMH@cPIXx39isXI`4jl$&d?Am5N3k zMa${i`U>HGSu@{=?Z=+rgWsgvb>4b&A^qEivuTA=0_j-QrloS==kjPWPVXe9=+R>z z(@W+k9Sb3t&ig(XSQ>_jo)xTCi*U=xyu}o=rnAe_aMB0W)zmNWpcEmn$K<8ErG{Rm;&07qsxMTb+nndVXu%zo7g)etI z2PUwgBtkvBIYR0WqqEdH`bI&Ci+$mhuKhv-QX+(PLvTp-vc6ckrs^wud%Hx0lEwfN z?Ck8+oRM20nNUdC-QVARr4wfc1I|u-F};ojcCoW9pR!Y8_xP*~xPdn{Z+Q?dmIG+t zaU3X_ntt6L%&&XASKSwp7cjTAv~+YBhS`p9wu`XMBJwn+;Eo1WQeG%7R=2(QV%Lb@ zSg-a_3^X^l-(i^M16~Nc+MtDj%8J@A@7}$Gom|$Gm4T*~E!V-D?#PNEYo{{O-?y^? zn!?`boqQQ6Fi%pz`;Ygd~PbrvSfDac6;qfHWpuDNM zV@SdXP7o80qoGzd`sH`jucWrhI?_$>or;2Zs}?Z=*V%eFP-Ovm*G7E;QPTC%1N0f6 zJ2_HSWo?B0gq(sv;?J%=hc1uQ&j4^Yd~@)h?k3-Q1%lIErRQ1kA{eE&mpIE6iy1d%oKXY` zT&ot*J+*6TyYNz(lHIxRn*R4-|14;w4oXi~N{qmXlLv)EaY>q>=Ze0YCCS|&+6qe_f!|2$xV&311 zPSKAi-w%sF5RT8GRgPf&Ag`*Zr)s__0`bvgtf0gtP1P@a)^Ra&b7ZCP@4V!`HU737 zQ;=L9aS9vY?=&~omzHmU7hddM^~?HJPe(ueLNPL2^;702*NZIWKC}f#0T-^9< z8*p}PYU$WYhVi7cZ6Rf-U0fG>;qYXD0b5!+PfHq!kGuxu);51C>NU=n0SVmH(*6th zfxBfrhkOEe$!nf}{^`%MjR|Bx4&Kz(dA^cNJcU@!*KGq9ktsdAr*GFCa$Haznt>oh z&VFW=l8I}8ycG}Z%9t*D0{b^?5%$|ha8X6<@q@X))jO1bPMkn3H9MBtS-mQ~UN zr>vu5J}N{M!#}`PF%k8AOQ+T<3fM zm$tVh2CVih|2rRb2rMFUOC<6?UvLn+Vc99vT7?T}!I%{SinCPk$fqiT*_0qcD?&+@ z0HPm)`oUF@2Bl)vit)&Va##syz`sZE?eJ$aH@`hPZ>yK(y z(WT{ema|F;&Qh=kk75Sjj!)6y_#6$JF>&%af_&JB(>QLlaCxvG+F=H>>~Ml6U#Y`w z7cSLl#q^uHMykT=aPgjuy?<(!@0%Q?-q={-h%E?{IfW&l3_=M7Q$T0Ma=IaM3fOY) z-MFE}j6XU1DV?m9(w*h2s9wd|rxN5vRD|oKW6;!%vjcQQJb_=3RG|m6>^i^nfVts) z(!x?Pj(Z`_voRqmKBEUlq?;pozwTS`E7TpuOo=x{PB*7*?f5v=hc{95LNt&SM-fc*S;#?M^<=6{1Ms$ z4>oU%oJv>2*;#wEB|IzPgZK>HeDpm8q%uf9-lBz~H^H(>NZSIq!TL?kfrR zacpl9Ri}|el!o!+wxQ%PadpZw{yDB^Z)P)Em67U5d#)%LE@C$o>+J$l~PiiO3FqVO3VVT^*Gm{w>;O2a>e^=qA zSID~GOGPJ*3=42}a+#kx^1Uh}bN8L7b>@|M_Ijr2<~h&;+ynS0K1qYR;VVw46Jwb7 zu%=SG-ve2<9I~FX0^~q;md&m0*P4cMU$$LC!Y@v)j3}ykS6@%}(_ZU449&b1;6~2B zMw*%V?0S4-Z${P>ii*^~>($"Map/GetMapRouteById?id={id}"); } + /// /// /// @@ -184,5 +185,12 @@ namespace Assets.Scripts.Apis var result = await GetAsync>>($"Map/GetMaxRanking"); return result; } + + public async Task>> GetRecommendAreaList() + { + var result = await GetAsync>>($"MapRouteArea/GetRecommendAreaList"); + return result; + } + } } diff --git a/Assets/Scripts/App.cs b/Assets/Scripts/App.cs index 7850fce3..a17caf5e 100644 --- a/Assets/Scripts/App.cs +++ b/Assets/Scripts/App.cs @@ -194,7 +194,14 @@ public static class App TcpAddress = new IPEndPoint(IPAddress.Parse("192.168.0.102"), 21001); //Debug.unityLogger.logEnabled = false; #endif - FB.Init(); + if (!FB.IsInitialized) + { + FB.Init(); + } + else + { + FB.ActivateApp(); + } var isRower = PlayerPrefs.GetString("IsRowerMode"); if (!string.IsNullOrEmpty(isRower)) { diff --git a/Assets/Scripts/Scenes/MainController.cs b/Assets/Scripts/Scenes/MainController.cs index 2c14887c..944fb26d 100644 --- a/Assets/Scripts/Scenes/MainController.cs +++ b/Assets/Scripts/Scenes/MainController.cs @@ -64,7 +64,7 @@ public class MainController : BaseScene FinishMessage(sender); } - CanvasGroup[] msgs; + List msgs; Vector3 msgLocation; int msgIndex = 0; CanvasGroup rightMessage; @@ -82,9 +82,10 @@ public class MainController : BaseScene msg3.transform.localPosition = 1 * msgLocation; msg3.transform.localScale = Vector3.one; msg3.alpha = 0; - msgs = new CanvasGroup[] { msg, msg2, msg3 }; + msgs = List { msg, msg2, msg3 }; rightMessage = transform.Find("GameObject/MessageRight").GetComponent(); #else + msgLocation = new Vector3(168, -153, 0); var go = transform.Find("GameObject"); go.GetComponent().anchorMin = Vector2.zero; go.GetComponent().anchorMax = Vector2.one; @@ -97,7 +98,18 @@ public class MainController : BaseScene rightMessage.transform.SetParent(go); rightMessage.transform.localScale = Vector3.one; - rightMessage.transform.localPosition = new Vector3(-112, 164, 0); + rightMessage.transform.localPosition = 1 * msgLocation; + msgs = new List { rightMessage }; + for (int i = 0; i < 5; i++) + { + var tmpm = Instantiate(rightMessage); + tmpm.transform.SetParent(rightMessage.transform.parent); + tmpm.transform.localPosition = 1 * msgLocation; + tmpm.transform.localScale = Vector3.one; + tmpm.alpha = 0; + msgs.Add(tmpm); + } + Debug.Log(rightMessage.GetComponent().localPosition); //rightMessage.transform.SetParent(transform.Find("GameObject")); #endif @@ -120,7 +132,7 @@ public class MainController : BaseScene #else if (App.currentPageIsHome) { - DoMessageRight(e); + DoMessage6(e); } #endif } @@ -156,6 +168,38 @@ public class MainController : BaseScene } msgIndex++; } + private void DoMessage6(LinkedMessageEvent e) + { + var selectIndex = msgIndex % 6; + var m = msgs[selectIndex]; + if (msgIndex >= 6) // + { + //msgIndex = 0; + m.DOFade(0, 0.5f).onComplete = () => + { + SetMessage(m, e); + m.transform.localPosition = 1 * msgLocation; + m.DOFade(1, 0.5f); + foreach (var item in msgs.Where((x, i) => i != selectIndex)) + { + item.transform.DOLocalMoveY(item.transform.localPosition.y + 38, 0.5f); + } + }; + } + else + { + Debug.Log(191); + SetMessage(m, e); + for (int i = 0; i < msgIndex; i++) + { + var rect = msgs[i].GetComponent(); + rect.DOLocalMoveY(rect.localPosition.y + 38, 0.5f); + } + m.DOFade(1, 0.5f); + } + msgIndex++; + } + void FinishMessage(object sender) { #if UNITY_STANDALONE_WIN @@ -170,7 +214,7 @@ public class MainController : BaseScene #else if (!(bool)sender) { - FinishMessageRight(); + FinishMessage6(); } #endif } @@ -193,6 +237,15 @@ public class MainController : BaseScene msgIndex = 0; rightMessage.DOFade(0, 0.3f); } + void FinishMessage6() + { + msgIndex = 0; + foreach (var m in msgs) + { + m.alpha = 0; + m.GetComponent().localPosition = 1 * msgLocation; + } + } private void SetMessage(CanvasGroup m,LinkedMessageEvent e) { m.transform.Find("Avatar").GetComponent().texture = null; diff --git a/Assets/Scripts/UI/Prefab/NewMainNav.cs b/Assets/Scripts/UI/Prefab/NewMainNav.cs new file mode 100644 index 00000000..2ea0076e --- /dev/null +++ b/Assets/Scripts/UI/Prefab/NewMainNav.cs @@ -0,0 +1,180 @@ +using Assets.Scripts.UI.Control; +using DG.Tweening; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.EventSystems; +using UnityEngine.UI; + +public class NewMainNav : MonoBehaviour +{ + private GameObject exit; + private GameObject home; + private GameObject back; + float delayTime = 0; + private List typeArray = new List() + { + "Back","Exit","Home","Device","Delay","Setting","Support" + }; + private List indexs = new List(); + /// + /// 0,1,2,3,4,5,6 + /// "Back","Exit","Home","Device","Delay","Setting","Support" + /// + public void SetButtonActive(List indexs) + { + this.indexs = indexs; + SetExpand(false); + //List types = new List(); + //if (indexs != null) + //{ + // types = typeArray.Where((x, i) => indexs.Contains(i)).ToList(); + //} + //foreach (Transform item in transform) + //{ + // item.gameObject.SetActive(types.Contains(item.name)); + //} + } + /// + /// true:展开 false:关闭 + /// + /// + private void SetExpand(bool flag) + { + List types = new List(); + if (indexs != null) + { + types = typeArray.Where((x, i) => indexs.Contains(i)).ToList(); + } + foreach (Transform item in transform) + { + if (flag) + { + if (item.name == "Down") + { + item.gameObject.SetActive(true); + } + else if (item.name == "PF") + { + item.gameObject.SetActive(false); + } + else + { + item.gameObject.SetActive(types.Contains(item.name)); + } + } + else + { + item.gameObject.SetActive(item.name == "PF"); + } + + } + } + private void Awake() + { + UIManager.AddEvent(transform.Find("PF").gameObject, EventTriggerType.PointerClick, b => + { + SetExpand(true); + }); + UIManager.AddEvent(transform.Find("Down").gameObject, EventTriggerType.PointerClick, b => + { + SetExpand(false); + }); + //var material = Instantiate(Resources.Load("UI/Material/RoundedCornersTextureMaterial")); + + //var rect = ((RectTransform)this.transform).rect; + //material.SetVector(Shader.PropertyToID("_WidthHeightRadius"), new Vector4(rect.width, rect.height, rect.height, 0)); + //this.GetComponent().material = material; + + var device = this.transform.Find("Device"); + UIManager.AddEvent(device.gameObject, EventTriggerType.PointerClick, x => + { + //Debug.Log("click device"); + UIManager.ShowDevicePanel(); + }); + + home = this.transform.Find("Home").gameObject; + UIManager.AddEvent(home, EventTriggerType.PointerClick, x => + { + UIManager.ShowHomePanel(); + }); + + exit = this.transform.Find("Exit").gameObject; + exit.SetActive(false); + back = transform.Find("Back").gameObject; + back.SetActive(false); +#if UNITY_ANDROID || UNITY_IOS + UIManager.AddEvent(transform.Find("Delay").gameObject, EventTriggerType.PointerClick, b => + { + delayTime = 3; + transform.Find("Delay/Tooltips").gameObject.SetActive(true); + transform.Find("Delay/Tooltips").GetComponent().DOFade(1, 0.5f); + }); +#endif + //transform.Find("Delay").GetComponent().showTooltip = true; + UIManager.AddEvent(exit, EventTriggerType.PointerClick, (e) => + { + UIManager.ShowConfirm("Quit", "Do you want to quit PowerFun?", ()=> { + Application.Quit(); + },2); + }); + UIManager.AddEvent(back, EventTriggerType.PointerClick, (e) => + { + UIManager.ShowPrePanel(); + }); + + UIManager.AddEvent(transform.Find("Setting").gameObject, EventTriggerType.PointerClick, x => + { + UIManager.ShowSettingModal(); + }); + UIManager.AddEvent(transform.Find("Support").gameObject, EventTriggerType.PointerClick, x => + { + UIManager.ShowFeedBackModal(); + }); + + } + + public void ShowRowerTab() + { + if (transform.Find("Device")) + { + transform.Find("Device").gameObject.SetActive(false); + } + if (transform.Find("Exit")) + { + transform.Find("Exit").gameObject.SetActive(true); + } + if (transform.Find("Home")) + { + transform.Find("Home").gameObject.SetActive(false); + } + } + + // Start is called before the first frame update + void Start() + { + + } + + // Update is called once per frame + void Update() + { + if (delayTime < 0) + { + Debug.Log("小时"); + delayTime = 0; + transform.Find("Delay/Tooltips").GetComponent().DOFade(0, 0.5f).onComplete = ()=> + { + transform.Find("Delay/Tooltips").gameObject.SetActive(false); + }; + } + else if(delayTime > 0) + { + Debug.Log(delayTime); + delayTime -= Time.deltaTime; + } + } + +} diff --git a/Assets/Scripts/UI/Prefab/NewMainNav.cs.meta b/Assets/Scripts/UI/Prefab/NewMainNav.cs.meta new file mode 100644 index 00000000..fa2cf3cf --- /dev/null +++ b/Assets/Scripts/UI/Prefab/NewMainNav.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fca4162bdac783449b37ea751c075353 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/UI/Prefab/Panel/HomeController.cs b/Assets/Scripts/UI/Prefab/Panel/HomeController.cs index a8c0d550..4f19ed2a 100644 --- a/Assets/Scripts/UI/Prefab/Panel/HomeController.cs +++ b/Assets/Scripts/UI/Prefab/Panel/HomeController.cs @@ -35,8 +35,13 @@ public class HomeController : PFUIPanel protected override void Start() { base.Start(); +#if UNITY_ANDROID || UNITY_IOS + var nav = transform.Find("MainNav-mobile").GetComponent(); + nav.SetButtonActive(new List { 1, 3, 4, 6 }); +#else mainNav = this.transform.Find("MainNav").GetComponent(); mainNav.ShowExit(); +#endif var BtnContainer = transform.Find("MainFuncContainer"); UIManager.AddEvent(BtnRide.gameObject, EventTriggerType.PointerClick, GoRide); UIManager.AddEvent(BtnRide.gameObject, EventTriggerType.PointerEnter, OnHover);