示例#1
0
        /// <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;
        }
示例#2
0
 /// <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;
     }
 }
示例#3
0
 /// <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;
     }
 }
示例#4
0
 /// <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;
 }