function Update () {
if(Input.GetButtonDown(fire1)){
}
}
what would i put in the if statement to play my animation
function Update () {
if(Input.GetButtonDown(fire1)){
}
}
what would i put in the if statement to play my animation
You’re going to want to do:
function Update()
{
if (Input.GetButtonDown(fire1))
{
Animation.CrossFade("MyAnimation");
}
}
or
function Update()
{
if (Input.GetButtonDown(fire1))
{
Animation.Play("MyAnimation");
}
}
It just depends if you have any other animations going.