Tint() public method

Tints the image in a certain color, analog to what can be done in Adobe Animate.
public Tint ( Color color, float amount = 1.0f ) : void
color Color the RGB color with which the image should be tinted.
amount float the intensity with which tinting should be applied. Range (0, 1).
return void
    static int Tint(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                FairyGUI.ColorFilter obj  = (FairyGUI.ColorFilter)ToLua.CheckObject <FairyGUI.ColorFilter>(L, 1);
                UnityEngine.Color    arg0 = ToLua.ToColor(L, 2);
                obj.Tint(arg0);
                return(0);
            }
            else if (count == 3)
            {
                FairyGUI.ColorFilter obj  = (FairyGUI.ColorFilter)ToLua.CheckObject <FairyGUI.ColorFilter>(L, 1);
                UnityEngine.Color    arg0 = ToLua.ToColor(L, 2);
                float arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
                obj.Tint(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: FairyGUI.ColorFilter.Tint"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
示例#2
0
 static public int Tint(IntPtr l)
 {
     try {
         FairyGUI.ColorFilter self = (FairyGUI.ColorFilter)checkSelf(l);
         UnityEngine.Color    a1;
         checkType(l, 2, out a1);
         System.Single a2;
         checkType(l, 3, out a2);
         self.Tint(a1, a2);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }