The world the game is running in
Constructors
Properties
- actors → List<Actor>
-
Collection of spawned actors
read / write - gamemode → GameMode
-
Gamemode the current game is running with
read / write - isRunning → bool
-
Is the game running?
read-only - onActorRemoved → Stream<Actor>
-
Emits actors which got removed
read / write - onActorSpawned → Stream<Actor>
-
Emits newly spawned actors
read / write - size → Vector2
-
Size of this world
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
-
beginPlay(
) → void -
Starts the game
-
genUID(
) → String -
Returns a unique id
-
removeActor(
Actor actor) → void -
Remove a spawned
actor
-
spawnActor<T extends Actor>(
T actor, Vector2 location, { Vector2 rotation, Vector2 scale }) → T -
Spawns a given
actor
on a givenlocation
with given optionalrotation
andscale
. Returns spawned actor. -
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