예제 #1
0
파일: Tile.cs 프로젝트: Railec/SE1cKBS
 public Tile(Point position, Sprite sprite)
 {
     this.Position = position;
     this.Sprite = sprite;
     this.Walkthrough = false;
     Depth = -4;
 }
예제 #2
0
 public Sprite add(Sprite sprite)
 {
     Sprite rtn = this.getByName(sprite.Name);
     if(rtn == null) {
         rtn = sprite;
         this._sprites.Add(rtn);
     }
     return rtn;
 }
예제 #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;
 }
예제 #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;
 }
예제 #5
0
 public GenericEntity(Point position, int depth, Sprite sprite)
     : base(position, depth)
 {
     this.Sprite = sprite;
 }
예제 #6
0
 public void delete(Sprite sprite)
 {
     sprite.Dispose();
     this._sprites.Remove(sprite);
 }