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; }
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); } }
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); }