void CloseJuLiFuState() { if (!IsActiveJuLiFu) { return; } IsActiveJuLiFu = false; GlobalData.GetInstance().IsActiveJuLiFu = false; ActiveDaJuCtrl.SetTypeDaoJuList((int)DaoJuTypeIndex.juLiFu, 0); GameCtrlXK.GetInstance().ActivePlayerDaoJuType((int)DaoJuTypeIndex.Close); }
void CloseHuanYingFuState() { PlayerZhuanXiangVal = GameCtrlXK.PlayerZhuanXiangPTVal; if (!IsActiveHuanYingFu) { return; } CancelInvoke("CloseHuanYingFuState"); NengLiangQuanCtrl.GetInstance().MoveNengLiangQuanToStart(DaoJuTypeIndex.huanYingFu); CameraShake.GetInstance().SetRadialBlurActive(false, CameraShake.BlurStrengthHuanYingFu); CameraShake.GetInstance().SetIsActiveHuanYingFu(false); if (!IsActiveShenXingMode) { XingXingCtrl.IsPlayerCanHitNPC = true; PlayerAutoFire.IsActivePlayerForwardHit = false; PlayerBoxColObj.layer = LayerMask.NameToLayer("Default"); HuanYingFuObj.SetActive(false); } IsActiveHuanYingFu = false; HuanYingFengXiaoObj.SetActive(false); ActiveDaJuCtrl.SetTypeDaoJuList((int)DaoJuTypeIndex.huanYingFu, 0); GameCtrlXK.GetInstance().ActivePlayerDaoJuType((int)DaoJuTypeIndex.Close); }
///<summary> /// player hit obj key -> 0, player shooting obj key -> 1 ///</summary> void HandleHitShootObj(GameObject obj, int key) { switch (obj.tag) { case "TengManObj": if (key == 0) { TengManInfoCtrl.GetInstance().ShowTengManInfo(); } break; case "FuBingObj": if (key == 0) { ActiveIsHitFuBingObj(); } break; case "IntoBingLu": if (key == 0) { ActiveBingLuTrigger(); } break; case "OutBingLu": if (key == 0) { CloseBingLuTrigger(); } break; case "HuanWeiFuObj": ActiveDaJuCtrl.SetTypeDaoJuList((int)DaoJuTypeIndex.huanWeiFu, 1); GameCtrlXK.GetInstance().ActivePlayerDaoJuType((int)DaoJuTypeIndex.huanWeiFu); ShowDaoJuExplosion(obj); HitHuanWeiFuObj(); break; case "HuanYingFuObj": ActiveDaJuCtrl.SetTypeDaoJuList((int)DaoJuTypeIndex.huanYingFu, 1); GameCtrlXK.GetInstance().ActivePlayerDaoJuType((int)DaoJuTypeIndex.huanYingFu); ShowDaoJuExplosion(obj); NengLiangQuanCtrl.GetInstance().MoveNengLiangQuanToEnd(DaoJuTypeIndex.huanYingFu); DaoJuTiShiCtrl.GetInstance().ShowDaoJuTiShi(DaoJuState.HuanYingFu); PlayerZhuanXiangVal = GameCtrlXK.PlayerZhuanXiangJSVal; break; case "JuLiFuObj": ActiveDaJuCtrl.SetTypeDaoJuList((int)DaoJuTypeIndex.juLiFu, 1); GameCtrlXK.GetInstance().ActivePlayerDaoJuType((int)DaoJuTypeIndex.juLiFu); ShowDaoJuExplosion(obj); ActiveJuLiFuState(); DaoJuTiShiCtrl.GetInstance().ShowDaoJuTiShi(DaoJuState.JuLiFu); break; case "DianDaoFuObj": ActiveDaJuCtrl.SetTypeDaoJuList((int)DaoJuTypeIndex.dianDaoFu, 1); GameCtrlXK.GetInstance().ActivePlayerDaoJuType((int)DaoJuTypeIndex.dianDaoFu); ShowDaoJuExplosion(obj); HitDianDaoFuObj(); break; case "DingShenFuObj": ActiveDaJuCtrl.SetTypeDaoJuList((int)DaoJuTypeIndex.dingShenFu, 1); GameCtrlXK.GetInstance().ActivePlayerDaoJuType((int)DaoJuTypeIndex.dingShenFu); ShowDaoJuExplosion(obj); HitDingShenFuObj(); break; } }