Exemplo n.º 1
0
 public Tile(Point position, Sprite sprite)
 {
     this.Position = position;
     this.Sprite = sprite;
     this.Walkthrough = false;
     Depth = -4;
 }
Exemplo n.º 2
0
 public Sprite add(Sprite sprite)
 {
     Sprite rtn = this.getByName(sprite.Name);
     if(rtn == null) {
         rtn = sprite;
         this._sprites.Add(rtn);
     }
     return rtn;
 }
Exemplo n.º 3
0
 public Sprite add(string name)
 {
     Sprite rtn = this.getByName(name);
     if(rtn == null) {
         rtn = new Sprite(name);
         this._sprites.Add(rtn);
     }
     return rtn;
 }
Exemplo n.º 4
0
 /**
  * Creates a new tile and adds it to the map.
  * The tile gets added in the array, at the indexes of the coordinates.
  * So we can get the tile back if we simply put in the coordinates in the multi-array.
  */
 public void createTile(Point position, Sprite sprite)
 {
     Tile tile = new Tile(position, sprite);
     this.Map[position.X, position.Y] = tile;
 }
Exemplo n.º 5
0
 public GenericEntity(Point position, int depth, Sprite sprite)
     : base(position, depth)
 {
     this.Sprite = sprite;
 }
Exemplo n.º 6
0
 public void delete(Sprite sprite)
 {
     sprite.Dispose();
     this._sprites.Remove(sprite);
 }