Added final features for this release. Now only polishing (if needed) remains.

Features: Sacrifice-Node, Maintain-Node, Options for screen type, lightcolor and soundvolume, tied in sound effects, game pause when menu is open, visibly open up gate when opening it.
This commit is contained in:
2026-05-10 14:09:14 +02:00
parent 228e81ab4e
commit 8170b700b2
28 changed files with 797 additions and 14 deletions
+10
View File
@@ -39,6 +39,16 @@ public partial class Layer : Node3D
}
}
public void OpenGate()
{
isGateOpen = true;
Tile gateTile = tiles[gateCoordinate.X, gateCoordinate.Y];
if (gateTile.ContentNode != null)
{
gateTile.ContentNode.Visible = false;
}
}
public void SetupLayer(int layerSize, int level, Dictionary<string, MeshInstance3D> tileMeshes, Vector2I collapseOrigin)
{
this.layerSize = layerSize;
+30
View File
@@ -98,6 +98,13 @@ public partial class World : Node3D
public override void _Process(double delta)
{
UpdateGameLoop(delta);
}
public void UpdateGameLoop(double delta)
{
if (isPaused) return;
survival.Update(delta);
if (!canMove) return;
@@ -110,6 +117,25 @@ public partial class World : Node3D
}
}
public void RefreshVisibleLayer()
{
ShowLayer(visibleLayer);
}
public void OpenGate(int layerIndex)
{
if (layerIndex < 0 || layerIndex >= map.Length) return;
Layer layer = map[layerIndex];
layer.OpenGate();
Pathfinding.UpdateGatePoint(layerIndex, true);
if (layerIndex == visibleLayer)
{
RefreshVisibleLayer();
}
}
private void SpawnDefaultRobot()
{
Robot robot = ResourceLoader.LoadRobotPrefab().Instantiate<Robot>();
@@ -184,6 +210,10 @@ public partial class World : Node3D
for (int y = 0; y < layerSize; y++)
{
Tile tile = layer.tiles[x, y];
if (layer.isGateOpen && tile.collapsedMesh == "gate")
{
continue;
}
result.Add(new TileRenderData
{
Tile = tile,