AllAssets
This commit is contained in:
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class UIHome_BY_AnnouncementPenel : UIHome_BY_EmailPenel
|
||||
public class UIHome_BY_AnnouncementPanel : UIHome_BY_EmailPanel
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class UIHome_BY_BackPackPenel : SubUIBase
|
||||
public class UIHome_BY_BackPackPanel : SubUIBase
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class UIHome_BY_EmailPenel : SubUIBase
|
||||
public class UIHome_BY_EmailPanel : SubUIBase
|
||||
{
|
||||
public TMPAutoResize mPAutoResize;
|
||||
// Start is called before the first frame update
|
||||
+1
-1
@@ -4,7 +4,7 @@ using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class UIHome_BY_MonthCardPenel : SubUIBase
|
||||
public class UIHome_BY_MonthCardPanel : SubUIBase
|
||||
{
|
||||
public Button btn_Open;
|
||||
public TextMeshProUGUI txt_QY;
|
||||
+1
-1
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class UIHome_BY_MySelectRoomPenel : SubUIBase
|
||||
public class UIHome_BY_MySelectRoomPanel : SubUIBase
|
||||
{
|
||||
public GameObject panel_PanelParent;
|
||||
public Button panel_RoomItemPrefab;
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class UIHome_BY_RankPenel : SubUIBase
|
||||
public class UIHome_BY_RankPanel : SubUIBase
|
||||
{
|
||||
public GameObject obj_LinePrefab;
|
||||
// Start is called before the first frame update
|
||||
+1
-1
@@ -4,7 +4,7 @@ using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class UIHome_BY_SafeBox : SubUIBase
|
||||
public class UIHome_BY_SafeBoxPanel : SubUIBase
|
||||
{
|
||||
|
||||
public enum SafeBoxPenel {
|
||||
@@ -1,10 +1,29 @@
|
||||
using System.Collections;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public enum GameType
|
||||
{
|
||||
JQQD = 0,
|
||||
defaultPanel = 1,
|
||||
FXZY = 2,
|
||||
TGXX = 3,
|
||||
ZGXQ = 4,
|
||||
XJMH = 5,
|
||||
HHWK = 6,
|
||||
}
|
||||
[Serializable]
|
||||
public class BG_SelectRoom
|
||||
{
|
||||
public string name;
|
||||
public GameType gameType;
|
||||
public Sprite sprite;
|
||||
}
|
||||
public class UIHome_BY_SelectRoomLevelPanel : SubUIBase
|
||||
{
|
||||
[Header("DefaultGame")]
|
||||
[Header("快速进入")]
|
||||
public Button SelectRoom1;
|
||||
public Button SelectRoom2;
|
||||
@@ -13,33 +32,36 @@ public class UIHome_BY_SelectRoomLevelPanel : SubUIBase
|
||||
public Button MySelectRoom1;
|
||||
public Button MySelectRoom2;
|
||||
public Button MySelectRoom3;
|
||||
public UIHome_BY_MySelectRoomPenel panel_UIHome_BY_MySelectRoomPenel;
|
||||
public UIHome_BY_MySelectRoomPanel panel_UIHome_BY_MySelectRoomPenel;
|
||||
public GameType currGameType;
|
||||
public List<BG_SelectRoom> bG_SelectRooms=new List<BG_SelectRoom>();
|
||||
public Image img_BG;
|
||||
public override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
MySelectRoom1.onClick.AddListener(() =>
|
||||
{
|
||||
OnSelectRoom("");
|
||||
OnSelectRoom(currGameType);
|
||||
});
|
||||
MySelectRoom2.onClick.AddListener(() =>
|
||||
{
|
||||
OnSelectRoom("");
|
||||
OnSelectRoom(currGameType);
|
||||
});
|
||||
MySelectRoom3.onClick.AddListener(() =>
|
||||
{
|
||||
OnSelectRoom("");
|
||||
OnSelectRoom(currGameType);
|
||||
});
|
||||
SelectRoom1.onClick.AddListener(() =>
|
||||
{
|
||||
StartGame("");
|
||||
StartGame(currGameType);
|
||||
});
|
||||
SelectRoom2.onClick.AddListener(() =>
|
||||
{
|
||||
StartGame("");
|
||||
StartGame(currGameType);
|
||||
});
|
||||
SelectRoom3.onClick.AddListener(() =>
|
||||
{
|
||||
StartGame("");
|
||||
StartGame(currGameType);
|
||||
});
|
||||
}
|
||||
public void OnSelectRoom(object json)
|
||||
@@ -53,4 +75,43 @@ public class UIHome_BY_SelectRoomLevelPanel : SubUIBase
|
||||
UIManager.Instance.Close(UIPanel.HomeMainPanel);
|
||||
|
||||
}
|
||||
public override void Show(object args = null)
|
||||
{
|
||||
base.Show(args);
|
||||
if (args != null && args is GameType)
|
||||
{
|
||||
currGameType = (GameType)args;
|
||||
GameManager.Instance.gameData.currGameType = currGameType;
|
||||
if (currGameType!= GameType.JQQD)
|
||||
{
|
||||
SelectRoom1.transform.GetChild((int)currGameType).gameObject.SetActive(true);
|
||||
SelectRoom2.transform.GetChild((int)currGameType).gameObject.SetActive(true);
|
||||
SelectRoom3.transform.GetChild((int)currGameType).gameObject.SetActive(true);
|
||||
}
|
||||
foreach (var item in bG_SelectRooms)
|
||||
{
|
||||
if (item.gameType==currGameType)
|
||||
{
|
||||
img_BG.sprite = item.sprite;
|
||||
img_BG.color =Color.white;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
public override void Hide()
|
||||
{
|
||||
base.Hide();
|
||||
img_BG.color = new Color(1,1,1,0);
|
||||
if (currGameType != GameType.JQQD)
|
||||
{
|
||||
SelectRoom1.transform.GetChild((int)currGameType).gameObject.SetActive(false);
|
||||
SelectRoom2.transform.GetChild((int)currGameType).gameObject.SetActive(false);
|
||||
SelectRoom3.transform.GetChild((int)currGameType).gameObject.SetActive(false);
|
||||
currGameType = GameType.JQQD;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class UIHome_BY_ServicePenel : SubUIBase
|
||||
public class UIHome_BY_ServicePanel : SubUIBase
|
||||
{
|
||||
public Button btn_DefaultQuestion;
|
||||
public Button btn_YouChangeIChange;
|
||||
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class UIHome_BY_SettingPenel : SubUIBase
|
||||
public class UIHome_BY_SettingPanel : SubUIBase
|
||||
{
|
||||
public Button btn_ExitGame;
|
||||
public Slider slider_AudioMusic;
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class UIHome_BY_ShopPenel : SubUIBase
|
||||
public class UIHome_BY_ShopPanel : SubUIBase
|
||||
{
|
||||
public GameObject obj_PropPrefab;
|
||||
[Header("左侧按钮")]
|
||||
+1
-1
@@ -4,7 +4,7 @@ using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class UIHome_BY_VIPPenel : SubUIBase
|
||||
public class UIHome_BY_VIPPanel : SubUIBase
|
||||
{
|
||||
|
||||
[Header("下一页上一页")]
|
||||
Reference in New Issue
Block a user