/// <summary> /// /// </summary> /// <param name="entity"></param> public void ShowEntity(Entity entity) { if (entity == null) { throw new ArgumentNullException("entity"); } this.entitySprite = new EntitySprite(surf); this.frontSprites.Add(this.entitySprite); SectorSprite sectSprite = this.GetSectorSprite(entity.Sector); this.entitySprite.Center = sectSprite.Center; }
/// <summary> /// Destroy sprite /// </summary> /// <param name="disposing">If true, remove all unamanged resources</param> protected virtual void Dispose(bool disposing) { if (!this.disposed) { if (disposing) { if (this.entitySprite != null) { this.entitySprite.Dispose(); this.entitySprite = null; } if (this.sound != null) { this.sound.Dispose(); this.sound = null; } } this.disposed = true; } }