public void Window_ResultPopup(CWindowResultPopup.CWindowResultData _data, System.Action <int> _callback) { //GameObject Root_ui = GameObject.Find("root_window)"); //ui attach GameObject go = GameObject.Instantiate(Resources.Load("Prefabs/UI/Popup/ResultPopup"), Vector3.zero, Quaternion.identity) as GameObject; go.transform.parent = Root_ui.transform; go.transform.localPosition = Vector3.zero; go.transform.localRotation = Quaternion.identity; go.transform.localScale = Vector3.one; CWindowResultPopup w = go.GetComponent <CWindowResultPopup>(); w.Show(_data, _callback); }
void ClickButton(E_BLOCK_COLOR_TYPE _colorType) { if (Block_List.Count < 0) { return; } if (TouchStartTextObject.activeSelf && isGameOver) { isGameOver = false; TouchStartTextObject.SetActive(false); } Block checkBlock = Block_List.Find(((list) => list.GetBlockData().nFloorIndex == nFloorCount + 1)); switch (checkBlock.CheckBlock(_colorType)) { case E_CHECK_BLOCK.E_SUCCESS: { sliderTimer.value += 1; checkBlock.SetBlockColor(E_BLOCK_COLOR_TYPE.E_NONE); NextStair(); } break; case E_CHECK_BLOCK.E_FAILED: { #if CHEAT checkBlock.SetBlockColor(E_BLOCK_COLOR_TYPE.E_NONE); NextStair(); #endif isGameOver = true; CWindowResultPopup.CWindowResultData data = new CWindowResultPopup.CWindowResultData(); //임시 data.strTitle = "Result"; data.strOk = "Lobby"; data.strCancle = "Restart"; data.strScoreValue = nFloorCount.ToString(); GameManager.Instance.Window_ResultPopup(data, (result) => { switch (result) { case (int)CWindowResultPopup.E_WINDOW_RESULT.E_LOBBY: { BlocksClear(); uiManager.ShowScene(this, E_GAME_SCENE.E_LOBBY); } break; case (int)CWindowResultPopup.E_WINDOW_RESULT.E_RESTART: { GameInit(); } break; } }); } break; } }