///<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;
        }
    }
コード例 #2
0
 // Use this for initialization
 void Start()
 {
     TiShiSprite = GetComponent <UISprite>();
     _Instance   = this;
     gameObject.SetActive(false);
 }