Example #1
0
 public virtual void Attack()
 {
     foreach (AttackPoint attackPoint in attackPoints)
     {
         attackPoint.enabled = true;
     }
     _event = new EventManager.Event(DisableAttackPoints, Time.time + attackDuration);
     EventManager.events.Add(_event);
     spriteRenderer.enabled = false;
 }
Example #2
0
 public override void DoUpdate()
 {
     if (attackIsReady)
     {
         attackIsReady       = false;
         attackPoint.enabled = true;
         _event = new EventManager.Event(delegate { attackPoint.enabled = false; }, Time.time + attackDuration);
         EventManager.events.Add(_event);
     }
 }
Example #3
0
 public virtual void Attack()
 {
     if (attackPointGroup != null)
     {
         attackPointGroup.enabled = true;
     }
     foreach (AttackPoint attackPoint in attackPoints)
     {
         if (attackPointGroup.enabled)
         {
             attackPoint.enabled = true;
         }
     }
     _event = new EventManager.Event(DisableAttackPoints, Time.time + attackDuration);
     EventManager.events.Add(_event);
 }