private static void Remove(GPUEmitterId id) { var emitter = m_emitters.Data[id.Index]; m_idIndex.Remove(emitter.GPUEmitter.GID); m_freeBufferIndices.Enqueue(emitter.BufferIndex); m_emitters.Free(id.Index); RemoveTexture(emitter.TextureId); }
internal static void Create(uint GID) { var id = new GPUEmitterId { Index = m_emitters.Allocate() }; MyRenderProxy.Assert(m_freeBufferIndices.Count > 0, "Too many live emitters!"); m_emitters.Data[id.Index] = new MyLiveData { BufferIndex = m_freeBufferIndices.Dequeue(), TextureId = Resources.TexId.NULL, DieAt = float.MaxValue }; m_idIndex[GID] = id; }