static int CreateUI(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                WCG.UIMgr obj            = (WCG.UIMgr)ToLua.CheckObject <WCG.UIMgr>(L, 1);
                string    arg0           = ToLua.CheckString(L, 2);
                UnityEngine.GameObject o = obj.CreateUI(arg0);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else if (count == 3)
            {
                WCG.UIMgr obj  = (WCG.UIMgr)ToLua.CheckObject <WCG.UIMgr>(L, 1);
                string    arg0 = ToLua.CheckString(L, 2);
                UnityEngine.GameObject arg1 = (UnityEngine.GameObject)ToLua.CheckObject(L, 3, typeof(UnityEngine.GameObject));
                UnityEngine.GameObject o    = obj.CreateUI(arg0, arg1);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: WCG.UIMgr.CreateUI"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Esempio n. 2
0
 static int set_ms_uiMgr(IntPtr L)
 {
     try
     {
         WCG.UIMgr arg0 = (WCG.UIMgr)ToLua.CheckObject <WCG.UIMgr>(L, 2);
         WCG.GameMgr.ms_uiMgr = arg0;
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int Update(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         WCG.UIMgr obj = (WCG.UIMgr)ToLua.CheckObject <WCG.UIMgr>(L, 1);
         obj.Update();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int SetParentNULL(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         WCG.UIMgr obj = (WCG.UIMgr)ToLua.CheckObject <WCG.UIMgr>(L, 1);
         UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckObject(L, 2, typeof(UnityEngine.GameObject));
         obj.SetParentNULL(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int GetUICamera(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         WCG.UIMgr          obj = (WCG.UIMgr)ToLua.CheckObject <WCG.UIMgr>(L, 1);
         UnityEngine.Camera o   = obj.GetUICamera();
         ToLua.PushSealed(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int GetRootXYRate(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         WCG.UIMgr           obj = (WCG.UIMgr)ToLua.CheckObject <WCG.UIMgr>(L, 1);
         UnityEngine.Vector2 o   = obj.GetRootXYRate();
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int DropdownAddOptions(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         WCG.UIMgr obj = (WCG.UIMgr)ToLua.CheckObject <WCG.UIMgr>(L, 1);
         UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckObject(L, 2, typeof(UnityEngine.GameObject));
         object[] arg1 = ToLua.CheckObjectArray(L, 3);
         obj.DropdownAddOptions(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int SetText(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         WCG.UIMgr obj = (WCG.UIMgr)ToLua.CheckObject <WCG.UIMgr>(L, 1);
         UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckObject(L, 2, typeof(UnityEngine.GameObject));
         string arg1 = ToLua.CheckString(L, 3);
         obj.SetText(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int SetAllLineRenderer(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         WCG.UIMgr obj = (WCG.UIMgr)ToLua.CheckObject <WCG.UIMgr>(L, 1);
         UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckObject(L, 2, typeof(UnityEngine.GameObject));
         float arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
         obj.SetAllLineRenderer(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int GetWinPixelSize(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         WCG.UIMgr obj = (WCG.UIMgr)ToLua.CheckObject <WCG.UIMgr>(L, 1);
         UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckObject(L, 2, typeof(UnityEngine.GameObject));
         UnityEngine.Vector2    o    = obj.GetWinPixelSize(arg0);
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int SetAnimationRate(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 4);
         WCG.UIMgr             obj  = (WCG.UIMgr)ToLua.CheckObject <WCG.UIMgr>(L, 1);
         UnityEngine.Animation arg0 = (UnityEngine.Animation)ToLua.CheckObject(L, 2, typeof(UnityEngine.Animation));
         string arg1 = ToLua.CheckString(L, 3);
         float  arg2 = (float)LuaDLL.luaL_checknumber(L, 4);
         obj.SetAnimationRate(arg0, arg1, arg2);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int CreateUIByCache(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         WCG.UIMgr obj  = (WCG.UIMgr)ToLua.CheckObject <WCG.UIMgr>(L, 1);
         string    arg0 = ToLua.CheckString(L, 2);
         UnityEngine.GameObject arg1 = (UnityEngine.GameObject)ToLua.CheckObject(L, 3, typeof(UnityEngine.GameObject));
         UnityEngine.GameObject o    = obj.CreateUIByCache(arg0, arg1);
         ToLua.PushSealed(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int SetTextColor(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 5);
         WCG.UIMgr obj = (WCG.UIMgr)ToLua.CheckObject <WCG.UIMgr>(L, 1);
         UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckObject(L, 2, typeof(UnityEngine.GameObject));
         int arg1 = (int)LuaDLL.luaL_checknumber(L, 3);
         int arg2 = (int)LuaDLL.luaL_checknumber(L, 4);
         int arg3 = (int)LuaDLL.luaL_checknumber(L, 5);
         obj.SetTextColor(arg0, arg1, arg2, arg3);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Esempio n. 14
0
        public GameObject BindEffectByPos(string sEffect, float nPosX, float nPosY, float nPosZ, float fLogicDir, float fDecTime)
        {
            GameObject oEffectObj = ResourceMgr.LoadAssetEx(sEffect, true);

            if (!oEffectObj)
            {
                DebugMsg("BindEffectByPos wrong sEffect:" + sEffect);
                return(null);
            }
            oEffectObj.SetActive(false);
            float fGraphPosZ = SceneMgr.Instance.GetGraphicsPosZ(nPosY);

            oEffectObj.transform.position = new Vector3(nPosX, nPosY, fGraphPosZ);
            oEffectObj.transform.rotation = GetGraphRotation(fLogicDir);

            UIMgr.SetLayer(oEffectObj, gameObject.layer);
            DealFixedRotation(oEffectObj);
            oEffectObj.SetActive(true);
            return(oEffectObj);
        }
    static int _CreateWCG_UIMgr(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

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