예제 #1
0
        public static Tile Create(this TileType type, Vector2i position)
        {
            switch(type)
            {
                case TileType.Block:
                    return new Block(position);
                case TileType.Spike:
                    return new Spike(position);
            }

            throw new ArgumentException("Unexpected type " + type);
        }
예제 #2
0
 public Spike(Vector2i position)
     : base(position)
 {
 }
예제 #3
0
 public Tile(Vector2i position)
     : base(position.X, position.Y, 1, 1)
 {
     Position = position;
     Fixed = true;
 }
예제 #4
0
 public Block(Vector2i position)
     : base(position)
 {
 }