Esempio n. 1
0
        public static NpcBehavior Create(NpcBehaviorType type)
        {
            switch (type)
            {
            case NpcBehaviorType.Neutral:
                return(new NeutralBehavior());

            case NpcBehaviorType.Aggressive:
                return(new AggressiveBehavior());

            case NpcBehaviorType.Passive:
                return(new PassiveBehavior());

            default:
                return(new PassiveBehavior());
            }
        }
Esempio n. 2
0
 protected NpcBehavior(NpcBehaviorType type)
 {
     Type = type;
 }
Esempio n. 3
0
 public virtual void SetBehavior(NpcBehaviorType npcBehaviorType)
 {
     m_BehaviorType = npcBehaviorType;
     InitBehavior();
 }