void Update() { if (cooldownTimer != 0) { cooldownTimer -= Time.deltaTime; if (cooldownTimer < 0) { cooldownTimer = 0; } return; } if (!previous.Finished) { return; } PlayerAbility activated = GetActivatedAbility(); if (activated) { Activate(activated); } }
internal void SetAbility(PlayerAbility playerAbility) { this.playerAbility = playerAbility; }