Thursday, 11 September 2025 02:29:56
This commit is contained in:
@@ -15,16 +15,12 @@ public partial class Desk : Node2D
|
||||
_dark = GetNode<Sprite2D>("Dark");
|
||||
|
||||
_cellDimensions = new Vector2(50, 50);
|
||||
_gridDimensions = new Vector2(10, 20);
|
||||
_topLeft = Globals.Instance._screenCenter - _cellDimensions * _gridDimensions / 2 + _cellDimensions / 2;
|
||||
GD.Print(_topLeft);
|
||||
Setup();
|
||||
|
||||
}
|
||||
|
||||
public Vector2 GetPositionFromAddress(int ROW, int COLUMN)
|
||||
{
|
||||
|
||||
|
||||
|
||||
if (_grid.HasNode("R" + ROW))
|
||||
{
|
||||
Node2D row = _grid.GetNode<Node2D>("R" + ROW);
|
||||
@@ -37,8 +33,10 @@ public partial class Desk : Node2D
|
||||
return new Vector2(-1, -1);
|
||||
}
|
||||
|
||||
public void Setup()
|
||||
public void Setup(int ROWS, int COLUMNS)
|
||||
{
|
||||
_gridDimensions = new Vector2(COLUMNS, ROWS);
|
||||
_topLeft = Globals.Instance._screenCenter - _cellDimensions * _gridDimensions / 2 + _cellDimensions / 2;
|
||||
Vector2 position;
|
||||
Node2D row;
|
||||
Sprite2D column;
|
||||
|
||||
Reference in New Issue
Block a user