Пример #1
0
        public override void Init(IAIState aiState)
        {
            base.Init(aiState);
            if (aiState.MonsterData != null)
            {
                switch (aiState.MonsterData.AIType) //根据怪物的状态初始化
                {
                case EnumMonsterAIType.Trigger:     //直接就是追踪状态
                    aiState.SetState(EnumAILogicState.ZJ, EnumAIActionState.Wait, null);
                    break;

                case EnumMonsterAIType.GoOnPatrol:    //先是巡逻状态
                    aiState.SetState(EnumAILogicState.XL, EnumAIActionState.Wait, null);
                    break;

                case EnumMonsterAIType.Boss:    //固定型
                    aiState.SetState(EnumAILogicState.GD, EnumAIActionState.Wait, null);
                    break;
                }
            }
        }