Exemple #1
0
 protected override void OnDie(FBRole role)
 {
     base.OnDie(role);
     if (f_animator.gameObject.activeSelf)
     {
         f_animator.SetBool("IsDead", true);
     }
 }
Exemple #2
0
        private void CarrotDead(FBRole carrot)
        {
            FBGame.Instance.ObjectPool.Unspawn(carrot.gameObject);

            FBGameModel gameModel = GetModel <FBGameModel>();

            SendEvent(FBConsts.E_LevelEnd, new FBEndLevelArgs()
            {
                ID = gameModel.PlayLevelIndex, IsWin = false
            });
        }
Exemple #3
0
        private void MonsterDead(FBRole monster)
        {
            //回收
            FBGame.Instance.ObjectPool.Unspawn(monster.gameObject);

            GameObject[] monsters   = GameObject.FindGameObjectsWithTag("Monster");
            FBRoundModel roundModel = GetModel <FBRoundModel>();

            //  萝卜没死             场景上已没有怪物           所有怪物已出完
            if (!f_carrot.IsDead && monsters.Length <= 0 && roundModel.AllRoundComplete)
            {
                FBGameModel gameModel = GetModel <FBGameModel>();
                //游戏胜利
                SendEvent(FBConsts.E_LevelEnd, new FBEndLevelArgs()
                {
                    ID = gameModel.PlayLevelIndex, IsWin = true
                });
            }
        }
Exemple #4
0
 protected virtual void OnDie(FBRole role)
 {
 }