public Tile(Point position, Sprite sprite) { this.Position = position; this.Sprite = sprite; this.Walkthrough = false; Depth = -4; }
public Sprite add(Sprite sprite) { Sprite rtn = this.getByName(sprite.Name); if(rtn == null) { rtn = sprite; this._sprites.Add(rtn); } return rtn; }
public Sprite add(string name) { Sprite rtn = this.getByName(name); if(rtn == null) { rtn = new Sprite(name); this._sprites.Add(rtn); } return rtn; }
/** * 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; }
public GenericEntity(Point position, int depth, Sprite sprite) : base(position, depth) { this.Sprite = sprite; }
public void delete(Sprite sprite) { sprite.Dispose(); this._sprites.Remove(sprite); }