well, here is my script:
function Start() {
var curseur = GameObject.FindWithTag("curseur");
if (Input.GetKey ("f")) {
curseur.animation.Play("mouvementcurseur");
}
}
and nothing append when i press F
When i change my script as following:
function Start() {
var curseur = GameObject.FindWithTag("curseur");
yield WaitForSeconds(2);
curseur.animation.Play("mouvementcurseur");
}
It works perfectly… So what’s wrong in my first script?
I tried also this:
function Start() {
if (Input.GetButton ("Fire1")){
var curseur = GameObject.FindWithTag("curseur");
curseur.animation.Play("mouvementcurseur");
}
}
and the same… nothing happend… i realy don’t understand…