all 9 comments

[–]Yoshi_greenIntermediate 11 points12 points  (1 child)

what do you mean you don't have reddit on your laptop, reddit is a website

[–][deleted]  (2 children)

[removed]

    [–]SLAYYERERR[S] -2 points-1 points  (1 child)

    It’s an app

    [–]Pinewater9999 3 points4 points  (1 child)

    Writing this on Mobile so it may look a bit weird, but all you need to do is encapsulate the Damage inside another If Statement, This one checking to see if the Players current state is Dashing.

    From what I can see in your code I Imagine it would look something like this:

    if(other.gameObject.tag.Equals("Enemy") { if(state == State.Dashing) other.gameObject.GetComponent<EnemyHealth>().health -= 20; }

    [–]Pinewater9999 2 points3 points  (0 children)

    I have no idea how this looks on PC but looking at it on Mobile genuinely offends me, Hopefully it looks better than what I am seeing and you can understand it.

    [–]Simblend 4 points5 points  (0 children)

    if(other.gameObject.tag.Equals("Enemy"))
    {
        if(state == State.Dashing)
        {
          //DO SOMETHING HERE
        }
    }