コード例 #1
0
        public static void Remove(IUniversalLauncherShell shell, byte userId)
        {
            var pools = m_objectsPools[userId];
            IUniversalLauncherShellsPool pool = pools[shell.GetType()];

            pool.Remove(shell);
            MyEntities.RemoveFromClosedEntities(shell as MyEntity);
        }
コード例 #2
0
        //  Add new shell to the list
        public static T Allocate <T>(byte userId) where T : class, IUniversalLauncherShell, new()
        {
            var pools = m_objectsPools[userId];
            IUniversalLauncherShellsPool pool = pools[typeof(T)];

            T newItem = pool.Allocate <T>();

            return(newItem);
        }