void OnDestroy() { instance = null; rootPanel = null; lobbyPanelPathArray = null; uiLobby = null; uiMessageBox = null; uiGameReady = null; uiHeroList = null; uiTowerList = null; uiWaiting = null; uiBaseInfo = null; uiGameOption = null; uiShop = null; }
void OnDestroy() { instance = null; uiInGame = null; uiTowerPlacement = null; uiTowerBuy = null; uiPathArray = null; uiMessageBox = null; uiWaiting = null; rootPanelArray = null; gameStatus = null; enemyList = null; startPointArray = null; endPointArray = null; }
private void LoadUICompleteCB(GameObject gameObj, System.Guid uid, params object[] param) { if (gameObj != null) { GameObject createObj = Instantiate(gameObj) as GameObject; createObj.transform.parent = rootPanelArray[(int)eRootPanelType.Type_Root].transform; createObj.transform.localPosition = Vector3.zero; createObj.transform.localScale = gameObj.transform.localScale; switch ((eUIType)param[0]) { case eUIType.Type_InGame: uiInGame = createObj.GetComponent <UIInGame>(); break; case eUIType.Type_TowerBuy: uiTowerBuy = createObj.GetComponent <UITowerBuy>(); break; case eUIType.Type_TowerPlacement: uiTowerPlacement = createObj.GetComponent <UITowerPlacement>(); break; case eUIType.Type_MessageBox: uiMessageBox = createObj.GetComponent <UIMessageBox>(); break; case eUIType.Type_GameResult: uiGameResult = createObj.GetComponent <UIGameResult>(); break; case eUIType.Type_Waiting: uiWaiting = createObj.GetComponent <UIWaiting>(); break; } } }
private void LoadUICompleteCB(GameObject gameObj, System.Guid uid, params object[] param) { if (gameObj != null) { GameObject createObj = Instantiate(gameObj) as GameObject; createObj.transform.parent = rootArray[(int)eRootType.Type_Back].transform; createObj.transform.localPosition = Vector3.zero; createObj.transform.localScale = gameObj.transform.localScale; switch ((eUIType)param[0]) { case eUIType.Type_Lobby: uiLobby = createObj.GetComponent <UILobby>(); break; case eUIType.Type_Lobby_Button: uiLobbyButton = createObj.GetComponent <UILobbyButton>(); break; case eUIType.Type_MessageBox: uiMessageBox = createObj.GetComponent <UIMessageBox>(); break; case eUIType.Type_Waiting: uiWaiting = createObj.GetComponent <UIWaiting>(); break; case eUIType.Type_Hero: uiHero = createObj.GetComponent <UIHero>(); if (lobbyTabGroup != null) { lobbyTabGroup[(int)eUILobbyTab.Type_Hero] = uiHero; } break; case eUIType.Type_Skill: uiSkill = createObj.GetComponent <UISkill>(); if (lobbyTabGroup != null) { lobbyTabGroup[(int)eUILobbyTab.Type_Skill] = uiSkill; } break; case eUIType.Type_Weapon: uiBullet = createObj.GetComponent <UIBullet>(); if (lobbyTabGroup != null) { lobbyTabGroup[(int)eUILobbyTab.Type_Weapon] = uiBullet; } break; case eUIType.Type_Gold: uiGoldShop = createObj.GetComponent <UIGoldShop>(); if (lobbyTabGroup != null) { lobbyTabGroup[(int)eUILobbyTab.Type_Gold] = uiGoldShop; } break; case eUIType.Type_Gem: uiCashShop = createObj.GetComponent <UICashShop>(); if (lobbyTabGroup != null) { lobbyTabGroup[(int)eUILobbyTab.Type_Gem] = uiCashShop; } break; } } }
private void LoadUICompleteCB(GameObject gameObj, System.Guid uid, params object[] param) { if (gameObj != null) { GameObject createObj = Instantiate(gameObj) as GameObject; createObj.transform.parent = rootPanel.transform; createObj.transform.localPosition = Vector3.zero; createObj.transform.localScale = gameObj.transform.localScale; switch ((eUIType)param[0]) { case eUIType.Type_Lobby: uiLobby = createObj.GetComponent <UILobby>(); break; case eUIType.Type_MessageBox: uiMessageBox = createObj.GetComponent <UIMessageBox>(); break; case eUIType.Type_GameReady: uiGameReady = createObj.GetComponent <UIGameReady>(); if (param.Length > 1 && (bool)param[1]) { uiGameReady.OpenFrame(); } break; case eUIType.Type_Hero: uiHeroList = createObj.GetComponent <UIHeroList>(); if (param.Length > 1 && (bool)param[1]) { uiHeroList.OpenFrame(); } break; case eUIType.Type_Tower: uiTowerList = createObj.GetComponent <UITowerList>(); if (param.Length > 1 && (bool)param[1]) { uiTowerList.OpenFrame(); } break; case eUIType.Type_Waiting: uiWaiting = createObj.GetComponent <UIWaiting>(); break; case eUIType.Type_Base: uiBaseInfo = createObj.GetComponent <UIBaseInfo>(); if (param.Length > 1 && (bool)param[1]) { uiBaseInfo.OpenFrame(); } break; case eUIType.Type_Option: uiGameOption = createObj.GetComponent <UIGameOption>(); if (param.Length > 1 && (bool)param[1]) { uiGameOption.OpenFrame(); } break; case eUIType.Type_Shop: uiShop = createObj.GetComponent <UIShop>(); if (param.Length > 1 && (bool)param[1]) { uiShop.OpenFrame(); } break; } } }