Light and decorations adjusted. Added all resource and light spawn points
This commit is contained in:
+4
-5
@@ -77,12 +77,11 @@ public partial class Tile
|
||||
|
||||
public void SpawnContent(Dictionary<string, MeshInstance3D> contentMeshes, Transform3D transform, List<Placeholder> placeholders)
|
||||
{
|
||||
|
||||
foreach (Placeholder placeholder in placeholders)
|
||||
{
|
||||
if (containsLight && placeholder.name.ToLower() == "light") SpawnLight(contentMeshes["light"], placeholder, transform);
|
||||
else if (containsResource && placeholder.name.ToLower() == "resource") SpawnResource(contentMeshes["resource"], placeholder, transform);
|
||||
else if (containsDecoration) SpawnDecorations(contentMeshes, placeholder, transform);
|
||||
if (containsLight && placeholder.name == "light") SpawnLight(contentMeshes["light"], placeholder, transform);
|
||||
else if (containsResource && placeholder.name == "resource") SpawnResource(contentMeshes["resource"], placeholder, transform);
|
||||
else if (containsDecoration && placeholder.name != "light" && placeholder.name != "resource") SpawnDecorations(contentMeshes, placeholder, transform);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +124,7 @@ public partial class Tile
|
||||
{
|
||||
foreach (string key in contentMeshes.Keys)
|
||||
{
|
||||
if (key.ToLower() != placeholder.name.ToLower()) continue;
|
||||
if (key.ToLower() != placeholder.name) continue;
|
||||
MeshInstance3D decoration = new MeshInstance3D
|
||||
{
|
||||
Mesh = contentMeshes[key].Mesh,
|
||||
|
||||
Reference in New Issue
Block a user