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

            if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject), typeof(float)))
            {
                UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.ToObject(L, 1);
                float arg1 = (float)LuaDLL.lua_tonumber(L, 2);
                GameObjectManager.DestroyGameobjectByPool(arg0, arg1);
                return(0);
            }
            else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(UnityEngine.GameObject), typeof(bool)))
            {
                UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.ToObject(L, 1);
                bool arg1 = LuaDLL.lua_toboolean(L, 2);
                GameObjectManager.DestroyGameobjectByPool(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: GameObjectManager.DestroyGameobjectByPool"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
예제 #2
0
    public virtual void OnCompleteEnterAnim()
    {
        //AnimSystem.Move(gameObject, Vector3.zero, Vector3.one, 0.5f, isLocal: false);

        GameObject go = GameObjectManager.CreatGameObjectByPool("go");

        GameObjectManager.DestroyGameobjectByPool(go);
    }
예제 #3
0
 public void DestroyItem(UIBase item)
 {
     if (m_ChildList.Contains(item))
     {
         m_ChildList.Remove(item);
         item.OnDestroy();
         GameObjectManager.DestroyGameobjectByPool(item.gameObject);
     }
 }
예제 #4
0
    public void CleanItem()
    {
        for (int i = 0; i < m_ChildList.Count; i++)
        {
            m_ChildList[i].OnDestroy();
            GameObjectManager.DestroyGameobjectByPool(m_ChildList[i].gameObject);
        }

        m_ChildList.Clear();
        m_childUIIndex = 0;
    }