public void InitGameInfoRaw(int infoCnt = 99) { uiController = FindObjectOfType <UiGameReadyController>(); currIdx = 0; infoCellList = new List <GameInfoCell>(); InitByInfoType(); if (infoType != GameInfoState.AllSelectDone) { gameObject.SetActive(false); } if (infoType == GameInfoState.AllSelectDone) { InitSelectDoneCells(); } }
public void InitGameInfoReady() { uiGameReady = FindObjectOfType <UiGameReadyController>(); selectDic = new Dictionary <GameInfoState, GameInfoRaw>(); selectDic.Add(GameInfoState.SelectPlayer, selectPlayer); selectDic.Add(GameInfoState.SelectMode, selectMode); selectDic.Add(GameInfoState.SelectCPU, selectCPU); gameInfoState = GameInfoState.SelectPlayer; selectPlayer.InitGameInfoRaw(); selectMode.InitGameInfoRaw(); selectCPU.InitGameInfoRaw(); selectCheck.InitGameInfoRaw(); isDoneRaw = false; isAllCheck = false; isCanTouch = false; MoveRightToCenter(selectPlayer); selectPlayer.UpdateDataByInfoType(); }
public void InitCharacterReady() { uiReadyController = FindObjectOfType <UiGameReadyController>(); characterTypeList = new List <CharacterType>(); plCnt = (int)uiReadyController.howPlayer + 1; cpuCnt = uiReadyController.cpuCount; selectState = SelectState.PlayerSelect; var currIdx = 0; var totalCnt = plCnt + cpuCnt; if (plCnt >= 1) { selecters[currIdx].InitCharacterSelecter(0, PlayerType.PL1); selecters[currIdx].OnSelected(true, "P1", GetTeamColorByPlayerType(PlayerType.PL1, currIdx)); ++currIdx; } if (plCnt == 2) { selecters[currIdx].InitCharacterSelecter(0, PlayerType.PL2); selecters[currIdx].OnSelected(true, "P2", GetTeamColorByPlayerType(PlayerType.PL2, currIdx)); ++currIdx; } for (int i = currIdx; i < totalCnt; ++i) { selecters[i].InitCharacterSelecter(0, PlayerType.CPU); } //for (int i = totalCnt; i < selecters.Length; ++i) //{ // selecters[i].InitCharacterSelecter(99, PlayerType.None); //} isInit = true; isPlReady = false; isP2Ready = false; }