Class for the "hero" possesed by the player
Constructors
Properties
- charLives → int
-
Lives
read / write - onLivesChange → Stream<int>
-
Emits new amount of lives on change
read / write - speed → dynamic
-
@override, read-only
- collideEvent → StreamController<Actor>
-
Used to broadcast collide events
read / write, inherited - colliderBoxExtent → Vector2
-
Collider dimensions
read / write, inherited - hashCode → int
-
The hash code for this object.
read-only, inherited - isCircleCollider → bool
-
Using a circle or box primitive for collision?
read / write, inherited - location → Vector2
-
Location
read / write, inherited - maxSpeed → double
-
Max speed
read / write, inherited - name → String
-
Name
read / write, inherited - onCollide → Stream<Actor>
-
Emits actors this actor collides with
read / write, inherited - onMove → Stream<Vector2>
-
Emits new position on change
read / write, inherited - onRotate → Stream<Vector2>
-
Emits new rotation on change
read / write, inherited - onScale → Stream<Vector2>
-
Emits new scale on change
read / write, inherited - rotation → Vector2
-
Rotation
read / write, inherited - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited - scale → Vector2
-
Sets new
scale
read / write, inherited - world → World
-
World
read-only, inherited
Operators
-
operator ==(
other) → bool -
The equality operator.
inherited
Methods
-
initialize(
World world) → void -
Called when the actor is instantiated in the
world
-
tick(
double deltaTime) → void -
Used for operations which need to be done in short intervals where
deltaTime
specifies the time since the last tick -
walk(
Vector2 velocity) → void -
Used to control the direction and speed of the movement by a given
velocity
-
beginPlay(
) → void -
Called when the level starts
inherited -
collidingWithOnPosition(
Vector2 destLocation) → List<Actor> -
Returns a list of other Actors which collide with this Pawn on a given
destLocation
inherited -
getColliderBoxCorners(
Vector2 destLocation) → List<Vector2> -
Returns list of corners this actor had with a box collider on
destLocation
inherited -
isCollidingWith(
Actor other, [ Vector2 destLocation ]) → bool -
Is colliding with
other
on current or optionaldestLocation
?inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited -
requestWalkToLocation(
Vector2 position) → void -
Assign a new target
position
to walk towards toinherited -
toString(
) → String -
Returns a string representation of this object.
inherited