public void ActiveJiFenJieMian() { if (Network.peerType == NetworkPeerType.Server) { return; } if (JiFenJieMianObj.activeSelf) { return; } FinishTaskObj.SetActive(false); if (!JiFenZongJieMianObj.activeSelf) { DanYaoInfoCtrl.GetInstanceOne().HiddenPlayerDanYaoInfo(); DanYaoInfoCtrl.GetInstanceTwo().HiddenPlayerDanYaoInfo(); ZhunXingCtrl.GetInstanceOne().SetActiveZhunXingObj(false); ZhunXingCtrl.GetInstanceTwo().SetActiveZhunXingObj(false); CoinPlayerCtrl.GetInstanceOne().HiddenPlayerCoin(); CoinPlayerCtrl.GetInstanceTwo().HiddenPlayerCoin(); YouLiangAddCtrl.GetInstance().HiddenYouLiangAdd(); YouLiangCtrl.GetInstance().HiddenYouLiang(); JiFenZongJieMianObj.SetActive(true); } else { XkGameCtrl.HiddenMissionCleanup(); if (Network.peerType == NetworkPeerType.Client) { if (NetCtrl.GetInstance() != null) { NetCtrl.GetInstance().TryCloseServerPort(); } } } System.GC.Collect(); if (XkPlayerCtrl.GetInstanceFeiJi() != null) { XkPlayerCtrl.GetInstanceFeiJi().StopPlayerMoveAudio(); } if (XkPlayerCtrl.GetInstanceTanKe() != null) { XkPlayerCtrl.GetInstanceTanKe().StopPlayerMoveAudio(); } JiFenJieMianObj.SetActive(true); if (XkGameCtrl.IsPlayGamePOne) { XunZhangJBCtrl.GetInstanceOne().ShowPlayerXunZhangJB(); } if (XkGameCtrl.IsPlayGamePTwo) { XunZhangJBCtrl.GetInstanceTwo().ShowPlayerXunZhangJB(); } }
public void ActiveJiFenJieMian() { if (Network.peerType == NetworkPeerType.Server) { return; } if (JiFenJieMianObj.activeSelf) { return; } // FinishTaskObj.SetActive(false); IsShowFinishTask = true; IsMakeJiFenStop = false; pcvr.CloseAllQiNangArray(PlayerEnum.Null, 1); if (!JiFenZongJieMianObj.activeSelf) { CoinPlayerCtrl.GetInstanceOne().HiddenPlayerCoin(); CoinPlayerCtrl.GetInstanceTwo().HiddenPlayerCoin(); CoinPlayerCtrl.GetInstanceThree().HiddenPlayerCoin(); CoinPlayerCtrl.GetInstanceFour().HiddenPlayerCoin(); GameTimeCtrl.GetInstance().HiddenGameTime(); DaoJuCtrl.GetInstance().HiddenAllPlayerDaoJu(); DongGanUICtrl.InstanceOne.HiddenDongGanUI(); DongGanUICtrl.InstanceTwo.HiddenDongGanUI(); DongGanUICtrl.InstanceThree.HiddenDongGanUI(); DongGanUICtrl.InstanceFour.HiddenDongGanUI(); JiFenZongJieMianObj.SetActive(true); } PaiMingCtrl.GetInstance().ShowGamePaiMing(); System.GC.Collect(); JiFenJieMianObj.SetActive(true); Invoke("StopJiFenTime", 8f); }
public void ShowFinishTaskInfo() { if (IsShowFinishTask) { return; } IsShowFinishTask = true; DanYaoInfoCtrl.GetInstanceOne().HiddenPlayerDanYaoInfo(); DanYaoInfoCtrl.GetInstanceTwo().HiddenPlayerDanYaoInfo(); ZhunXingCtrl.GetInstanceOne().SetActiveZhunXingObj(false); ZhunXingCtrl.GetInstanceTwo().SetActiveZhunXingObj(false); CoinPlayerCtrl.GetInstanceOne().HiddenPlayerCoin(); CoinPlayerCtrl.GetInstanceTwo().HiddenPlayerCoin(); YouLiangAddCtrl.GetInstance().HiddenYouLiangAdd(); YouLiangCtrl.GetInstance().HiddenYouLiang(); JiFenZongJieMianObj.SetActive(true); if (Network.peerType == NetworkPeerType.Server) { ScreenDanHeiCtrl.GetInstance().OpenPlayerUI(); if (GameOverCtrl.IsShowGameOver) { GameOverObj.SetActive(true); } else { FinishTaskObj.SetActive(true); } return; } FinishTaskObj.SetActive(true); XKGlobalData.GetInstance().PlayAudioRenWuOver(); }
public void StopJiFenTime() { if (Time.realtimeSinceStartup - TimeStartVal < 8f) { Debug.Log("Unity:" + "StopJiFenTime -> TimeStartVal was wrong!"); return; } if (IsMakeJiFenStop) { return; } IsMakeJiFenStop = true; IsShowFinishTask = false; JiFenJieMianObj.SetActive(false); Debug.Log("Unity:" + "StopJiFenTime..."); if (GameOverCtrl.IsShowGameOver) { XkGameCtrl.LoadingGameMovie(); return; } CountJiFenOpen++; #if CREAT_GAME_SCENE //动态加载下一关的游戏场景预制文件. XkGameCtrl.GetInstance().m_CreatSceneCom.CreatGameScene(CountJiFenOpen); #endif #if USE_LOADING_NEXT_SCENE //直接加载下一关的游戏场景. if (Application.loadedLevel < 4) { Application.LoadLevel(Application.loadedLevel + 1); } else { Application.LoadLevel(0); } #endif //CountJiFenOpen = 4; //test. if (CountJiFenOpen < 4) { XKBossXueTiaoCtrl.IsWuDiPlayer = false; XKTriggerStopMovePlayer.IsActiveTrigger = false; GameTimeCtrl.GetInstance().OpenGameTime(); CoinPlayerCtrl.GetInstanceOne().ShwoPlayerCoin(); CoinPlayerCtrl.GetInstanceTwo().ShwoPlayerCoin(); CoinPlayerCtrl.GetInstanceThree().ShwoPlayerCoin(); CoinPlayerCtrl.GetInstanceFour().ShwoPlayerCoin(); DaoJuCtrl.GetInstance().ShowAllPlayerDaoJu(); XKPlayerScoreCtrl.ShowPlayerScore(PlayerEnum.Null); } else { QuanBuTongGuanCtrl.GetInstance().ShowQuanBuTongGuan(); } }
public static void SetCoinPlayerOne(int coin) { if (XKGlobalData.GameVersionPlayer != 0) { CoinPlayerOne = coin; SetCoinPlayerThree(coin); return; } if (pcvr.bIsHardWare == false) { if (coin > 0 && CoinPlayerOne != coin) { PlayTouBiAudio(); if (coin > CoinPlayerOne) { Instance.SetTotalInsertCoins(Instance.m_TotalInsertCoins + (coin - CoinPlayerOne)); } } } CoinPlayerOne = coin; if (CoinPlayerCtrl.GetInstanceOne() != null) { CoinPlayerCtrl.GetInstanceOne().SetPlayerCoin(coin); } if (SetPanelUiRoot.GetInstance() != null) { SetPanelUiRoot.GetInstance().SetCoinStartLabelInfo(1); } }
public void StopJiFenTime() { if (Time.realtimeSinceStartup - TimeStartVal < 8f) { Debug.Log("Unity:" + "StopJiFenTime -> TimeStartVal was wrong!"); return; } if (IsMakeJiFenStop) { return; } IsMakeJiFenStop = true; IsShowFinishTask = false; JiFenJieMianObj.SetActive(false); Debug.Log("Unity:" + "StopJiFenTime..."); if (GameOverCtrl.IsShowGameOver) { XkGameCtrl.LoadingGameMovie(); return; } CountJiFenOpen++; //CountJiFenOpen = 4; //test. if (CountJiFenOpen < 4) { XKBossXueTiaoCtrl.IsWuDiPlayer = false; XKTriggerStopMovePlayer.IsActiveTrigger = false; if (GameTimeCtrl.GetInstance() != null) { GameTimeCtrl.GetInstance().OpenGameTime(); } CoinPlayerCtrl.GetInstanceOne().ShwoPlayerCoin(); CoinPlayerCtrl.GetInstanceTwo().ShwoPlayerCoin(); CoinPlayerCtrl.GetInstanceThree().ShwoPlayerCoin(); CoinPlayerCtrl.GetInstanceFour().ShwoPlayerCoin(); DaoJuCtrl.GetInstance().ShowAllPlayerDaoJu(); XKPlayerScoreCtrl.ShowPlayerScore(PlayerEnum.Null); } else { if (QuanBuTongGuanCtrl.GetInstance() != null) { QuanBuTongGuanCtrl.GetInstance().ShowQuanBuTongGuan(); } } }
public static void SetCoinPlayerOne(int coin) { if (coin > 0 && CoinPlayerOne != coin) { PlayTouBiAudio(); } CoinPlayerOne = coin; if (CoinPlayerCtrl.GetInstanceOne() != null) { CoinPlayerCtrl.GetInstanceOne().SetPlayerCoin(coin); } if (SetPanelUiRoot.GetInstance() != null) { SetPanelUiRoot.GetInstance().SetCoinStartLabelInfo(); } pcvr.SetIsPlayerActivePcvr(); }
public static void SetCoinPlayerOne(int coin) { if (XKGlobalData.GameVersionPlayer != 0) { CoinPlayerOne = coin; SetCoinPlayerThree(coin); return; } if (coin > 0 && CoinPlayerOne != coin) { PlayTouBiAudio(); } CoinPlayerOne = coin; if (CoinPlayerCtrl.GetInstanceOne() != null) { CoinPlayerCtrl.GetInstanceOne().SetPlayerCoin(coin); } if (SetPanelUiRoot.GetInstance() != null) { SetPanelUiRoot.GetInstance().SetCoinStartLabelInfo(1); } }
public static void SetGameNeedCoin(int coin) { GameNeedCoin = coin; CoinPlayerCtrl.GetInstanceOne().SetGameNeedCoin(coin); CoinPlayerCtrl.GetInstanceTwo().SetGameNeedCoin(coin); }
public void ActiveJiFenJieMian() { if (Network.peerType == NetworkPeerType.Server) { return; } if (JiFenJieMianObj.activeSelf) { return; } FinishTaskObj.SetActive(false); if (!JiFenZongJieMianObj.activeSelf) { DanYaoInfoCtrl.GetInstanceOne().HiddenPlayerDanYaoInfo(); DanYaoInfoCtrl.GetInstanceTwo().HiddenPlayerDanYaoInfo(); ZhunXingCtrl.GetInstanceOne().SetActiveZhunXingObj(false); ZhunXingCtrl.GetInstanceTwo().SetActiveZhunXingObj(false); CoinPlayerCtrl.GetInstanceOne().HiddenPlayerCoin(); CoinPlayerCtrl.GetInstanceTwo().HiddenPlayerCoin(); YouLiangAddCtrl.GetInstance().HiddenYouLiangAdd(); YouLiangCtrl.GetInstance().HiddenYouLiang(); JiFenZongJieMianObj.SetActive(true); } else { XkGameCtrl.HiddenMissionCleanup(); if (Network.peerType == NetworkPeerType.Client) { if (NetCtrl.GetInstance() != null) { NetCtrl.GetInstance().TryCloseServerPort(); } } } System.GC.Collect(); if (XkPlayerCtrl.GetInstanceFeiJi() != null) { XkPlayerCtrl.GetInstanceFeiJi().StopPlayerMoveAudio(); } if (XkPlayerCtrl.GetInstanceTanKe() != null) { XkPlayerCtrl.GetInstanceTanKe().StopPlayerMoveAudio(); } JiFenJieMianObj.SetActive(true); if (XkGameCtrl.IsPlayGamePOne) { XunZhangJBCtrl.GetInstanceOne().ShowPlayerXunZhangJB(); } if (XkGameCtrl.IsPlayGamePTwo) { XunZhangJBCtrl.GetInstanceTwo().ShowPlayerXunZhangJB(); } pcvr.CloseGunZhenDongDengJi(); pcvr.CloseAllQiNangArray(); if (pcvr.GetInstance() != null) { pcvr.GetInstance().CloseFangXiangPanPower(PlayerEnum.Null); } Invoke("DelayForceRestartComPort", 0.5f); }