I am using a UI button and i have 2 values onclick but i dont know how active one for one.
1 Answer
1bool isAnimation1Played = false;
public void OnClickMethod()
{
if(!isAnimation1Played)
{
PlayAnimation1();
isAnimation1Played = true;
}
else
{
PlayAnimation2();
isAnimation1Played = false;
}
}
ty so much i am not really think very well and now i can see its very simple and now just i need put a time to refresh the hits ty so much!
– darkbatu21
@darkbatu21 bool isAnimation1Played = false; public void OnClickMethod() { if(!isAnimation1Played) { PlayAnimation1(); isAnimation1Played = true; } else { PlayAnimation2(); isAnimation1Played = false; } }
– saud_ahmed020