Here is my code. In the logs i have “i am in the move02” but the itween path is not launching… i don’t know why…Could you help me ? (the move01 is working perfect because it’s my start…)
using UnityEngine;
using System.Collections;
public class Move_tuto : MonoBehaviour {
int step = 1;
void Update() {
if(gameObject.transform.position.x == 3 && gameObject.transform.position.z == -3){
step = 2;
}
if(gameObject.transform.position.x == 3 && gameObject.transform.position.z == -18)
step = 3;
if(step == 1){
move01();
step = 200;
}
if(step == 2){
move02();
step = 300;
}
}
void move01(){
iTween.MoveTo(gameObject, iTween.Hash("path", iTweenPath.GetPath("tuto"),"easetype", "linear", "delay", 1.20, "time", 1.04));
}
void move02(){
iTween.MoveTo(gameObject, iTween.Hash("path", iTweenPath.GetPath("tutos"),"easetype", "easeOutCirc", "delay", 0.01, "time", 2.33));
Debug.Log ("I am in the move02");
}
}
I am sure for the path’s names. I added delay on the 2nd because it didn’t work…