U3d extension Methods & Dotween & Tolua

Source: Internet
Author: User

usingUnityengine;usingSystem.Collections;usingLuainterface;//Tolua Spatial ReferencesusingDg. tweening;//dotween Spatial References Public Static classmyext{//extension methods must be in a static class     Public StaticTransform Lqdomove ( ThisTransform Root,stringSTR) {//must be a static method, the first parameter is this Transform, camera, etc.Debug.Log (str); returnRoot//return transform to implement chained calls    }     Public StaticTransform LQ1 ( ThisTransform Root) {Debug.Log ("lq1========================"); returnRoot; }     Public StaticTransform LQ2 ( ThisTransform Root) {Debug.Log ("lq2========================"); returnRoot; }     Public StaticTransform LQ3 ( ThisTransform Root) {Debug.Log ("lq3========================"); returnRoot; }} Public classHellolua:monobehaviour {//Use this for initialization    voidStart () {Debug.Log ("Start------------"); Luastate L=Newluastate (); stringLuapath = Application.datapath +"/lua";        L.start ();        L.addsearchpath (Luapath); L.dofile ("Hellolua.lua");        L.checktop ();        L.dispose (); Transform. Lqdomove ("lqdomove====================="). LQ1 (). LQ2 (). LQ3 ();//Chained callsTweener tw = transform. Domove (NewVector3 (2,2,2),1,false); tw.        Setease (Ease.inoutback); tw. Setloops (4, Looptype.restart); tw. OnComplete (()={Debug.Log ("oncomplete================================");    }); }        //Update is called once per frame    voidUpdate () {}}

U3d extension Methods & Dotween & Tolua

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.