Exemplo n.º 1
0
 protected void HandleAttack(AIBehaviors fsm, Transform target)
 {
     //         if ( scriptWithAttackMethod != null && !string.IsNullOrEmpty(methodName) )
     //{
     if (attackBasedOn.Equals(AttackMode.Animation))
     {
         HandleAnimationAttackMode(fsm, target);
     }
     else
     {
         HandleIntervalAttackMode(fsm, target);
     }
     //}
 }
Exemplo n.º 2
0
 protected void HandleAttack(AIBehaviors fsm, Transform target)
 {
     if (scriptWithAttackMethod != null && !string.IsNullOrEmpty(methodName))
     {
         if (attackBasedOn.Equals(AttackMode.Animation))
         {
             HandleAnimationAttackMode(fsm, target);
         }
         else
         {
             if (Time.time > firstAttackTime)
             {
                 Attack(fsm, target);
             }
         }
     }
 }