//改变当前状态 public override void ChangeDecision(AIComponent.Decision newDecision) { m_previsousDecsion = m_currentDecision; m_previsousDecsion.Exit(this); m_currentDecision = m_decisions [newDecision]; m_currentDecision.Enter(this); }
public Heretic(BasicEntity entity) : base(entity) { m_enemeyTyep = PropertyComponent.CharacterType.Heretic; m_decisions = new Dictionary <AIComponent.Decision, BasicDecision <Heretic> > (); //根据枚举获取对应实例 foreach (AIComponent.Decision decision in containDecision) { m_decisions.Add(decision, CreateDecision(decision)); } //默认状态是巡逻状态 m_currentDecision = m_decisions [AIComponent.Decision.Patrol]; m_previsousDecsion = m_currentDecision; }