static StackObject *CrossFadeColor_27(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 6);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Boolean @useRGB = ptr_of_this_method->Value == 1;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.Boolean @useAlpha = ptr_of_this_method->Value == 1;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            System.Boolean @ignoreTimeScale = ptr_of_this_method->Value == 1;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 4);
            System.Single @duration = *(float *)&ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 5);
            UnityEngine.Color @targetColor = (UnityEngine.Color) typeof(UnityEngine.Color).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 6);
            UnityEngine.UI.Graphic instance_of_this_method = (UnityEngine.UI.Graphic) typeof(UnityEngine.UI.Graphic).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.CrossFadeColor(@targetColor, @duration, @ignoreTimeScale, @useAlpha, @useRGB);

            return(__ret);
        }
Example #2
0
        static int _m_CrossFadeColor(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UnityEngine.UI.Graphic __cl_gen_to_be_invoked = (UnityEngine.UI.Graphic)translator.FastGetCSObj(L, 1);


            try {
                {
                    UnityEngine.Color targetColor; translator.Get(L, 2, out targetColor);
                    float             duration = (float)LuaAPI.lua_tonumber(L, 3);
                    bool ignoreTimeScale       = LuaAPI.lua_toboolean(L, 4);
                    bool useAlpha = LuaAPI.lua_toboolean(L, 5);

                    __cl_gen_to_be_invoked.CrossFadeColor(targetColor, duration, ignoreTimeScale, useAlpha);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
        static int _m_CrossFadeColor(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                UnityEngine.UI.Graphic gen_to_be_invoked = (UnityEngine.UI.Graphic)translator.FastGetCSObj(L, 1);


                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 5 && translator.Assignable <UnityEngine.Color>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 5))
                {
                    UnityEngine.Color _targetColor; translator.Get(L, 2, out _targetColor);
                    float             _duration = (float)LuaAPI.lua_tonumber(L, 3);
                    bool _ignoreTimeScale       = LuaAPI.lua_toboolean(L, 4);
                    bool _useAlpha = LuaAPI.lua_toboolean(L, 5);

                    gen_to_be_invoked.CrossFadeColor(_targetColor, _duration, _ignoreTimeScale, _useAlpha);



                    return(0);
                }
                if (gen_param_count == 6 && translator.Assignable <UnityEngine.Color>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 5) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 6))
                {
                    UnityEngine.Color _targetColor; translator.Get(L, 2, out _targetColor);
                    float             _duration = (float)LuaAPI.lua_tonumber(L, 3);
                    bool _ignoreTimeScale       = LuaAPI.lua_toboolean(L, 4);
                    bool _useAlpha = LuaAPI.lua_toboolean(L, 5);
                    bool _useRGB   = LuaAPI.lua_toboolean(L, 6);

                    gen_to_be_invoked.CrossFadeColor(_targetColor, _duration, _ignoreTimeScale, _useAlpha, _useRGB);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.UI.Graphic.CrossFadeColor!"));
        }
Example #4
0
        public override void OnEnter()
        {
            GameObject _go = Fsm.GetOwnerDefaultTarget(gameObject);

            if (_go != null)
            {
                _component = _go.GetComponent <UnityEngine.UI.Graphic>();
            }

            Color _color = _component.color;

            if (!color.IsNone)
            {
                _color = color.Value;
            }

            if (!red.IsNone)
            {
                _color.r = red.Value;
            }
            if (!green.IsNone)
            {
                _color.g = green.Value;
            }
            if (!blue.IsNone)
            {
                _color.b = blue.Value;
            }
            if (!alpha.IsNone)
            {
                _color.a = alpha.Value;
            }

            _component.CrossFadeColor(_color, duration.Value, ignoredTimeScale.Value, useAlpha.Value);

            Finish();
        }