Example #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);
        }
Example #2
0
 public Spike(Vector2i position)
     : base(position)
 {
 }
Example #3
0
 public Tile(Vector2i position)
     : base(position.X, position.Y, 1, 1)
 {
     Position = position;
     Fixed = true;
 }
Example #4
0
 public Block(Vector2i position)
     : base(position)
 {
 }