CrossFadeColor() public method

public CrossFadeColor ( System.Color targetColor, float duration, bool ignoreTimeScale, bool useAlpha ) : void
targetColor System.Color
duration float
ignoreTimeScale bool
useAlpha bool
return void
Exemplo n.º 1
0
        void StartColorTween(Color targetColor, bool instant)
        {
            if (m_TargetGraphic == null)
                return;

            m_TargetGraphic.CrossFadeColor(targetColor, instant ? 0f : m_Colors.fadeDuration, true, true);
        }
Exemplo n.º 2
0
 private void StartColorTween(Color targetColor, bool instant)
 {
     if (!(m_TargetGraphic == null))
     {
         m_TargetGraphic.CrossFadeColor(targetColor, (!instant) ? m_Colors.fadeDuration : 0f, ignoreTimeScale: true, useAlpha: true);
     }
 }
Exemplo n.º 3
0
 static int QPYX_CrossFadeColor_YXQP(IntPtr L_YXQP)
 {
     try
     {
         int QPYX_count_YXQP = LuaDLL.lua_gettop(L_YXQP);
         if (QPYX_count_YXQP == 5)
         {
             UnityEngine.UI.Graphic QPYX_obj_YXQP  = (UnityEngine.UI.Graphic)ToLua.CheckObject <UnityEngine.UI.Graphic>(L_YXQP, 1);
             UnityEngine.Color      QPYX_arg0_YXQP = ToLua.ToColor(L_YXQP, 2);
             float QPYX_arg1_YXQP = (float)LuaDLL.luaL_checknumber(L_YXQP, 3);
             bool  QPYX_arg2_YXQP = LuaDLL.luaL_checkboolean(L_YXQP, 4);
             bool  QPYX_arg3_YXQP = LuaDLL.luaL_checkboolean(L_YXQP, 5);
             QPYX_obj_YXQP.CrossFadeColor(QPYX_arg0_YXQP, QPYX_arg1_YXQP, QPYX_arg2_YXQP, QPYX_arg3_YXQP);
             return(0);
         }
         else if (QPYX_count_YXQP == 6)
         {
             UnityEngine.UI.Graphic QPYX_obj_YXQP  = (UnityEngine.UI.Graphic)ToLua.CheckObject <UnityEngine.UI.Graphic>(L_YXQP, 1);
             UnityEngine.Color      QPYX_arg0_YXQP = ToLua.ToColor(L_YXQP, 2);
             float QPYX_arg1_YXQP = (float)LuaDLL.luaL_checknumber(L_YXQP, 3);
             bool  QPYX_arg2_YXQP = LuaDLL.luaL_checkboolean(L_YXQP, 4);
             bool  QPYX_arg3_YXQP = LuaDLL.luaL_checkboolean(L_YXQP, 5);
             bool  QPYX_arg4_YXQP = LuaDLL.luaL_checkboolean(L_YXQP, 6);
             QPYX_obj_YXQP.CrossFadeColor(QPYX_arg0_YXQP, QPYX_arg1_YXQP, QPYX_arg2_YXQP, QPYX_arg3_YXQP, QPYX_arg4_YXQP);
             return(0);
         }
         else
         {
             return(LuaDLL.luaL_throw(L_YXQP, "invalid arguments to method: UnityEngine.UI.Graphic.CrossFadeColor"));
         }
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// Starts a color tween.
        /// </summary>
        /// <param name="target">Target.</param>
        /// <param name="targetColor">Target color.</param>
        /// <param name="duration">Duration.</param>
        protected virtual void StartColorTween(Graphic target, Color targetColor, float duration)
        {
            if (target == null)
            {
                return;
            }

            target.CrossFadeColor(targetColor, duration, true, true);
        }
    static int CrossFadeColor(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 5);
        UnityEngine.UI.Graphic obj = (UnityEngine.UI.Graphic)LuaScriptMgr.GetUnityObjectSelf(L, 1, "UnityEngine.UI.Graphic");
        Color arg0 = LuaScriptMgr.GetColor(L, 2);
        float arg1 = (float)LuaScriptMgr.GetNumber(L, 3);
        bool  arg2 = LuaScriptMgr.GetBoolean(L, 4);
        bool  arg3 = LuaScriptMgr.GetBoolean(L, 5);

        obj.CrossFadeColor(arg0, arg1, arg2, arg3);
        return(0);
    }
Exemplo n.º 6
0
    static int CrossFadeColor(IntPtr L)
    {
        L.ChkArgsCount(5);
        UnityEngine.UI.Graphic obj = (UnityEngine.UI.Graphic)L.ChkUnityObjectSelf(1, "UnityEngine.UI.Graphic");
        var arg0 = L.ToColor(2);
        var arg1 = (float)L.ChkNumber(3);
        var arg2 = L.ChkBoolean(4);
        var arg3 = L.ChkBoolean(5);

        obj.CrossFadeColor(arg0, arg1, arg2, arg3);
        return(0);
    }
Exemplo n.º 7
0
        /// <summary>
        /// Starts a color tween.
        /// </summary>
        /// <param name="target">Target.</param>
        /// <param name="targetColor">Target color.</param>
        /// <param name="duration">Duration.</param>
        private void StartColorTween(Graphic target, Color targetColor, float duration)
        {
            if (target == null)
            {
                return;
            }

            if (!Application.isPlaying || duration == 0f)
            {
                target.canvasRenderer.SetColor(targetColor);
            }
            else
            {
                target.CrossFadeColor(targetColor, duration, true, true);
            }
        }
Exemplo n.º 8
0
 static int CrossFadeColor(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 5);
         UnityEngine.UI.Graphic obj  = (UnityEngine.UI.Graphic)ToLua.CheckObject(L, 1, typeof(UnityEngine.UI.Graphic));
         UnityEngine.Color      arg0 = (UnityEngine.Color)ToLua.CheckObject(L, 2, typeof(UnityEngine.Color));
         float arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
         bool  arg2 = LuaDLL.luaL_checkboolean(L, 4);
         bool  arg3 = LuaDLL.luaL_checkboolean(L, 5);
         obj.CrossFadeColor(arg0, arg1, arg2, arg3);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 9
0
 static public int CrossFadeColor(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 5)
         {
             UnityEngine.UI.Graphic self = (UnityEngine.UI.Graphic)checkSelf(l);
             UnityEngine.Color      a1;
             checkType(l, 2, out a1);
             System.Single a2;
             checkType(l, 3, out a2);
             System.Boolean a3;
             checkType(l, 4, out a3);
             System.Boolean a4;
             checkType(l, 5, out a4);
             self.CrossFadeColor(a1, a2, a3, a4);
             pushValue(l, true);
             return(1);
         }
         else if (argc == 6)
         {
             UnityEngine.UI.Graphic self = (UnityEngine.UI.Graphic)checkSelf(l);
             UnityEngine.Color      a1;
             checkType(l, 2, out a1);
             System.Single a2;
             checkType(l, 3, out a2);
             System.Boolean a3;
             checkType(l, 4, out a3);
             System.Boolean a4;
             checkType(l, 5, out a4);
             System.Boolean a5;
             checkType(l, 6, out a5);
             self.CrossFadeColor(a1, a2, a3, a4, a5);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 10
0
 static public int CrossFadeColor(IntPtr l)
 {
     try {
         UnityEngine.UI.Graphic self = (UnityEngine.UI.Graphic)checkSelf(l);
         UnityEngine.Color      a1;
         checkType(l, 2, out a1);
         System.Single a2;
         checkType(l, 3, out a2);
         System.Boolean a3;
         checkType(l, 4, out a3);
         System.Boolean a4;
         checkType(l, 5, out a4);
         self.CrossFadeColor(a1, a2, a3, a4);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 11
0
 static public int CrossFadeColor(IntPtr l)
 {
     try {
         UnityEngine.UI.Graphic self = (UnityEngine.UI.Graphic)checkSelf(l);
         UnityEngine.Color      a1;
         checkType(l, 2, out a1);
         System.Single a2;
         checkType(l, 3, out a2);
         System.Boolean a3;
         checkType(l, 4, out a3);
         System.Boolean a4;
         checkType(l, 5, out a4);
         self.CrossFadeColor(a1, a2, a3, a4);
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
    static int CrossFadeColor(IntPtr L)
    {
#if UNITY_EDITOR
        ToluaProfiler.AddCallRecord("UnityEngine.UI.Graphic.Register");
#endif
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 5)
            {
                UnityEngine.UI.Graphic obj  = (UnityEngine.UI.Graphic)ToLua.CheckObject <UnityEngine.UI.Graphic>(L, 1);
                UnityEngine.Color      arg0 = ToLua.ToColor(L, 2);
                float arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
                bool  arg2 = LuaDLL.luaL_checkboolean(L, 4);
                bool  arg3 = LuaDLL.luaL_checkboolean(L, 5);
                obj.CrossFadeColor(arg0, arg1, arg2, arg3);
                return(0);
            }
            else if (count == 6)
            {
                UnityEngine.UI.Graphic obj  = (UnityEngine.UI.Graphic)ToLua.CheckObject <UnityEngine.UI.Graphic>(L, 1);
                UnityEngine.Color      arg0 = ToLua.ToColor(L, 2);
                float arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
                bool  arg2 = LuaDLL.luaL_checkboolean(L, 4);
                bool  arg3 = LuaDLL.luaL_checkboolean(L, 5);
                bool  arg4 = LuaDLL.luaL_checkboolean(L, 6);
                obj.CrossFadeColor(arg0, arg1, arg2, arg3, arg4);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.UI.Graphic.CrossFadeColor"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Exemplo n.º 13
0
    static int CrossFadeColor(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 5 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.UI.Graphic), typeof(UnityEngine.Color), typeof(float), typeof(bool), typeof(bool)))
            {
                UnityEngine.UI.Graphic obj  = (UnityEngine.UI.Graphic)ToLua.ToObject(L, 1);
                UnityEngine.Color      arg0 = ToLua.ToColor(L, 2);
                float arg1 = (float)LuaDLL.lua_tonumber(L, 3);
                bool  arg2 = LuaDLL.lua_toboolean(L, 4);
                bool  arg3 = LuaDLL.lua_toboolean(L, 5);
                obj.CrossFadeColor(arg0, arg1, arg2, arg3);
                return(0);
            }
            else if (count == 6 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.UI.Graphic), typeof(UnityEngine.Color), typeof(float), typeof(bool), typeof(bool), typeof(bool)))
            {
                UnityEngine.UI.Graphic obj  = (UnityEngine.UI.Graphic)ToLua.ToObject(L, 1);
                UnityEngine.Color      arg0 = ToLua.ToColor(L, 2);
                float arg1 = (float)LuaDLL.lua_tonumber(L, 3);
                bool  arg2 = LuaDLL.lua_toboolean(L, 4);
                bool  arg3 = LuaDLL.lua_toboolean(L, 5);
                bool  arg4 = LuaDLL.lua_toboolean(L, 6);
                obj.CrossFadeColor(arg0, arg1, arg2, arg3, arg4);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.UI.Graphic.CrossFadeColor"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
        /// <summary>
        /// Starts a color tween.
        /// </summary>
        /// <param name="target">Target.</param>
        /// <param name="targetColor">Target color.</param>
        /// <param name="duration">Duration.</param>
        private void StartColorTween(Graphic target, Color targetColor, float duration)
        {
            if (target == null)
                return;

            if (!Application.isPlaying || duration == 0f)
            {
                target.canvasRenderer.SetColor(targetColor);
            }
            else
            {
                target.CrossFadeColor(targetColor, duration, true, true);
            }
        }
Exemplo n.º 15
0
 static public int CrossFadeColor(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 5)
         {
             UnityEngine.UI.Graphic self = (UnityEngine.UI.Graphic)checkSelf(l);
             UnityEngine.Color      a1;
             checkType(l, 2, out a1);
             System.Single a2;
             checkType(l, 3, out a2);
             System.Boolean a3;
             checkType(l, 4, out a3);
             System.Boolean a4;
             checkType(l, 5, out a4);
             self.CrossFadeColor(a1, a2, a3, a4);
             pushValue(l, true);
             return(1);
         }
         else if (argc == 6)
         {
             UnityEngine.UI.Graphic self = (UnityEngine.UI.Graphic)checkSelf(l);
             UnityEngine.Color      a1;
             checkType(l, 2, out a1);
             System.Single a2;
             checkType(l, 3, out a2);
             System.Boolean a3;
             checkType(l, 4, out a3);
             System.Boolean a4;
             checkType(l, 5, out a4);
             System.Boolean a5;
             checkType(l, 6, out a5);
             self.CrossFadeColor(a1, a2, a3, a4, a5);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function CrossFadeColor to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
Exemplo n.º 16
0
 void DoTransition(Color target)
 {
     m_graphic.CrossFadeColor(target, Duration, true, true);
 }
Exemplo n.º 17
0
        /// <summary>
        /// Starts a color tween.
        /// </summary>
        /// <param name="target">Target.</param>
        /// <param name="targetColor">Target color.</param>
        /// <param name="duration">Duration.</param>
        protected virtual void StartColorTween(Graphic target, Color targetColor, float duration)
        {
            if (target == null)
                return;

            target.CrossFadeColor(targetColor, duration, true, true);
        }