Hi guys ! I’ve created this script
void Start ()
{
instance = this;
NumDoor = 0;
}
void Update()
{
OpenDoor();
}
public void OpenDoor()
{
if (NumDoor >= 1)
{
BigDoor.Play("BigDoor 001");
}
}
Now the OpenDoor was called every frame, but i want to call it only one time just to play the animation, what is the correct script ?