hi
i am trying to make 2D side-scroller game where my character(4 leg animal) just running and jumping(signal & double) so basically my question is i have one png file in that includes 4 frame for running & 8 frame for jumping so how can i define in the script that when i pressed space then use the jump frames and hide the run fames and when i land on the ground then start again my running frames
basically running is automatically no need to control just one key control space to jump and double space to double jump .
any idea how to do that in unity
Thanks