Removed OmniLights from Walls, added spotlights to robots. Added vase 3D model
This commit is contained in:
+2
-18
@@ -142,6 +142,8 @@ public partial class World : Node3D
|
||||
robot.Position = map[0].tiles[0, 0].Position;
|
||||
AddChild(robot);
|
||||
robots.Add(robot);
|
||||
LightHandler.lights.Add(robot.GetNode("./SpotLight3D") as SpotLight3D);
|
||||
LightHandler.RedrawLights(lightColor);
|
||||
}
|
||||
|
||||
private void SpawnSavedRobots(List<RobotSaveData> savedRobots)
|
||||
@@ -193,7 +195,6 @@ public partial class World : Node3D
|
||||
{
|
||||
map[0].tiles[0, 0].wasVisited = true;
|
||||
map[0].tiles[0, 0].containsDecoration = true;
|
||||
map[0].tiles[0, 0].containsLight = true;
|
||||
map[0].tiles[0, 0].containsResource = false;
|
||||
map[0].tiles[0, 0].ContentNode.Visible = true;
|
||||
}
|
||||
@@ -234,22 +235,10 @@ public partial class World : Node3D
|
||||
private void DistributeTileContent(Layer layer)
|
||||
{
|
||||
int currentDecoration = 0;
|
||||
int currentLight = 0;
|
||||
int currentResource = 0;
|
||||
|
||||
int posX, posY;
|
||||
|
||||
while (currentLight < layerSize * 3)
|
||||
{
|
||||
posX = rand.Next(layerSize);
|
||||
posY = rand.Next(layerSize);
|
||||
if (CannotContainLight(layer.tiles[posX, posY])) continue;
|
||||
if (layer.tiles[posX, posY].containsLight) continue;
|
||||
|
||||
layer.tiles[posX, posY].containsLight = true;
|
||||
currentLight++;
|
||||
}
|
||||
|
||||
while (currentDecoration < layerSize)
|
||||
{
|
||||
posX = rand.Next(layerSize);
|
||||
@@ -273,11 +262,6 @@ public partial class World : Node3D
|
||||
}
|
||||
}
|
||||
|
||||
private bool CannotContainLight(Tile tile)
|
||||
{
|
||||
return tile.collapsedMesh == "junction" || tile.collapsedMesh == "gate";
|
||||
}
|
||||
|
||||
private void HandleRenderData(List<TileRenderData> renderData)
|
||||
{
|
||||
multiMeshHandler.Build(renderData);
|
||||
|
||||
Reference in New Issue
Block a user