35 lines
561 B
C#
35 lines
561 B
C#
using System;
|
|
|
|
public enum TileType
|
|
{
|
|
Empty,
|
|
Floor
|
|
}
|
|
|
|
public class Tile
|
|
{
|
|
private TileType _type = TileType.Empty;
|
|
public TileType Type {
|
|
get => _type;
|
|
set
|
|
{
|
|
_type = value;
|
|
Stage.OnTileChanged?.Invoke(this);
|
|
}
|
|
}
|
|
|
|
public InstalledObject InstalledObject { get; set; } // for later use
|
|
|
|
public int X { get; }
|
|
public int Y { get; }
|
|
public Stage Stage { get; }
|
|
|
|
public Tile (Stage stage, int x, int y)
|
|
{
|
|
Stage = stage;
|
|
X = x;
|
|
Y = y;
|
|
}
|
|
|
|
}
|