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()); } }
protected NpcBehavior(NpcBehaviorType type) { Type = type; }
public virtual void SetBehavior(NpcBehaviorType npcBehaviorType) { m_BehaviorType = npcBehaviorType; InitBehavior(); }