Inheritance: GObject, IAnimationGear, IColorGear
示例#1
0
        public MyDragDropManager()
        {
            _agent = (GComponent)UIObjectFactory.NewObject("component");
            _agent.gameObjectName = "MyDragDropAgent";
            _agent.SetHome(GRoot.inst);
            _agent.touchable = false;//important
            _agent.draggable = true;
            //_agent.SetSize(100, 100);

            _agent.sortingOrder = int.MaxValue;
            _agent.onDragEnd.Add(__dragEnd);

            loader_a = (GLoader)UIObjectFactory.NewObject("loader");
            loader_a.SetPivot(0.5f, 0.5f, true);
            loader_a.align         = AlignType.Center;
            loader_a.verticalAlign = VertAlignType.Middle;

            loader_b = (GLoader)UIObjectFactory.NewObject("loader");
            loader_b.SetPivot(0.5f, 0.5f, true);
            loader_b.align         = AlignType.Center;
            loader_b.verticalAlign = VertAlignType.Middle;

            _agent.AddChild(loader_a);
            _agent.AddChild(loader_b);
        }
示例#2
0
 public DragManager()
 {
     _agent = new GLoader();
     _agent.touchable = false;//important
     _agent.draggable = true;
     _agent.SetSize(88, 88);
     _agent.alwaysOnTop = int.MaxValue;
     _agent.onDragEnd.Add(__dragEnd);
 }
        public void FreeObject(DisplayObject obj)
        {
            GLoader loader = obj.gOwner as GLoader;

            if (loader != null)
            {
                loader.url = null;
                pool.Push(loader);
            }
        }
示例#4
0
 public DragDropManager()
 {
     _agent           = new GLoader();
     _agent.touchable = false;            //important
     _agent.draggable = true;
     _agent.SetSize(100, 100);
     _agent.align         = AlignType.Center;
     _agent.verticalAlign = VertAlignType.Middle;
     _agent.sortingOrder  = int.MaxValue;
     _agent.onDragEnd.Add(__dragEnd);
 }
示例#5
0
 public DragDropManager()
 {
     _agent = new GLoader();
     _agent.touchable = false;//important
     _agent.draggable = true;
     _agent.SetSize(100, 100);
     _agent.align = AlignType.Center;
     _agent.verticalAlign = VertAlignType.Middle;
     _agent.sortingOrder = int.MaxValue;
     _agent.onDragEnd.Add(__dragEnd);
 }
 public DragDropManager()
 {
     _agent           = (GLoader)UIObjectFactory.NewObject(ObjectType.Loader);
     _agent.touchable = false;            //important
     _agent.draggable = true;
     _agent.SetSize(100, 100);
     _agent.SetPivot(0.5f, 0.5f, true);
     _agent.align         = AlignType.Center;
     _agent.verticalAlign = VertAlignType.Middle;
     _agent.sortingOrder  = int.MaxValue;
     _agent.onDragEnd.Add(__dragEnd);
 }
        public DisplayObject CreateObject(string src, ref int width, ref int height)
        {
            GLoader loader;

            if (pool.Count > 0)
            {
                loader = pool.Pop();
            }
            else
            {
                loader      = new GLoader();
                loader.fill = FillType.ScaleFree;
            }
            loader.url = src;

            PackageItem pi = UIPackage.GetItemByURL(src);

            if (width != 0)
            {
                loader.width = width;
            }
            else
            {
                if (pi != null)
                {
                    width = pi.width;
                }
                else
                {
                    width = 20;
                }
                loader.width = width;
            }

            if (height != 0)
            {
                loader.height = height;
            }
            else
            {
                if (pi != null)
                {
                    height = pi.height;
                }
                else
                {
                    height = 20;
                }
                loader.height = height;
            }

            return(loader.displayObject);
        }
    public EmitComponent()
    {
        this.touchable = false;

        _symbolLoader = new GLoader();
        _symbolLoader.autoSize = true;
        AddChild(_symbolLoader);

        _numberText = new GTextField();
        _numberText.autoSize = AutoSizeType.Both;

        AddChild(_numberText);
    }
 public DragDropManager()
 {
     _agent = (GLoader)UIObjectFactory.NewObject("loader");
     _agent.gameObjectName = "DragDropAgent";
     _agent.SetHome(GRoot.inst);
     _agent.touchable = false;//important
     _agent.draggable = true;
     _agent.SetSize(100, 100);
     _agent.SetPivot(0.5f, 0.5f, true);
     _agent.align = AlignType.Center;
     _agent.verticalAlign = VertAlignType.Middle;
     _agent.sortingOrder = int.MaxValue;
     _agent.onDragEnd.Add(__dragEnd);
 }
示例#10
0
    static int set_shader(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GLoader obj  = (FairyGUI.GLoader)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"));
        }
    }
示例#11
0
    static int set_verticalAlign(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GLoader       obj  = (FairyGUI.GLoader)o;
            FairyGUI.VertAlignType arg0 = (FairyGUI.VertAlignType)ToLua.CheckObject(L, 2, typeof(FairyGUI.VertAlignType));
            obj.verticalAlign = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index verticalAlign on a nil value"));
        }
    }
示例#12
0
    static int set_fill(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GLoader  obj  = (FairyGUI.GLoader)o;
            FairyGUI.FillType arg0 = (FairyGUI.FillType)ToLua.CheckObject(L, 2, typeof(FairyGUI.FillType));
            obj.fill = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index fill on a nil value" : e.Message));
        }
    }
示例#13
0
    static int set_blendMode(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GLoader   obj  = (FairyGUI.GLoader)o;
            FairyGUI.BlendMode arg0 = (FairyGUI.BlendMode)ToLua.CheckObject(L, 2, typeof(FairyGUI.BlendMode));
            obj.blendMode = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index blendMode on a nil value"));
        }
    }
示例#14
0
    static int set_texture(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GLoader  obj  = (FairyGUI.GLoader)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"));
        }
    }
示例#15
0
    static int set_fillClockwise(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GLoader obj  = (FairyGUI.GLoader)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"));
        }
    }
示例#16
0
    static int get_fillClockwise(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GLoader obj = (FairyGUI.GLoader)o;
            bool             ret = obj.fillClockwise;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index fillClockwise on a nil value"));
        }
    }
示例#17
0
    static int get_color(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GLoader  obj = (FairyGUI.GLoader)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"));
        }
    }
示例#18
0
    static int get_shader(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GLoader obj = (FairyGUI.GLoader)o;
            string           ret = obj.shader;
            LuaDLL.lua_pushstring(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index shader on a nil value"));
        }
    }
示例#19
0
    static int get_frame(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GLoader obj = (FairyGUI.GLoader)o;
            int ret = obj.frame;
            LuaDLL.lua_pushinteger(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index frame on a nil value"));
        }
    }
示例#20
0
    static int get_verticalAlign(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GLoader       obj = (FairyGUI.GLoader)o;
            FairyGUI.VertAlignType ret = obj.verticalAlign;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index verticalAlign on a nil value"));
        }
    }
示例#21
0
    static int get_showErrorSign(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GLoader obj = (FairyGUI.GLoader)o;
            bool             ret = obj.showErrorSign;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index showErrorSign on a nil value" : e.Message));
        }
    }
示例#22
0
    static int set_color(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GLoader  obj  = (FairyGUI.GLoader)o;
            UnityEngine.Color arg0 = ToLua.ToColor(L, 2);
            obj.color = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index color on a nil value"));
        }
    }
示例#23
0
    static int get_fillAmount(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GLoader obj = (FairyGUI.GLoader)o;
            float            ret = obj.fillAmount;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index fillAmount on a nil value"));
        }
    }
示例#24
0
    static int set_fillMethod(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GLoader    obj  = (FairyGUI.GLoader)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, "attempt to index fillMethod on a nil value"));
        }
    }
示例#25
0
    static int set_fillOrigin(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GLoader obj = (FairyGUI.GLoader)o;
            int arg0             = (int)LuaDLL.luaL_checknumber(L, 2);
            obj.fillOrigin = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index fillOrigin on a nil value" : e.Message));
        }
    }
示例#26
0
    static int set_fillAmount(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GLoader obj  = (FairyGUI.GLoader)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"));
        }
    }
示例#27
0
    static int get_filter(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GLoader obj = (FairyGUI.GLoader)o;
            FairyGUI.IFilter ret = obj.filter;
            ToLua.PushObject(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index filter on a nil value"));
        }
    }
示例#28
0
    static int set_filter(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GLoader obj  = (FairyGUI.GLoader)o;
            FairyGUI.IFilter arg0 = (FairyGUI.IFilter)ToLua.CheckObject <FairyGUI.IFilter>(L, 2);
            obj.filter = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index filter on a nil value"));
        }
    }
示例#29
0
    static int get_blendMode(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GLoader   obj = (FairyGUI.GLoader)o;
            FairyGUI.BlendMode ret = obj.blendMode;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index blendMode on a nil value"));
        }
    }
示例#30
0
    static int set_playing(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GLoader obj  = (FairyGUI.GLoader)o;
            bool             arg0 = LuaDLL.luaL_checkboolean(L, 2);
            obj.playing = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index playing on a nil value" : e.Message));
        }
    }
示例#31
0
    static int set_material(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GLoader     obj  = (FairyGUI.GLoader)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"));
        }
    }
示例#32
0
    static int get_movieClip(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GLoader   obj = (FairyGUI.GLoader)o;
            FairyGUI.MovieClip ret = obj.movieClip;
            ToLua.PushObject(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index movieClip on a nil value"));
        }
    }
示例#33
0
    static int set_icon(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GLoader obj  = (FairyGUI.GLoader)o;
            string           arg0 = ToLua.CheckString(L, 2);
            obj.icon = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index icon on a nil value" : e.Message));
        }
    }
    static int get_ignoreEngineTimeScale(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GLoader obj = (FairyGUI.GLoader)o;
            bool             ret = obj.ignoreEngineTimeScale;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index ignoreEngineTimeScale on a nil value"));
        }
    }
        public DisplayObject CreateObject(string src, ref int width, ref int height)
        {
            GLoader loader;

            if (pool.Count > 0)
                loader = pool.Pop();
            else
            {
                loader = new GLoader();
                loader.fill = FillType.ScaleFree;
            }
            loader.url = src;

            PackageItem pi = UIPackage.GetItemByURL(src);
            if (width != 0)
                loader.width = width;
            else
            {
                if (pi != null)
                    width = pi.width;
                else
                    width = 20;
                loader.width = width;
            }

            if (height != 0)
                loader.height = height;
            else
            {
                if (pi != null)
                    height = pi.height;
                else
                    height = 20;
                loader.height = height;
            }

            return loader.displayObject;
        }