Rooms
Hugo Delaunay edited this page Apr 9, 2022
·
5 revisions
Create a new Room
instance and pass your interactables. You also have to give it an identifier. Be careful, this identifier should be unique across your rooms !
You can change a room render settings (asset, width, height, ...) by passing a custom RenderSettings
object. By default, the room background should be assets/backgrounds/id.png
(where id
is your room identifier). Therefore, don't forget to add the directory assets/backgrounds/
in your pubspec.yaml
(see example).
Rooms are rendered by default using the RoomWidget
widget. You can change this behavior by passing a custom roomWidgetBuilder
to your EscapeGameWidget
.
Room myRoom = Room(
id: 'room-1',
interactables: [
myFirstInteractable,
mySecondInteractable,
// ...
],
);
EscapeGame escapeGame = EscapeGame(
rooms: [
myRoom,
// ...
],
);
EscapeGameKit has been created by Skyost.