This commit is contained in:
parent
09c32c605e
commit
9033151006
6 changed files with 375 additions and 166 deletions
|
@ -5,8 +5,44 @@ using System.Collections.Generic;
|
|||
|
||||
namespace Sledgemapper
|
||||
{
|
||||
public class State
|
||||
public sealed class State
|
||||
{
|
||||
private static readonly State instance = new State();
|
||||
|
||||
// Explicit static constructor to tell C# compiler
|
||||
// not to mark type as beforefieldinit
|
||||
static State()
|
||||
{
|
||||
}
|
||||
|
||||
private State()
|
||||
{
|
||||
CurrentTileId = "";
|
||||
CurrentWallId = "";
|
||||
CurrentOverlayId = "";
|
||||
SelectedTile = new() { X = 1, Y = 1 };
|
||||
HoveredTile = new() { X = 1, Y = 1 };
|
||||
SelectedWall = new() { X = 1, Y = 1 };
|
||||
SelectedOverlay = new() { X = 1, Y = 1 };
|
||||
SelectedNote = new() { X = 1, Y = 1 };
|
||||
TileSize = 30;
|
||||
LineWidth = 1;
|
||||
ViewportCenter = new(0, 0, 0);
|
||||
}
|
||||
|
||||
public static State Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public Tile SelectedTile { get; set; }
|
||||
public Tile HoveredTile { get; set; }
|
||||
public Wall SelectedWall { get; set; }
|
||||
|
@ -25,20 +61,20 @@ namespace Sledgemapper
|
|||
public bool ShowCellNumbers { get; set; }
|
||||
public Vector3 ViewportCenter { get; set; }
|
||||
|
||||
public State()
|
||||
{
|
||||
CurrentTileId = "";
|
||||
CurrentWallId = "";
|
||||
CurrentOverlayId = "";
|
||||
SelectedTile = new() { X = 1, Y = 1 };
|
||||
HoveredTile = new() { X = 1, Y = 1 };
|
||||
SelectedWall = new() { X = 1, Y = 1 };
|
||||
SelectedOverlay = new() { X = 1, Y = 1 };
|
||||
SelectedNote = new() { X = 1, Y = 1 };
|
||||
TileSize = 30;
|
||||
LineWidth=1;
|
||||
ViewportCenter = new(0, 0, 0);
|
||||
}
|
||||
//public State()
|
||||
//{
|
||||
// CurrentTileId = "";
|
||||
// CurrentWallId = "";
|
||||
// CurrentOverlayId = "";
|
||||
// SelectedTile = new() { X = 1, Y = 1 };
|
||||
// HoveredTile = new() { X = 1, Y = 1 };
|
||||
// SelectedWall = new() { X = 1, Y = 1 };
|
||||
// SelectedOverlay = new() { X = 1, Y = 1 };
|
||||
// SelectedNote = new() { X = 1, Y = 1 };
|
||||
// TileSize = 30;
|
||||
// LineWidth=1;
|
||||
// ViewportCenter = new(0, 0, 0);
|
||||
//}
|
||||
|
||||
public void SelectClosestWall(Point mousePosition)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue