Class for a gameinstance which represents the current game
Constructors
- GameMode()
-
Constructor
Properties
- enemyCount → int
-
Current enemy count
read / write - gameOverEvent → StreamController<bool>
-
Used to broadcast game over events
read / write - isRunning → bool
-
Is the game running?
read-only - loaded → bool
-
is the game loaded?
read-only - onEnemyCountChange → Stream<int>
-
Emits current enemy count on change
read / write - onGameOver → Stream<bool>
-
Emits game over events
read / write - player → Character
-
Current player character
read / write - world → World
-
World the game is currently happening in
read / write - hashCode → int
-
The hash code for this object.
read-only, inherited - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Operators
-
operator ==(
other) → bool -
The equality operator.
inherited
Methods
-
load(
Level level) → void -
Loads and inits a new
level
-
moveCharacter(
Vector2 velocity) → void -
Moves the current player character in this game by a given
velocity
-
start(
) → void -
Start the game
-
stop(
) → void -
Stop the game
-
tick(
double deltaTime) → void -
Used for operations which need to be done in short intervals where
deltaTime
specifies the time since the last tick -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited -
toString(
) → String -
Returns a string representation of this object.
inherited