GImage class.
Inheritance: GObject, IColorGear
コード例 #1
0
ファイル: FGUIExtend.cs プロジェクト: tiance7/XianCard
        public static void SetColor(this GImage image, int color)
        {
            float r = (color >> 16) / COLOR_MAX;
            float g = ((color & 0xFF00) >> 8) / COLOR_MAX;
            float b = (color & 0xFF) / COLOR_MAX;

            image.color = new Color(r, g, b);
        }
コード例 #2
0
    static int get_shader(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GImage obj = (FairyGUI.GImage)o;
            string          ret = obj.shader;
            LuaDLL.lua_pushstring(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index shader on a nil value" : e.Message));
        }
    }
コード例 #3
0
    static int get_material(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GImage      obj = (FairyGUI.GImage)o;
            UnityEngine.Material ret = obj.material;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index material on a nil value" : e.Message));
        }
    }
コード例 #4
0
    static int get_texture(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GImage   obj = (FairyGUI.GImage)o;
            FairyGUI.NTexture ret = obj.texture;
            ToLua.PushObject(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index texture on a nil value" : e.Message));
        }
    }
コード例 #5
0
    static int get_fillAmount(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GImage obj = (FairyGUI.GImage)o;
            float           ret = obj.fillAmount;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index fillAmount on a nil value" : e.Message));
        }
    }
コード例 #6
0
    static int get_fillOrigin(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GImage obj = (FairyGUI.GImage)o;
            int             ret = obj.fillOrigin;
            LuaDLL.lua_pushinteger(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index fillOrigin on a nil value"));
        }
    }
コード例 #7
0
    static int get_fillMethod(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GImage     obj = (FairyGUI.GImage)o;
            FairyGUI.FillMethod ret = obj.fillMethod;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index fillMethod on a nil value" : e.Message));
        }
    }
コード例 #8
0
    static int set_shader(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GImage obj  = (FairyGUI.GImage)o;
            string          arg0 = ToLua.CheckString(L, 2);
            obj.shader = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index shader on a nil value"));
        }
    }
コード例 #9
0
    static int set_texture(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GImage   obj  = (FairyGUI.GImage)o;
            FairyGUI.NTexture arg0 = (FairyGUI.NTexture)ToLua.CheckObject <FairyGUI.NTexture>(L, 2);
            obj.texture = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index texture on a nil value"));
        }
    }
コード例 #10
0
    static int set_material(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GImage      obj  = (FairyGUI.GImage)o;
            UnityEngine.Material arg0 = (UnityEngine.Material)ToLua.CheckObject <UnityEngine.Material>(L, 2);
            obj.material = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index material on a nil value"));
        }
    }
コード例 #11
0
    static int set_fillAmount(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GImage obj  = (FairyGUI.GImage)o;
            float           arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
            obj.fillAmount = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index fillAmount on a nil value"));
        }
    }
コード例 #12
0
    static int set_fillClockwise(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GImage obj  = (FairyGUI.GImage)o;
            bool            arg0 = LuaDLL.luaL_checkboolean(L, 2);
            obj.fillClockwise = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index fillClockwise on a nil value"));
        }
    }
コード例 #13
0
    static int set_flip(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GImage   obj  = (FairyGUI.GImage)o;
            FairyGUI.FlipType arg0 = (FairyGUI.FlipType)ToLua.CheckObject(L, 2, typeof(FairyGUI.FlipType));
            obj.flip = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index flip on a nil value"));
        }
    }
コード例 #14
0
    static int set_color(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GImage   obj  = (FairyGUI.GImage)o;
            UnityEngine.Color arg0 = ToLua.ToColor(L, 2);
            obj.color = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index color on a nil value" : e.Message));
        }
    }
コード例 #15
0
    static int get_color(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GImage   obj = (FairyGUI.GImage)o;
            UnityEngine.Color ret = obj.color;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index color on a nil value"));
        }
    }
コード例 #16
0
    static int set_fillMethod(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GImage     obj  = (FairyGUI.GImage)o;
            FairyGUI.FillMethod arg0 = (FairyGUI.FillMethod)ToLua.CheckObject(L, 2, typeof(FairyGUI.FillMethod));
            obj.fillMethod = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index fillMethod on a nil value" : e.Message));
        }
    }
コード例 #17
0
    static int get_fillClockwise(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GImage obj = (FairyGUI.GImage)o;
            bool            ret = obj.fillClockwise;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index fillClockwise on a nil value" : e.Message));
        }
    }
コード例 #18
0
    static int get_flip(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GImage   obj = (FairyGUI.GImage)o;
            FairyGUI.FlipType ret = obj.flip;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index flip on a nil value"));
        }
    }
コード例 #19
0
    void Start()
    {
        Application.targetFrameRate = 60;

        Stage.inst.onKeyDown.Add(OnKeyDown);

        _mainView = this.gameObject.GetComponent<UIPanel>().ui;

        _btn0 = _mainView.GetChild("b0").asButton;
        _btn0.icon = "Cooldown/k0";
        _time1 = 5;
        _mask0 = _btn0.GetChild("mask").asImage;

        _btn1 = _mainView.GetChild("b1").asButton;
        _btn1.icon = "Cooldown/k1";
        _time2 = 10;
        _mask1 = _btn1.GetChild("mask").asImage;
    }
コード例 #20
0
    static int _CreateFairyGUI_GImage(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 0)
            {
                FairyGUI.GImage obj = new FairyGUI.GImage();
                ToLua.PushObject(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: FairyGUI.GImage.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
コード例 #21
0
    void Start()
    {
        Application.targetFrameRate = 60;
        GRoot.inst.SetContentScaleFactor(1136, 640);
        Stage.inst.onKeyDown.Add(OnKeyDown);

        UIPackage.AddPackage("UI/Cooldown");

        _mainView = UIPackage.CreateObject("Cooldown", "Main").asCom;
        _mainView.SetSize(GRoot.inst.width, GRoot.inst.height);
        _mainView.AddRelation(GRoot.inst, RelationType.Size);
        GRoot.inst.AddChild(_mainView);

        _btn0 = _mainView.GetChild("b0").asButton;
        _btn0.icon = "Cooldown/k0";
        _time1 = 5;
        _mask0 = _btn0.GetChild("mask").asImage;

        _btn1 = _mainView.GetChild("b1").asButton;
        _btn1.icon = "Cooldown/k1";
        _time2 = 10;
        _mask1 = _btn1.GetChild("mask").asImage;
    }