Ejemplo n.º 1
0
 public void SetActionState(float distanceToHero, float distanceToBuddy)
 {
     if (distanceToHero <= me.sightLength)
     {
         actionState = SGE_MONSTER_ACTION_STATE.TRACE_HERO;
         if (distanceToHero <= 1f)
         {
             actionState = SGE_MONSTER_ACTION_STATE.ATTACK_TO_HERO;
         }
     }
     else if (distanceToBuddy <= me.sightLength)
     {
         actionState = SGE_MONSTER_ACTION_STATE.TRACE_DESTINATION;
         if (distanceToBuddy <= 1f)
         {
             actionState = SGE_MONSTER_ACTION_STATE.ATTACK_TO_BASE;
         }
     }
     else if (actionState != SGE_MONSTER_ACTION_STATE.ATTACK_TO_BASE)
     {
         actionState = SGE_MONSTER_ACTION_STATE.TRACE_DESTINATION;
     }
 }
Ejemplo n.º 2
0
 public void AttackBase()
 {
     actionState = SGE_MONSTER_ACTION_STATE.ATTACK_TO_BASE;
 }