[Solved] Do we really need a Coroutine to stop dashing?

Wouldn’t it be sufficient to just use a delayed Invoke?

Something like this:

        private void Dash()
        {
            moveSpeed *= dashSpeed;
            Invoke(nameof(Undash), dashTime);
        }

        private void Undash()
        {
            moveSpeed /= dashSpeed;
        }

Right now it does work, but of course with adding more polishing stuff (like that trail renderer that’s about to come next) it might stop working this way…

Alright, the cooldown works better as a Coroutine :slight_smile:

Privacy & Terms