コード例 #1
0
        /// <summary>
        /// 遭遇怪物时的响应方法
        /// </summary>
        /// <param name="monsterTrans">Monster trans.</param>
        public void EnterMonster(Transform monsterTrans)
        {
            DisableInteractivity();

            monsterEntered = monsterTrans;

            battlePlayerCtr.isInFight = true;

            battleMonsterCtr = monsterTrans.GetComponent <BattleMonsterController> ();

            battleMonsterCtr.InitMonster(monsterTrans);

            SetUpForFight();
        }
コード例 #2
0
        /// <summary>
        /// 遭遇怪物时的响应方法
        /// </summary>
        /// <param name="monsterTrans">Monster trans.</param>
        public void EnterFight(Transform monsterTrans)
        {
            // 禁止寻路点击
            DisableAllInteractivity();


            battleMonsterCtr = monsterTrans.GetComponent <BattleMonsterController> ();
            // 初始化怪物
            battleMonsterCtr.InitMonster(monsterTrans);

            // 设置敌人
            battlePlayerCtr.SetEnemy(battleMonsterCtr);
            battleMonsterCtr.SetEnemy(battlePlayerCtr);
        }