public void deleteText(int textIndex) { // bounds checker if (textIndex < 0 || textIndex > _textSprites.Count - 1) { return; } // how many sprites are we cleaning up? int length = _textSprites[textIndex].Length; for (int i = 0; i < length; i++) { _manager.removeElement(_textSprites[textIndex][i]); _textSprites[textIndex][i] = null; } _textSprites[textIndex] = null; }
// Removes the sprite from the mesh and destroys it's client GO public virtual void destroy() { manager.removeElement(this); }