Hello,
I made animation with doors and when I press once e it will play animation and door are open for now. However when I press E again it will repeat action which opens doors. How can I lock E button and unlock it when for example R is pressed which opens doors and other way around ? What I want to achieve is only to stop repeating animation when user press E button again instead of repeating the animation again. Will I need to make IDLE animation ?
That is my code:
function Update ()
{
if (Input.GetKeyDown("e"))
{
animation.Play("Myanimationfile");
}
Every help is appreciated.
Thanks