Base class used for entities in the world
Static Methods
-
getColliderBoxNormals(
List<Vector2> corners) → List<Vector2> -
Returns list of normals a collider box has constructed by a list of
corners
Constructors
- Actor()
-
Constructor
Properties
- collideEvent → StreamController<Actor>
-
Used to broadcast collide events
read / write - colliderBoxExtent → Vector2
-
Collider dimensions
read / write - isCircleCollider → bool
-
Using a circle or box primitive for collision?
read / write - location → Vector2
-
Location
read / write - name → String
-
Name
read / write - onCollide → Stream<Actor>
-
Emits actors this actor collides with
read / write - onMove → Stream<Vector2>
-
Emits new position on change
read / write - onRotate → Stream<Vector2>
-
Emits new rotation on change
read / write - onScale → Stream<Vector2>
-
Emits new scale on change
read / write - rotation → Vector2
-
Rotation
read / write - scale → Vector2
-
Sets new
scale
read / write - world → World
-
World
read-only - 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 -
Called when the level starts
-
getColliderBoxCorners(
Vector2 destLocation) → List<Vector2> -
Returns list of corners this actor had with a box collider on
destLocation
-
initialize(
World world) → void -
Called when the actor is instantiated in the
world
-
isCollidingWith(
Actor other, [ Vector2 destLocation ]) → bool -
Is colliding with
other
on current or optionaldestLocation
? -
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