EscapeGame class
Represents an EscapeGame, with some rooms and an inventory.
- Mixed in types
Constructors
-
EscapeGame({Inventory? inventory, Iterable<
Room> ? rooms, String? firstRoomId, Countdown? countdown}) - Creates a new EscapeGame instance.
Properties
- countdown ↔ Countdown?
-
The game Countdown.
getter/setter pair
- currentRoom → Room
-
Returns the current room.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- inventory → Inventory
-
The in-game inventory.
final
- isDialogOpened → bool
-
Returns whether a dialog is currently opened.
no setter
- isFinished → bool
-
Returns whether this game is finished.
no setter
- isStarted → bool
-
Returns whether this game is started.
no setter
- openedDialog → EscapeGameDialog?
-
Returns the opened dialog.
no setter
-
props
→ List<
Object?> -
The properties list.
no setter
-
rooms
↔ Set<
Room> -
The game rooms.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
dismissDialog(
{bool notify = true}) → void - Closes the currently opened dialog.
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
override
-
finish(
{bool notify = true}) → void - Finishes this game.
-
getRoomById(
String roomId) → Room? - Returns a room object by its Room.id.
-
goToRoom(
String roomId, {bool notify = true}) → ActionResult - Changes the current room.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
onCancelled(
) → void -
Triggered when the countdown was cancelled.
inherited
-
onPaused(
) → void -
Triggered when the countdown has paused.
inherited
-
onResumed(
) → void -
Triggered when the countdown has resumed.
inherited
-
onStarted(
) → void -
Triggered when the countdown has started.
inherited
-
onTick(
Duration currentDuration) → void -
Triggered when the countdown has updated its current duration.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
showDialog(
EscapeGameDialog dialog, {bool notify = true}) → void - Opens the specified dialog.
-
start(
{bool notify = true}) → ActionResult - Starts this game.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited