usingUnityEngine;
usingSystem.Collections;

publicclassMoveCube:MonoBehaviour
{

publicGameObjecttargetGameObject;
publicfloattime=4f;
publiciTween.EaseTypeeaseType;

voidUpdate()
{

if(Input.GetMouseButtonDown(0)){
//iTween.MoveTo(targetGameObject,newVector3(4,4,0),time);


//Hashtableargs=newHashtable();
//args.Add("x",3);//只控制X的位置前面是键后面是指
//args.Add("y",5);
//args.Add("time",4);//运动时间4秒
//args.Add("delay",1);//延迟1秒
//args.Add("oncomplete","onupdatefunction");//监测MOVETO回调函数
//args.Add("looptype","pingpong");
Hashtableargs=iTween.Hash("x",4,"time",2,"easeType",easeType);
iTween.MoveTo(targetGameObject,args);

}

if(Input.GetMouseButtonDown(1)){

Hashtableargs=iTween.Hash("x",0,"time",2,"easeType",easeType);
iTween.MoveTo(targetGameObject,args);
}

}

publicvoidonupdatefunction()
{

print("执行了");

}

}