示例#1
0
 public override void OnRemove()
 {
     base.OnRemove();
     if (this.Tile != null)
     {
         this.Tile.Entities.Remove(this.Entity);
     }
     this.Tile = null;
 }
示例#2
0
 public void SetTile(TiledIntegrator.Tile tile)
 {
     if (this.Tile == tile)
         return;
     if (this.Tile != null)
         this.Tile.Entities.Remove(this.Entity);
     this.Tile = tile;
     if( this.Tile != null )
         this.Tile.Entities.Add(this.Entity);
 }
示例#3
0
 /// <summary>
 /// Changes the tile and updates the new and old tiles' entity list
 /// </summary>
 /// <param name="tile"></param>
 public void SetTile(TiledIntegrator.Tile tile)
 {
     if (this.Tile == tile)
     {
         return;
     }
     if (this.Tile != null)
     {
         this.Tile.Entities.Remove(this.Entity);
     }
     this.Tile = tile;
     if (this.Tile != null)
     {
         this.Tile.Entities.Add(this.Entity);
     }
 }