public MyBotBehaviorBase GetBehavior(BotDesireType desire) { BotBehaviorType behaviorType = m_selectedBehaviors[(int)desire]; switch (behaviorType) { case BotBehaviorType.IGNORE: return null; case BotBehaviorType.PATROL: return new MyBotBehaviorPatrol(); case BotBehaviorType.FOLLOW: return new MyBotBehaviorFollow(); case BotBehaviorType.ATTACK: return new MyBotBehaviorAttack(); case BotBehaviorType.RUN_AWAY: return new MyBotBehaviorRunAway(); case BotBehaviorType.PANIC: return new MyBotBehaviorPanic(); case BotBehaviorType.KAMIKADZE: return new MyBotBehaviorKamikadze(); case BotBehaviorType.IDLE: return new MyBotBehaviorIdle(); case BotBehaviorType.CURIOUS: return new MyBotBehaviorCurious(); } System.Diagnostics.Debug.Fail("Unexpected behavior: " + behaviorType); return null; }
public MyBotBehaviorBase GetBehavior(BotDesireType desire) { BotBehaviorType behaviorType = m_selectedBehaviors[(int)desire]; switch (behaviorType) { case BotBehaviorType.IGNORE: return(null); case BotBehaviorType.PATROL: return(new MyBotBehaviorPatrol()); case BotBehaviorType.FOLLOW: return(new MyBotBehaviorFollow()); case BotBehaviorType.ATTACK: return(new MyBotBehaviorAttack()); case BotBehaviorType.RUN_AWAY: return(new MyBotBehaviorRunAway()); case BotBehaviorType.PANIC: return(new MyBotBehaviorPanic()); case BotBehaviorType.KAMIKADZE: return(new MyBotBehaviorKamikadze()); case BotBehaviorType.IDLE: return(new MyBotBehaviorIdle()); case BotBehaviorType.CURIOUS: return(new MyBotBehaviorCurious()); } System.Diagnostics.Debug.Fail("Unexpected behavior: " + behaviorType); return(null); }
public BotBehaviorType GetBehaviorType(BotDesireType desire) { return(m_selectedBehaviors[(int)desire]); }
public bool IsIgnored(BotDesireType desire) { return(m_selectedBehaviors[(int)desire] == BotBehaviorType.IGNORE); }
public bool IsIgnored(BotDesireType desire) { return m_selectedBehaviors[(int)desire] == BotBehaviorType.IGNORE; }
public BotBehaviorType GetBehaviorType(BotDesireType desire) { return m_selectedBehaviors[(int)desire]; }
public MyBotDesire(BotDesireType desireType) { DesireType = desireType; }