Inheritance: GComponent
示例#1
0
        public void Awake()
        {
            Game.Scene.GetComponent <FUIPackageComponent>().AddPackage("OverHead");

            this.m_tank = this.GetParent <Tank>();

            this.m_overHeadGO = this.m_tank.GameObject.FindChildObjectByPath("OverHead");

            this.m_overHeadGO.SetActive(true);

            this.m_uiPanel = this.m_overHeadGO.GetComponent <UIPanel>();

            this.m_name = this.m_uiPanel.ui.GetChild("name").asRichTextField;

            this.m_redBar = this.m_uiPanel.ui.GetChild("n0").asProgress;

            this.m_whiteBar = this.m_uiPanel.ui.GetChild("n1").asProgress;

            this.m_name.text = this.m_tank.Name;

            m_numericComponent = this.m_tank.GetComponent <NumericComponent>();

            this.m_redBar.max = m_numericComponent[NumericType.MaxHp];

            this.m_redBar.value = m_numericComponent[NumericType.Hp];

            this.m_whiteBar.max = 100;

            this.m_whiteBar.value = 100;

            if (this.m_tank.TankCamp != TankComponent.Instance.MyTank.TankCamp)
            {
                this.m_name.color = Color.red;
            }
        }
 static public int Dispose(IntPtr l)
 {
     try {
         FairyGUI.GProgressBar self = (FairyGUI.GProgressBar)checkSelf(l);
         self.Dispose();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int get_titleType(IntPtr l)
 {
     try {
         FairyGUI.GProgressBar self = (FairyGUI.GProgressBar)checkSelf(l);
         pushValue(l, true);
         pushEnum(l, (int)self.titleType);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int get_max(IntPtr l)
 {
     try {
         FairyGUI.GProgressBar self = (FairyGUI.GProgressBar)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.max);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int constructor(IntPtr l)
 {
     try {
         FairyGUI.GProgressBar o;
         o = new FairyGUI.GProgressBar();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int Setup_AfterAdd(IntPtr l)
 {
     try {
         FairyGUI.GProgressBar self = (FairyGUI.GProgressBar)checkSelf(l);
         FairyGUI.Utils.XML    a1;
         checkType(l, 2, out a1);
         self.Setup_AfterAdd(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_titleType(IntPtr l)
 {
     try {
         FairyGUI.GProgressBar      self = (FairyGUI.GProgressBar)checkSelf(l);
         FairyGUI.ProgressTitleType v;
         checkEnum(l, 2, out v);
         self.titleType = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static int Dispose(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         FairyGUI.GProgressBar obj = (FairyGUI.GProgressBar)ToLua.CheckObject <FairyGUI.GProgressBar>(L, 1);
         obj.Dispose();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static public int set_value(IntPtr l)
 {
     try {
         FairyGUI.GProgressBar self = (FairyGUI.GProgressBar)checkSelf(l);
         float v;
         checkType(l, 2, out v);
         self.value = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int Update(IntPtr l)
 {
     try {
         FairyGUI.GProgressBar self = (FairyGUI.GProgressBar)checkSelf(l);
         System.Single         a1;
         checkType(l, 2, out a1);
         self.Update(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
示例#11
0
 static int Setup_AfterAdd(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         FairyGUI.GProgressBar obj  = (FairyGUI.GProgressBar)ToLua.CheckObject(L, 1, typeof(FairyGUI.GProgressBar));
         FairyGUI.Utils.XML    arg0 = (FairyGUI.Utils.XML)ToLua.CheckObject(L, 2, typeof(FairyGUI.Utils.XML));
         obj.Setup_AfterAdd(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int ConstructFromXML(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         FairyGUI.GProgressBar obj  = (FairyGUI.GProgressBar)ToLua.CheckObject <FairyGUI.GProgressBar>(L, 1);
         FairyGUI.Utils.XML    arg0 = (FairyGUI.Utils.XML)ToLua.CheckObject <FairyGUI.Utils.XML>(L, 2);
         obj.ConstructFromXML(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int Update(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         FairyGUI.GProgressBar obj = (FairyGUI.GProgressBar)ToLua.CheckObject <FairyGUI.GProgressBar>(L, 1);
         double arg0 = (double)LuaDLL.luaL_checknumber(L, 2);
         obj.Update(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int Setup_AfterAdd(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         FairyGUI.GProgressBar     obj  = (FairyGUI.GProgressBar)ToLua.CheckObject <FairyGUI.GProgressBar>(L, 1);
         FairyGUI.Utils.ByteBuffer arg0 = (FairyGUI.Utils.ByteBuffer)ToLua.CheckObject <FairyGUI.Utils.ByteBuffer>(L, 2);
         int arg1 = (int)LuaDLL.luaL_checknumber(L, 3);
         obj.Setup_AfterAdd(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
    static int set_reverse(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GProgressBar obj = (FairyGUI.GProgressBar)o;
            bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
            obj.reverse = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index reverse on a nil value"));
        }
    }
 static public int TweenValue(IntPtr l)
 {
     try {
         FairyGUI.GProgressBar self = (FairyGUI.GProgressBar)checkSelf(l);
         System.Single         a1;
         checkType(l, 2, out a1);
         System.Single a2;
         checkType(l, 3, out a2);
         var ret = self.TweenValue(a1, a2);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
示例#17
0
    static int get_max(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GProgressBar obj = (FairyGUI.GProgressBar)o;
            float ret = obj.max;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index max on a nil value" : e.Message));
        }
    }
示例#18
0
    static int set_max(IntPtr L)
    {
        object o = null;

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

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GProgressBar      obj = (FairyGUI.GProgressBar)o;
            FairyGUI.ProgressTitleType ret = obj.titleType;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index titleType on a nil value"));
        }
    }
    static int get_value(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GProgressBar obj = (FairyGUI.GProgressBar)o;
            double ret = obj.value;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index value on a nil value"));
        }
    }
    static int set_titleType(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GProgressBar      obj  = (FairyGUI.GProgressBar)o;
            FairyGUI.ProgressTitleType arg0 = (FairyGUI.ProgressTitleType)ToLua.CheckObject(L, 2, typeof(FairyGUI.ProgressTitleType));
            obj.titleType = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index titleType on a nil value"));
        }
    }
    static int set_value(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GProgressBar obj = (FairyGUI.GProgressBar)o;
            double arg0 = (double)LuaDLL.luaL_checknumber(L, 2);
            obj.value = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index value on a nil value"));
        }
    }
 static int TweenValue(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         FairyGUI.GProgressBar obj = (FairyGUI.GProgressBar)ToLua.CheckObject <FairyGUI.GProgressBar>(L, 1);
         double arg0           = (double)LuaDLL.luaL_checknumber(L, 2);
         float  arg1           = (float)LuaDLL.luaL_checknumber(L, 3);
         DG.Tweening.Tweener o = obj.TweenValue(arg0, arg1);
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
    static int get_reverse(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.GProgressBar obj = (FairyGUI.GProgressBar)o;
            bool ret = obj.reverse;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index reverse on a nil value"));
        }
    }
    static int _CreateFairyGUI_GProgressBar(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 0)
            {
                FairyGUI.GProgressBar obj = new FairyGUI.GProgressBar();
                ToLua.PushObject(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: FairyGUI.GProgressBar.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }