コード例 #1
0
    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
ファイル: UIBase.cs プロジェクト: DonnYep/MyUnityFrameWork
 public void DestroyItem(UIBase item)
 {
     if (m_ChildList.Contains(item))
     {
         m_ChildList.Remove(item);
         item.OnDestroy();
         GameObjectManager.DestroyGameobjectByPool(item.gameObject);
     }
 }
コード例 #4
0
ファイル: UIBase.cs プロジェクト: DonnYep/MyUnityFrameWork
    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;
    }