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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user