GameEntity class abstract

Abstract representation of a render element.

Implementers

Constructors

GameEntity(Vector position, Size size, {ImageRenderer? image, Color? color})

Properties

color Color?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
image ImageRenderer?
getter/setter pair
position Vector
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size Size
getter/setter pair
velocity Vector
getter/setter pair
x double
getter/setter pair
y double
getter/setter pair

Methods

contains(Offset position) bool
Checks if position is in the render element.
handleGesture(Offset position, Gesture gesture) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
render(Canvas canvas) → void
Renders the game entity.
reset() → void
Resets the state.
toString() String
A string representation of this object.
inherited
update(double dt) → void
Updates the game entity at each frame.

Operators

operator ==(Object other) bool
The equality operator.
inherited