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 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(); }
// Use this for initialization void Start() { Instance = this; PlayerYouLiangCount = 0; bool isSelectYouLiang2 = false; if (XkGameCtrl.SelectYouLiangUI == 2) { isSelectYouLiang2 = true; } YouLiangBuZuObj.SetActive(!isSelectYouLiang2); YouLiangJDSprite.gameObject.SetActive(!isSelectYouLiang2); YouLiangZheDangObj.SetActive(isSelectYouLiang2); for (int i = 0; i < YouLiangJDSpriteArray.Length; i++) { YouLiangJDSpriteArray[i].gameObject.SetActive(isSelectYouLiang2); YouLiangBuZuObjArray[i].SetActive(false); if (i == 0) { YouLiangBanYuanP1[i].SetActive(false); YouLiangBanYuanP2[i].SetActive(false); } else { YouLiangBanYuanP1[i].SetActive(isSelectYouLiang2); YouLiangBanYuanP2[i].SetActive(isSelectYouLiang2); } } SetActiveYouLiangFlash(false); }
public void StartPlayDaoJiShi() { if (IsPlayDaoJishi) { return; } IsPlayDaoJishi = true; DaoJiShiCount = 9; DaoJiShiSprite.spriteName = "daoJiShi9"; DaoJiShiObj.SetActive(true); ContinueGameObj.SetActive(true); ShowDaoJiShiInfo(); XKGlobalData.GetInstance().StopAudioRanLiaoJingGao(); YouLiangCtrl.GetInstance().SetActiveYouLiangFlash(false); IsActivePlayerOne = XkGameCtrl.IsActivePlayerOne; IsActivePlayerTwo = XkGameCtrl.IsActivePlayerTwo; }
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); }
// Use this for initialization void Start() { Instance = this; SetActiveYouLiangFlash(false); }