I want to have variables count the number of times that two separate keyboard keys are pressed.
I will have an animation file playing until one of the variables reaches say 10, when I want a different animation to play after that.
I have been trying to work out how to do this but have been stumped for quite a while so any advice would be appreciated.
I can see the pseudo code but am not sure how to put it in to unity:
play animation file
While Left OR Right != 10 do
{
if
KeyCode.LeftArrow pressed
THen Left = left + 1
if
KeyCode.RightArrow pressed
THen Right = Right + 1
}
if Left OR Right = 10 then
play second animation file