コード例 #1
0
 static int SetEndToCurrentValue(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         TweenWidth obj = (TweenWidth)ToLua.CheckObject(L, 1, typeof(TweenWidth));
         obj.SetEndToCurrentValue();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #2
0
 static public int set_from(IntPtr l)
 {
     try {
         TweenWidth   self = (TweenWidth)checkSelf(l);
         System.Int32 v;
         checkType(l, 2, out v);
         self.from = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #3
0
    /// <summary>
    /// Start the tweening operation.
    /// </summary>

    static public TweenWidth Begin(UIWidget widget, float duration, int width)
    {
        TweenWidth comp = UITweener.Begin <TweenWidth>(widget.gameObject, duration);

        comp.from = widget.width;
        comp.to   = width;

        if (duration <= 0f)
        {
            comp.Sample(1f, true);
            comp.enabled = false;
        }
        return(comp);
    }
コード例 #4
0
    /// <summary>
    /// Start the tweening operation.
    /// </summary>

    static public TweenWidth Begin(RectTransform tf, float duration, int width)
    {
        TweenWidth comp = UITweener.Begin <TweenWidth>(tf.gameObject, duration);

        comp.from = tf.sizeDelta.y;
        comp.to   = width;

        if (duration <= 0f)
        {
            comp.Sample(1f, true);
            comp.enabled = false;
        }
        return(comp);
    }
コード例 #5
0
 static public int set_updateTable(IntPtr l)
 {
     try {
         TweenWidth     self = (TweenWidth)checkSelf(l);
         System.Boolean v;
         checkType(l, 2, out v);
         self.updateTable = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #6
0
    public static TweenWidth Begin(UIWidget widget, float duration, int width)
    {
        //IL_0001: Unknown result type (might be due to invalid IL or missing references)
        //IL_0008: Expected O, but got Unknown
        TweenWidth tweenWidth = UITweener.Begin <TweenWidth>(widget.get_gameObject(), duration, true);

        tweenWidth.from = widget.width;
        tweenWidth.to   = width;
        if (duration <= 0f)
        {
            tweenWidth.Sample(1f, true);
            tweenWidth.set_enabled(false);
        }
        return(tweenWidth);
    }
コード例 #7
0
    static int get_value(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            TweenWidth obj = (TweenWidth)o;
            int        ret = obj.value;
            LuaDLL.lua_pushinteger(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index value on a nil value" : e.Message));
        }
    }
コード例 #8
0
    static int set_value(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            TweenWidth obj  = (TweenWidth)o;
            int        arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
            obj.value = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index value on a nil value" : e.Message));
        }
    }
コード例 #9
0
    static int get_from(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            TweenWidth obj = (TweenWidth)o;
            int        ret = obj.from;
            LuaDLL.lua_pushinteger(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index from on a nil value"));
        }
    }
コード例 #10
0
    static int set_from(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            TweenWidth obj  = (TweenWidth)o;
            int        arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
            obj.from = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index from on a nil value"));
        }
    }
コード例 #11
0
    public static int get_from(IntPtr l)
    {
        int result;

        try
        {
            TweenWidth tweenWidth = (TweenWidth)LuaObject.checkSelf(l);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, tweenWidth.from);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
コード例 #12
0
    public static int constructor(IntPtr l)
    {
        int result;

        try
        {
            TweenWidth o = new TweenWidth();
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
コード例 #13
0
    public static int SetEndToCurrentValue(IntPtr l)
    {
        int result;

        try
        {
            TweenWidth tweenWidth = (TweenWidth)LuaObject.checkSelf(l);
            tweenWidth.SetEndToCurrentValue();
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
コード例 #14
0
    static int get_cachedWidget(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            TweenWidth obj = (TweenWidth)o;
            UIWidget   ret = obj.cachedWidget;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index cachedWidget on a nil value" : e.Message));
        }
    }
コード例 #15
0
 static int Begin(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         UIWidget   arg0 = (UIWidget)ToLua.CheckUnityObject(L, 1, typeof(UIWidget));
         float      arg1 = (float)LuaDLL.luaL_checknumber(L, 2);
         int        arg2 = (int)LuaDLL.luaL_checknumber(L, 3);
         TweenWidth o    = TweenWidth.Begin(arg0, arg1, arg2);
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #16
0
    static int get_updateTable(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            TweenWidth obj = (TweenWidth)o;
            bool       ret = obj.updateTable;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index updateTable on a nil value" : e.Message));
        }
    }
コード例 #17
0
    static int set_updateTable(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            TweenWidth obj  = (TweenWidth)o;
            bool       arg0 = LuaDLL.luaL_checkboolean(L, 2);
            obj.updateTable = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index updateTable on a nil value" : e.Message));
        }
    }
コード例 #18
0
        static int __CreateInstance(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    TweenWidth __cl_gen_ret = new TweenWidth();
                    translator.Push(L, __cl_gen_ret);

                    return(1);
                }
            }
            catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to TweenWidth constructor!"));
        }
コード例 #19
0
 static public int Begin_s(IntPtr l)
 {
     try {
         UIWidget a1;
         checkType(l, 1, out a1);
         System.Single a2;
         checkType(l, 2, out a2);
         System.Int32 a3;
         checkType(l, 3, out a3);
         var ret = TweenWidth.Begin(a1, a2, a3);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #20
0
    IEnumerator playLight()
    {
        UISprite sprite = mLeftOrRigth ? LightLeft : LightRight;

        sprite.width  = Light_Width;
        sprite.height = Light_Height;

        sprite.gameObject.SetActive(true);

        TweenWidth.Begin(sprite, LightTime, Target_Width);
        yield return(new WaitForSeconds(LightTime));

        TweenHeight.Begin(sprite, LightTime, Target_Height);
        yield return(new WaitForSeconds(LightTime));

        sprite.gameObject.SetActive(false);

        StartCoroutine(DragonAppear());
    }
コード例 #21
0
    public static int set_value(IntPtr l)
    {
        int result;

        try
        {
            TweenWidth tweenWidth = (TweenWidth)LuaObject.checkSelf(l);
            int        value;
            LuaObject.checkType(l, 2, out value);
            tweenWidth.value = value;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
コード例 #22
0
    IEnumerator DragonEyeTwinke()
    {
        if (mLeftOrRigth)
        {
            TweenWidth.Begin(Dragon_EyeLeft, DragonEyeTime, Dragon_Left_Eye_Tar * 3);
            TweenHeight.Begin(Dragon_EyeLeft, DragonEyeTime, Dragon_Eye_Min_Height);
            yield return(new WaitForSeconds(DragonEyeTime));

            TweenWidth.Begin(Dragon_EyeLeft, DragonEyeTime, Dragon_Left_Eye_Src);
            TweenHeight.Begin(Dragon_EyeLeft, DragonEyeTime, Dragon_Eye_Max_Height);

            yield return(new WaitForSeconds(0.5f));

            for (int i = 0; i < 2; ++i)
            {
                TweenWidth.Begin(Dragon_EyeLeft, DragonEyeTwink, (int)(Dragon_Left_Eye_Src * 0.5f));
                yield return(new WaitForSeconds(DragonEyeTwink));

                TweenWidth.Begin(Dragon_EyeLeft, DragonEyeTwink, Dragon_Left_Eye_Src);
                yield return(new WaitForSeconds(DragonEyeTwink));
            }
        }
        else
        {
            TweenWidth.Begin(Dragon_EyeRight, DragonEyeTime, Dragon_Left_Eye_Tar * 3);
            TweenHeight.Begin(Dragon_EyeRight, DragonEyeTime, Dragon_Eye_Min_Height);
            yield return(new WaitForSeconds(DragonEyeTime));

            TweenWidth.Begin(Dragon_EyeRight, DragonEyeTime, Dragon_Left_Eye_Src);
            TweenHeight.Begin(Dragon_EyeRight, DragonEyeTime, Dragon_Eye_Max_Height);

            yield return(new WaitForSeconds(0.5f));

            for (int i = 0; i < 3; ++i)
            {
                TweenWidth.Begin(Dragon_EyeRight, DragonEyeTwink, (int)(Dragon_Left_Eye_Src * 0.5f));
                yield return(new WaitForSeconds(DragonEyeTwink));

                TweenWidth.Begin(Dragon_EyeRight, DragonEyeTwink, Dragon_Left_Eye_Src);
                yield return(new WaitForSeconds(DragonEyeTwink));
            }
        }
    }
コード例 #23
0
    public static int set_updateTable(IntPtr l)
    {
        int result;

        try
        {
            TweenWidth tweenWidth = (TweenWidth)LuaObject.checkSelf(l);
            bool       updateTable;
            LuaObject.checkType(l, 2, out updateTable);
            tweenWidth.updateTable = updateTable;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
コード例 #24
0
        static int _m_SetEndToCurrentValue(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            TweenWidth __cl_gen_to_be_invoked = (TweenWidth)translator.FastGetCSObj(L, 1);


            try {
                {
                    __cl_gen_to_be_invoked.SetEndToCurrentValue(  );



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
コード例 #25
0
    private static int set_value(IntPtr L)
    {
        object     luaObject  = LuaScriptMgr.GetLuaObject(L, 1);
        TweenWidth tweenWidth = (TweenWidth)luaObject;

        if (tweenWidth == null)
        {
            LuaTypes luaTypes = LuaDLL.lua_type(L, 1);
            if (luaTypes == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name value");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index value on a nil value");
            }
        }
        tweenWidth.value = (int)LuaScriptMgr.GetNumber(L, 3);
        return(0);
    }
コード例 #26
0
    private static int get_updateTable(IntPtr L)
    {
        object     luaObject  = LuaScriptMgr.GetLuaObject(L, 1);
        TweenWidth tweenWidth = (TweenWidth)luaObject;

        if (tweenWidth == null)
        {
            LuaTypes luaTypes = LuaDLL.lua_type(L, 1);
            if (luaTypes == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name updateTable");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index updateTable on a nil value");
            }
        }
        LuaScriptMgr.Push(L, tweenWidth.updateTable);
        return(1);
    }
コード例 #27
0
    public override void OnInspectorGUI()
    {
        GUILayout.Space(6f);
        EditorGUIUtility.labelWidth = 120f;
        TweenWidth tw = target as TweenWidth;

        GUI.changed = false;

        float from = EditorGUILayout.FloatField("From", tw.from);
        float to   = EditorGUILayout.FloatField("To", tw.to);

        if (GUI.changed)
        {
            RegisterUndo("Tween Change", tw);
            tw.from = from;
            tw.to   = to;
            EditorUtility.SetDirty(tw);
        }

        DrawCommonProperties();
    }
コード例 #28
0
    static int set_from(IntPtr L)
    {
        object     o   = LuaScriptMgr.GetLuaObject(L, 1);
        TweenWidth obj = (TweenWidth)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name from");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index from on a nil value");
            }
        }

        obj.from = (int)LuaScriptMgr.GetNumber(L, 3);
        return(0);
    }
コード例 #29
0
    static int set_updateTable(IntPtr L)
    {
        object     o   = LuaScriptMgr.GetLuaObject(L, 1);
        TweenWidth obj = (TweenWidth)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name updateTable");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index updateTable on a nil value");
            }
        }

        obj.updateTable = LuaScriptMgr.GetBoolean(L, 3);
        return(0);
    }
コード例 #30
0
    static int get_to(IntPtr L)
    {
        object     o   = LuaScriptMgr.GetLuaObject(L, 1);
        TweenWidth obj = (TweenWidth)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name to");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index to on a nil value");
            }
        }

        LuaScriptMgr.Push(L, obj.to);
        return(1);
    }