예제 #1
0
 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;
 }
예제 #2
0
        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);
        }
예제 #3
0
 public BotBehaviorType GetBehaviorType(BotDesireType desire)
 {
     return(m_selectedBehaviors[(int)desire]);
 }
예제 #4
0
 public bool IsIgnored(BotDesireType desire)
 {
     return(m_selectedBehaviors[(int)desire] == BotBehaviorType.IGNORE);
 }
예제 #5
0
 public bool IsIgnored(BotDesireType desire)
 {
     return m_selectedBehaviors[(int)desire] == BotBehaviorType.IGNORE;
 }
예제 #6
0
 public BotBehaviorType GetBehaviorType(BotDesireType desire)
 {
     return m_selectedBehaviors[(int)desire];
 }
예제 #7
0
 public MyBotDesire(BotDesireType desireType)
 {
     DesireType = desireType;
 }
예제 #8
0
 public MyBotDesire(BotDesireType desireType)
 {
     DesireType = desireType;
 }