Beispiel #1
0
        /// <summary>
        /// 怪物死亡
        /// </summary>
        override public void AgentDie()
        {
            if (agent.isDead)
            {
                return;
            }

            agent.isDead = true;

            ExploreUICotroller expUICtr = bmUICtr.GetComponent <ExploreUICotroller> ();

            expUICtr.QuitFight();

            StopCoroutinesWhenFightEnd();

            bpCtr.StopCoroutinesWhenFightEnd();

            this.armatureCom.animation.Stop();

            CancelInvoke();

            boxCollider.enabled = false;

            exploreManager.GetComponent <ExploreManager>().BattlePlayerWin(new Transform[] { transform });

            PlayRoleAnim("die", 1, delegate {
                exploreManager.GetComponent <MapGenerator>().AddMonsterToPool(this);
            });
        }
        public void RefrestCurrentLevel()
        {
            mapGenerator.PrepareToResetMap();

            PlayerData playerData = GameManager.Instance.persistDataManager.LoadPlayerData();

            Player.mainPlayer.SetUpPlayerWithPlayerData(playerData);

            int gameLevel = Player.mainPlayer.currentLevelIndex;

            GameLevelData levelData = GameManager.Instance.gameDataCenter.gameLevelDatas [gameLevel];

            battlePlayerCtr.ResetAgent();

            if (monsterEntered != null)
            {
                monsterEntered.GetComponent <BattleMonsterController> ().ResetAgent();
                monsterEntered = null;
            }


            expUICtr.QuitFight();

            SetUpExploreView(levelData);
        }
Beispiel #3
0
        /// <summary>
        /// 玩家在战斗中失败
        /// </summary>
        public void BattlePlayerLose()
        {
            // 清除战斗中技能带来的属性变化
            battlePlayerCtr.agent.ClearPropertyChangesFromSkill();
            battleMonsterCtr.agent.ClearPropertyChangesFromSkill();

            battleMonsterCtr.agent.ResetBattleAgentProperties(false);

            battlePlayerCtr.SetRoleAnimTimeScale(1.0f);
            battleMonsterCtr.SetRoleAnimTimeScale(1.0f);

            FightEndCallBacks();

            battleMonsterCtr.ResetToWaitAfterCurrentRoleAnimEnd();

            expUICtr.QuitFight();

            expUICtr.ShowBuyLifeQueryHUD();
        }