iTween plug-in usage arrangement

iTween static methods

(1) MoveTo: Move from the original position to the target position
(2) MoveFrom: Move from the target position to the original position
(3) MoveAdd: Move the position of the game object over time, according to the amount provided
(4) MoveBy: Increase the provided coordinates To the position of the game object, refer to the blog link like MoveAdd

Use a hash table to add parameters (moveTo as an example)

Reference blog link

  iTween.MoveTo(gameObject, iTween.Hash
                  (
                     "x",1.91f,  
                     "y", 1.6f,  
                     "z",0f,    //目标位置
                     "speed", 18f,//移动的速度
                     "time", 120f,//移动的时间
                    "easeType",iTween.EaseType.easeOutCubic,//动画类型
                    "oncomplete", "End" //移动结束调用时调用End方法
                   )
           );
           
  1. ("onstart", "Start") //Call the Start method when starting to move
  2. ("onupdate". "On") //Call the "On" method during the movement
  3. Facing a point while moving: args.Add("looktarget", Vector3.zero);
  4. The speed at which the game object looks at the "looktarget": args.Add("looktime",0.8);
  5. Provide both "time" and "speed" parameters, the "speed" parameter will be used
  6. The target position represented by the three parameters "x", "y", and "z" can be replaced by "position", Vector3()

movement mode of easetype


When using: args.Add("easeType", iTween.EaseType.easeOutCubic)

Guess you like

Origin blog.csdn.net/qq_43666766/article/details/104459184