ITween concept Learning, has been itween.moveto as an example

Source: Internet
Author: User

usingUnityengine;
usingSystem.Collections;

Public class Movecube : Monobehaviour
{

         Public Gameobject Targetgameobject;
         Public float  Time = 4f;
         Public ITween.Easetype Easetype;

        void Update ()
        {   
       
                if (Input.Getmousebuttondown (0)) {
                        //ITween.MoveTo(Targetgameobject,New Vector3(4,4,0), Time);    


//            Hashtable args=New Hashtable();
//            args.ADD("x",3);//control only the position of x  the front is the key The following refers to 
//            args.ADD("y",5);
//            args.ADD(" Time",4); //Exercise time 4 seconds
//            args.ADD("Delay",1);//delay 1 seconds
//            args.ADD("OnComplete","onupdatefunction");//Monitor MoveTo callback function
//            args.ADD("Looptype","Pingpong");
                        Hashtable args = ITween.Hash ("x", 4, " Time", 2, "Easetype", Easetype);
                        ITween.MoveTo (Targetgameobject, args);
        
                }

                if (Input.Getmousebuttondown (1)) {

                        Hashtable args = ITween.Hash ("x", 0, " Time", 2, "Easetype", Easetype);
                        ITween.MoveTo (Targetgameobject, args);
                }

        }

         Public  void onupdatefunction ()
        {

                Print ("performed a");

        }

}

This article is from the computer blog, so be sure to keep this source http://5152481.blog.51cto.com/5142481/1601430

ITween concept Learning, has been itween.moveto as an example

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.