예제 #1
0
파일: AIAgent.cs 프로젝트: Lenzan/newmmo
        public AIAgent(Monster monster)
        {
            this.monster = monster;
            string ainame = this.monster.Define.AI;

            if (string.IsNullOrEmpty(ainame))
            {
                ainame = AIMonsterPassive.ID;
            }
            switch (ainame)
            {
            case AIMonsterPassive.ID:
                this.ai = new AIMonsterPassive(monster);
                break;

            case AIBoss.ID:
                this.ai = new AIBoss(monster);
                break;
            }
        }
예제 #2
0
        public AIAgent(Creature mons)
        {
            this.mons = mons;
            string ainame = mons.Define.AI;

            if (string.IsNullOrEmpty(ainame))
            {
                ainame = AIMonsterPassive.ID;
            }
            switch (ainame)
            {
            case AIMonsterPassive.ID:
                this.ai = new AIMonsterPassive(mons);
                break;

            case AIBoss.ID:
                this.ai = new AIBoss(mons);
                break;

            case AIPet.ID:
                this.ai = new AIPet(mons);
                break;
            }
        }