station 46 room
This commit is contained in:
@@ -41,8 +41,10 @@ namespace EscapeRoomEngine.Engine.Runtime
|
||||
return modules;
|
||||
}
|
||||
}
|
||||
|
||||
protected GameObject spaceObject;
|
||||
|
||||
private GameObject _spaceObject, _spaceTiles;
|
||||
private GameObject _spaceTiles;
|
||||
private List<Module> _stagedModules = new();
|
||||
|
||||
internal Space(Room room, Passage entrance)
|
||||
@@ -97,15 +99,15 @@ namespace EscapeRoomEngine.Engine.Runtime
|
||||
return requirementsFulfilled;
|
||||
}
|
||||
|
||||
internal void InstantiateSpace(Transform parent, string name)
|
||||
internal virtual void InstantiateSpace(Transform parent, string name)
|
||||
{
|
||||
_spaceObject = new GameObject($"Space {name}");
|
||||
_spaceObject.transform.SetParent(parent, false);
|
||||
_spaceObject.transform.localPosition = new Vector3(rrPlacement.position.x, 0, rrPlacement.position.z);
|
||||
spaceObject = new GameObject($"Space {name}");
|
||||
spaceObject.transform.SetParent(parent, false);
|
||||
spaceObject.transform.localPosition = new Vector3(rrPlacement.position.x, 0, rrPlacement.position.z);
|
||||
|
||||
// build the space floor out of tiles
|
||||
_spaceTiles = new GameObject($"Space Geometry");
|
||||
_spaceTiles.transform.SetParent(_spaceObject.transform, false);
|
||||
_spaceTiles.transform.SetParent(spaceObject.transform, false);
|
||||
_spaceTiles.isStatic = true;
|
||||
for (var z = 0; z < rrPlacement.size.y; z++)
|
||||
{
|
||||
@@ -131,7 +133,7 @@ namespace EscapeRoomEngine.Engine.Runtime
|
||||
}
|
||||
|
||||
// instantiate all modules inside this space
|
||||
Modules.ForEach(module => module.InstantiateModule(_spaceObject.transform));
|
||||
Modules.ForEach(module => module.InstantiateModule(spaceObject.transform));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user