Exemple #1
0
        static int _g_get_hoverOver(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                TweenLetters __cl_gen_to_be_invoked = (TweenLetters)translator.FastGetCSObj(L, 1);
                translator.Push(L, __cl_gen_to_be_invoked.hoverOver);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(1);
        }
Exemple #2
0
        static int _s_set_hoverOut(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                TweenLetters __cl_gen_to_be_invoked = (TweenLetters)translator.FastGetCSObj(L, 1);
                __cl_gen_to_be_invoked.hoverOut = (TweenLetters.AnimationProperties)translator.GetObject(L, 2, typeof(TweenLetters.AnimationProperties));
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(0);
        }
Exemple #3
0
        static int __CreateInstance(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    TweenLetters __cl_gen_ret = new TweenLetters();
                    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 TweenLetters constructor!"));
        }
Exemple #4
0
        static int _m_Play(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


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


            try {
                {
                    bool forward = LuaAPI.lua_toboolean(L, 2);

                    __cl_gen_to_be_invoked.Play(forward);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Exemple #5
0
    private void OnPostFill(UIWidget widget, int bufferOffset, List <Vector3> verts, List <Vector2> uvs, List <Color> cols)
    {
        if (verts == null)
        {
            return;
        }
        int count = verts.Count;

        if (verts == null || count == 0)
        {
            return;
        }
        if (this.mLabel == null)
        {
            return;
        }
        try
        {
            int    quadsPerCharacter = this.mLabel.quadsPerCharacter;
            int    num         = count / quadsPerCharacter / 4;
            string printedText = this.mLabel.printedText;
            if (this.mVertexCount != count)
            {
                this.mVertexCount = count;
                this.SetLetterOrder(num);
                this.GetLetterDuration(num);
            }
            Matrix4x4  identity = Matrix4x4.identity;
            Vector3    pos      = Vector3.zero;
            Quaternion q        = Quaternion.identity;
            Vector3    s        = Vector3.one;
            Vector3    b        = Vector3.zero;
            Quaternion a        = Quaternion.Euler(this.mCurrent.rot);
            Vector3    vector   = Vector3.zero;
            Color      value    = Color.clear;
            float      num2     = base.tweenFactor * this.duration;
            for (int i = 0; i < quadsPerCharacter; i++)
            {
                for (int j = 0; j < num; j++)
                {
                    int num3 = this.mLetterOrder[j];
                    int num4 = i * num * 4 + num3 * 4;
                    if (num4 < count)
                    {
                        float start = this.mLetter[num3].start;
                        float num5  = Mathf.Clamp(num2 - start, 0f, this.mLetter[num3].duration) / this.mLetter[num3].duration;
                        num5 = this.animationCurve.Evaluate(num5);
                        b    = TweenLetters.GetCenter(verts, num4, 4);
                        Vector2 offset = this.mLetter[num3].offset;
                        pos = Vector3.LerpUnclamped(this.mCurrent.pos + new Vector3(offset.x, offset.y, 0f), Vector3.zero, num5);
                        q   = Quaternion.SlerpUnclamped(a, Quaternion.identity, num5);
                        s   = Vector3.LerpUnclamped(this.mCurrent.scale, Vector3.one, num5);
                        float num6 = Mathf.LerpUnclamped(this.mCurrent.alpha, 1f, num5);
                        identity.SetTRS(pos, q, s);
                        for (int k = num4; k < num4 + 4; k++)
                        {
                            vector   = verts[k];
                            vector  -= b;
                            vector   = identity.MultiplyPoint3x4(vector);
                            vector  += b;
                            verts[k] = vector;
                            value    = cols[k];
                            value.a *= num6;
                            cols[k]  = value;
                        }
                    }
                }
            }
        }
        catch (Exception)
        {
            base.enabled = false;
        }
    }