Removed popup from the game, added simple options and menu. Added spawn to tiles and reworked content spawning
This commit is contained in:
@@ -29,7 +29,7 @@ public partial class Layer : Node3D
|
||||
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void ClearDecorations()
|
||||
@@ -113,6 +113,8 @@ public partial class Layer : Node3D
|
||||
{
|
||||
for (int z = 0; z < layerSize; z++)
|
||||
{
|
||||
//Exclude spawn from border generation
|
||||
if(x == 0 && z == 0) continue;
|
||||
if (!IsBorder(x, z))
|
||||
continue;
|
||||
|
||||
@@ -135,6 +137,13 @@ public partial class Layer : Node3D
|
||||
|
||||
private void GenerateNecessaryTiles()
|
||||
{
|
||||
//Generate spawn only in the first layer
|
||||
if (level == 0)
|
||||
{
|
||||
tiles[0,0].Collapse("spawn");
|
||||
Propagate(new Vector2I());
|
||||
}
|
||||
//Randomly position the gate to the next layer
|
||||
int posX, posY;
|
||||
while (true)
|
||||
{
|
||||
@@ -146,11 +155,12 @@ public partial class Layer : Node3D
|
||||
{
|
||||
tiles[posX, posY].Collapse("gate");
|
||||
gateCoordinate = new Vector2I(posX, posY);
|
||||
GD.Print(gateCoordinate);
|
||||
Propagate(gateCoordinate);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public bool GenerateLayer(Vector2I collapseOrigin)
|
||||
|
||||
Reference in New Issue
Block a user