示例#1
0
    static int get_direction(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCUITweener obj = (BCUITweener)o;
            int         ret = obj.direction;
            LuaDLL.lua_pushinteger(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index direction on a nil value"));
        }
    }
示例#2
0
    static int set_method(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCUITweener        obj  = (BCUITweener)o;
            BCUITweener.Method arg0 = (BCUITweener.Method)ToLua.CheckObject(L, 2, typeof(BCUITweener.Method));
            obj.method = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index method on a nil value"));
        }
    }
示例#3
0
    static int set_tWePoint(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCUITweener obj  = (BCUITweener)o;
            float[]     arg0 = ToLua.CheckNumberArray <float>(L, 2);
            obj.tWePoint = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index tWePoint on a nil value"));
        }
    }
示例#4
0
    static int set_eventReceiver(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCUITweener            obj  = (BCUITweener)o;
            UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckObject(L, 2, typeof(UnityEngine.GameObject));
            obj.eventReceiver = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index eventReceiver on a nil value"));
        }
    }
示例#5
0
    static int set_duration(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCUITweener obj  = (BCUITweener)o;
            float       arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
            obj.duration = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index duration on a nil value"));
        }
    }
示例#6
0
    static int set_onFinished(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCUITweener obj = (BCUITweener)o;
            UnityEngine.Events.UnityEvent arg0 = (UnityEngine.Events.UnityEvent)ToLua.CheckObject <UnityEngine.Events.UnityEvent>(L, 2);
            obj.onFinished = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index onFinished on a nil value"));
        }
    }
示例#7
0
    static int get_steeperCurves(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCUITweener obj = (BCUITweener)o;
            bool        ret = obj.steeperCurves;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index steeperCurves on a nil value"));
        }
    }
示例#8
0
    static int set_animationCurve(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCUITweener obj = (BCUITweener)o;
            UnityEngine.AnimationCurve arg0 = (UnityEngine.AnimationCurve)ToLua.CheckObject(L, 2, typeof(UnityEngine.AnimationCurve));
            obj.animationCurve = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index animationCurve on a nil value"));
        }
    }
示例#9
0
    static int get_animationCurve(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCUITweener obj = (BCUITweener)o;
            UnityEngine.AnimationCurve ret = obj.animationCurve;
            ToLua.PushSealed(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index animationCurve on a nil value"));
        }
    }
示例#10
0
    static int get_ignoreTimeScale(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCUITweener obj = (BCUITweener)o;
            bool        ret = obj.ignoreTimeScale;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index ignoreTimeScale on a nil value"));
        }
    }
示例#11
0
    static int get_playReverseWhenClose(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCUITweener obj = (BCUITweener)o;
            bool        ret = obj.playReverseWhenClose;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index playReverseWhenClose on a nil value"));
        }
    }
示例#12
0
    static int get_style(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCUITweener       obj = (BCUITweener)o;
            BCUITweener.Style ret = obj.style;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index style on a nil value"));
        }
    }
示例#13
0
    static int set_callWhenFinished(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCUITweener obj  = (BCUITweener)o;
            string      arg0 = ToLua.CheckString(L, 2);
            obj.callWhenFinished = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index callWhenFinished on a nil value"));
        }
    }
示例#14
0
    static int set_style(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCUITweener       obj  = (BCUITweener)o;
            BCUITweener.Style arg0 = (BCUITweener.Style)ToLua.CheckObject(L, 2, typeof(BCUITweener.Style));
            obj.style = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index style on a nil value"));
        }
    }
示例#15
0
    static int get_tWePoint(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCUITweener obj = (BCUITweener)o;
            float[]     ret = obj.tWePoint;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index tWePoint on a nil value"));
        }
    }
示例#16
0
    static int set_playReverseWhenClose(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCUITweener obj  = (BCUITweener)o;
            bool        arg0 = LuaDLL.luaL_checkboolean(L, 2);
            obj.playReverseWhenClose = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index playReverseWhenClose on a nil value"));
        }
    }
示例#17
0
    static int get_onWePointed3(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCUITweener obj = (BCUITweener)o;
            UnityEngine.Events.UnityEvent ret = obj.onWePointed3;
            ToLua.PushObject(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index onWePointed3 on a nil value"));
        }
    }
示例#18
0
    static int set_ignoreTimeScale(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCUITweener obj  = (BCUITweener)o;
            bool        arg0 = LuaDLL.luaL_checkboolean(L, 2);
            obj.ignoreTimeScale = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index ignoreTimeScale on a nil value"));
        }
    }
示例#19
0
    static int get_eventReceiver(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCUITweener            obj = (BCUITweener)o;
            UnityEngine.GameObject ret = obj.eventReceiver;
            ToLua.PushSealed(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index eventReceiver on a nil value"));
        }
    }
示例#20
0
    static int set_steeperCurves(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCUITweener obj  = (BCUITweener)o;
            bool        arg0 = LuaDLL.luaL_checkboolean(L, 2);
            obj.steeperCurves = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index steeperCurves on a nil value"));
        }
    }
示例#21
0
    static int get_callWhenFinished(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCUITweener obj = (BCUITweener)o;
            string      ret = obj.callWhenFinished;
            LuaDLL.lua_pushstring(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index callWhenFinished on a nil value"));
        }
    }
示例#22
0
    static int set_EventPointsCount(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCUITweener obj  = (BCUITweener)o;
            int         arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
            obj.EventPointsCount = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index EventPointsCount on a nil value"));
        }
    }
示例#23
0
    static int get_tweenFactor(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            BCUITweener obj = (BCUITweener)o;
            float       ret = obj.tweenFactor;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index tweenFactor on a nil value"));
        }
    }
示例#24
0
    /// <summary>
    /// Start the tweening operation.
    /// </summary>

    static public BCTweenColor Begin(GameObject go, float duration, Color color)
    {
#if UNITY_EDITOR
        if (!Application.isPlaying)
        {
            return(null);
        }
#endif
        BCTweenColor comp = BCUITweener.Begin <BCTweenColor>(go, duration);
        comp.from = comp.value;
        comp.to   = color;

        if (duration <= 0f)
        {
            comp.Sample(1f, true);
            comp.enabled = false;
        }
        return(comp);
    }
示例#25
0
    /// <summary>
    /// Update the tweening factor and call the virtual update function.
    /// </summary>

    void Update()
    {
        float delta = ignoreTimeScale ? Time.unscaledDeltaTime : Time.deltaTime;
        float time  = ignoreTimeScale ? Time.unscaledTime : Time.time;

        if (!mStarted)
        {
            mStarted   = true;
            mStartTime = time + delay;
        }

        if (time < mStartTime)
        {
            return;
        }

        if (waitForOneFrame > 0)
        {
            waitForOneFrame--;
        }
        else
        {
            // Advance the sampling factor
            mFactor += amountPerDelta * delta;
        }

        // Loop style simply resets the play factor after it exceeds 1.
        if (style == Style.Loop)
        {
            if (mFactor > 1f)
            {
                mFactor            -= Mathf.Floor(mFactor);
                this.WePointDone[0] = false;
                this.WePointDone[1] = false;
                this.WePointDone[2] = false;
            }
        }
        else if (style == Style.PingPong)
        {
            // Ping-pong style reverses the direction
            if (mFactor > 1f)
            {
                mFactor             = 1f - (mFactor - Mathf.Floor(mFactor));
                mAmountPerDelta     = -mAmountPerDelta;
                this.WePointDone[0] = false;
                this.WePointDone[1] = false;
                this.WePointDone[2] = false;
            }
            else if (mFactor < 0f)
            {
                mFactor             = -mFactor;
                mFactor            -= Mathf.Floor(mFactor);
                mAmountPerDelta     = -mAmountPerDelta;
                this.WePointDone[0] = false;
                this.WePointDone[1] = false;
                this.WePointDone[2] = false;
            }
        }

        //----------------handle Event We Point-----------------------------------
        for (int i = 0; i < 3; i++)
        {
            if (EventPointsCount > i && !WePointDone[i] && (mAmountPerDelta > 0 && tWePoint[i] <= mFactor || mAmountPerDelta < 0 && tWePoint[i] >= mFactor))
            {
                WePointDone[i] = true;
                if (i == 0 && onWePointed1 != null)
                {
                    onWePointed1.Invoke();
                }
                else if (i == 1 && onWePointed2 != null)
                {
                    onWePointed2.Invoke();
                }
                else if (i == 2 && onWePointed3 != null)
                {
                    onWePointed3.Invoke();
                }
            }
        }
        //-------------------------------------------------------------------------

        // If the factor goes out of range and this is a one-time tweening operation, disable the script
        if ((style == Style.Once) && (duration == 0f || mFactor > 1f || mFactor < 0f))
        {
            this.WePointDone[0] = false;
            this.WePointDone[1] = false;
            this.WePointDone[2] = false;

            bool isForward;
            if (duration == 0f || mFactor > 1f)
            {
                isForward = true;
            }
            else
            {
                isForward = false;
            }

            mFactor = Mathf.Clamp01(mFactor);
            Sample(mFactor, true);
            enabled = false;

            if (current == null)
            {
                BCUITweener before = current;
                current = this;

                if (onFinished != null)
                {
                    onFinished.Invoke();
                }
                current = before;
            }
        }
        else
        {
            Sample(mFactor, false);
        }
    }