generic doors
This commit is contained in:
@@ -19,7 +19,8 @@ namespace Escape_Room_Engine.Engine.Scripts
|
||||
this.rrDimensions = rrDimensions;
|
||||
|
||||
// connect the space to its passage
|
||||
entrance.ConnectTo(new DoorModule(DoorType.Entrance, this));
|
||||
entrance.ConnectTo(new DoorModule(this,
|
||||
((DoorModuleDescription)entrance.fromOut._description).connectedDoorDescription));
|
||||
AddModule(entrance.toIn);
|
||||
}
|
||||
|
||||
@@ -39,6 +40,9 @@ namespace Escape_Room_Engine.Engine.Scripts
|
||||
|
||||
var meshRenderer = _spaceObject.GetComponent<MeshRenderer>();
|
||||
meshRenderer.material = Engine.DefaultEngine.roomMaterial;
|
||||
|
||||
// instantiate all modules inside this space
|
||||
_modules.ForEach(module => module.InstantiateModule(_spaceObject.transform));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user