Exemple #1
0
    public static BETween scale(GameObject go, float _duration, Vector3 _from, Vector3 _scale)
    {
        BETween tween = add(go, _duration, BETweenType.scale);

        tween.from      = _from;
        tween.to        = _scale;
        tween.current   = tween.from;
        tween.applyFrom = true;
        return(tween);
    }
Exemple #2
0
    public static BETween rotation(GameObject go, float _duration, Vector3 _rot)
    {
        BETween tween = add(go, _duration, BETweenType.rotation);

        tween.from      = tween.tr.localRotation.eulerAngles;
        tween.to        = _rot;
        tween.current   = tween.from;
        tween.applyFrom = false;
        return(tween);
    }
Exemple #3
0
    public static BETween rotation(GameObject go, float _duration, Vector3 _from, Vector3 _rot)
    {
        BETween tween = add(go, _duration, BETweenType.rotation);

        tween.from      = _from;
        tween.to        = _rot;
        tween.current   = tween.from;
        tween.applyFrom = true;
        return(tween);
    }
Exemple #4
0
    public static BETween position(GameObject go, float _duration, Vector3 _pos)
    {
        BETween tween = add(go, _duration, BETweenType.position);

        tween.from      = tween.tr.localPosition;
        tween.to        = _pos;
        tween.current   = tween.from;
        tween.applyFrom = false;
        return(tween);
    }
Exemple #5
0
    public void ShowProcess()
    {
        gameObject.transform.localPosition = Vector3.zero;
        gameObject.SetActive(true);

        gameObject.GetComponent <Image>().color   = new Color32(0, 0, 0, 0);
        Dialog.transform.localScale               = new Vector3(0.7f, 0.7f, 0.7f);
        Dialog.GetComponent <CanvasGroup>().alpha = 0;
        BETween.scale(Dialog.gameObject, 0.2f, new Vector3(0.7f, 0.7f, 0.7f), new Vector3(1, 1, 1)).method = BETweenMethod.easeOutBack;
        BETween.alpha(Dialog.gameObject, 0.2f, 0.0f, 1.0f).method = BETweenMethod.easeOut;
        BETween.alpha(gameObject, 0.2f, 0.0f, 0.5f).method        = BETweenMethod.easeOut;
    }
Exemple #6
0
 static int Clear(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         BETween obj = (BETween)ToLua.CheckObject(L, 1, typeof(BETween));
         obj.Clear();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemple #7
0
 static int SetLoopStylee(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         BETween obj  = (BETween)ToLua.CheckObject(L, 1, typeof(BETween));
         int     arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         obj.SetLoopStylee(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemple #8
0
 static int ApplyValue(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         BETween             obj  = (BETween)ToLua.CheckObject(L, 1, typeof(BETween));
         UnityEngine.Vector3 arg0 = ToLua.ToVector3(L, 2);
         obj.ApplyValue(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemple #9
0
    static int get_image(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BETween obj = (BETween)o;
            UnityEngine.UI.Graphic ret = obj.image;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index image on a nil value" : e.Message));
        }
    }
Exemple #10
0
    static int get_onFinish(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BETween       obj = (BETween)o;
            System.Action ret = obj.onFinish;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index onFinish on a nil value" : e.Message));
        }
    }
Exemple #11
0
    static int get_ignoreTimeScale(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BETween obj = (BETween)o;
            bool    ret = obj.ignoreTimeScale;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index ignoreTimeScale on a nil value" : e.Message));
        }
    }
Exemple #12
0
    static int set_image(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BETween obj = (BETween)o;
            UnityEngine.UI.Graphic arg0 = (UnityEngine.UI.Graphic)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.UI.Graphic));
            obj.image = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index image on a nil value" : e.Message));
        }
    }
Exemple #13
0
    static int get_duration(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BETween obj = (BETween)o;
            float   ret = obj.duration;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index duration on a nil value" : e.Message));
        }
    }
Exemple #14
0
    static int set_delay(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BETween obj  = (BETween)o;
            float   arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
            obj.delay = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index delay on a nil value" : e.Message));
        }
    }
Exemple #15
0
    static int get_current(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BETween             obj = (BETween)o;
            UnityEngine.Vector3 ret = obj.current;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index current on a nil value" : e.Message));
        }
    }
Exemple #16
0
    static int set_current(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BETween             obj  = (BETween)o;
            UnityEngine.Vector3 arg0 = ToLua.ToVector3(L, 2);
            obj.current = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index current on a nil value" : e.Message));
        }
    }
Exemple #17
0
    static int set_loopCount(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BETween obj  = (BETween)o;
            int     arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
            obj.loopCount = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index loopCount on a nil value" : e.Message));
        }
    }
Exemple #18
0
    static int set_meshRender(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BETween obj = (BETween)o;
            UnityEngine.MeshRenderer arg0 = (UnityEngine.MeshRenderer)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.MeshRenderer));
            obj.meshRender = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index meshRender on a nil value" : e.Message));
        }
    }
Exemple #19
0
    static int set_canvasGroup(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BETween obj = (BETween)o;
            UnityEngine.CanvasGroup arg0 = (UnityEngine.CanvasGroup)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.CanvasGroup));
            obj.canvasGroup = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index canvasGroup on a nil value" : e.Message));
        }
    }
Exemple #20
0
    static int set_text(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BETween        obj  = (BETween)o;
            TMPro.TMP_Text arg0 = (TMPro.TMP_Text)ToLua.CheckUnityObject(L, 2, typeof(TMPro.TMP_Text));
            obj.text = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index text on a nil value" : e.Message));
        }
    }
Exemple #21
0
    static int get_text(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BETween        obj = (BETween)o;
            TMPro.TMP_Text ret = obj.text;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index text on a nil value" : e.Message));
        }
    }
Exemple #22
0
    static int set_ignoreTimeScale(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BETween obj  = (BETween)o;
            bool    arg0 = LuaDLL.luaL_checkboolean(L, 2);
            obj.ignoreTimeScale = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index ignoreTimeScale on a nil value" : e.Message));
        }
    }
Exemple #23
0
 static int Transition(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         BETween       obj  = (BETween)ToLua.CheckObject(L, 1, typeof(BETween));
         BETweenMethod arg0 = (BETweenMethod)ToLua.CheckObject(L, 2, typeof(BETweenMethod));
         float         arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
         float         o    = obj.Transition(arg0, arg1);
         LuaDLL.lua_pushnumber(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemple #24
0
    static int get_loopStyle(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BETween     obj = (BETween)o;
            BETweenLoop ret = obj.loopStyle;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index loopStyle on a nil value" : e.Message));
        }
    }
Exemple #25
0
    static int set_method(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BETween       obj  = (BETween)o;
            BETweenMethod arg0 = (BETweenMethod)ToLua.CheckObject(L, 2, typeof(BETweenMethod));
            obj.method = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index method on a nil value" : e.Message));
        }
    }
Exemple #26
0
    static int set_rt(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BETween obj = (BETween)o;
            UnityEngine.RectTransform arg0 = (UnityEngine.RectTransform)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.RectTransform));
            obj.rt = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index rt on a nil value" : e.Message));
        }
    }
Exemple #27
0
    static int set_loopStyle(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BETween     obj  = (BETween)o;
            BETweenLoop arg0 = (BETweenLoop)ToLua.CheckObject(L, 2, typeof(BETweenLoop));
            obj.loopStyle = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index loopStyle on a nil value" : e.Message));
        }
    }
Exemple #28
0
 static int add(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckUnityObject(L, 1, typeof(UnityEngine.GameObject));
         float       arg1            = (float)LuaDLL.luaL_checknumber(L, 2);
         BETweenType arg2            = (BETweenType)ToLua.CheckObject(L, 3, typeof(BETweenType));
         BETween     o = BETween.add(arg0, arg1, arg2);
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemple #29
0
    static int get_loopCount(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BETween obj = (BETween)o;
            int     ret = obj.loopCount;
            LuaDLL.lua_pushinteger(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index loopCount on a nil value" : e.Message));
        }
    }
Exemple #30
0
 public virtual void OnPointerUp(PointerEventData eventData)
 {
     if (colorTweenObj)
     {
         btColor = BETween.color(colorTweenObj, duration, fromColor);
     }
     for (int i = 0; i < showObjs.Count; i++)
     {
         showObjs[i].SetActive(false);
     }
     for (int i = 0; i < hideObjs.Count; i++)
     {
         hideObjs[i].SetActive(true);
     }
     if (scaleTweenObj)
     {
         btScale = BETween.scale(scaleTweenObj, duration, new Vector3(preScale.x * toScale, preScale.y * toScale, preScale.z), preScale);
     }
 }