/// <summary> /// Attaches a video sprite to the list controlled by this manager. This will load the texture from the content pipeline and link the sprite with the manager for drawing and updating. /// </summary> /// <param name="sprite"></param> public void Attach(IEngineSprite sprite) { if (!spriteList.Contains(sprite)) { sprite.Destroy = false; sprite.Manager = this; spriteList.Add(sprite); } else Log.Write(this, "Sprite being added was already in list.", LogLevels.Warning); }
public void Attach(IEngineSprite entity) { if (!spriteList.Contains(entity)) spriteList.Add(entity); else Log.Write(this, "Unable to attach 2D entity, was already found in the list of existing ones.", LogLevels.Warning); }
/// <summary> /// Marks a sprite to be removed on next update. This breaks the link between manager and sprite, it will no longer be drawn or updated. /// </summary> /// <param name="sprite"></param> public void Detatch(IEngineSprite sprite) { sprite.Destroy = true; }