EventPosition class

EventPosition converts position based events to three different coordinate systems (global, local and game).

global: coordinate system relative to the entire app; same as globalPosition in Flutter. widget: coordinate system relative to the GameWidget widget; same as localPosition in Flutter. viewport: same as widget but also applies any transformations from the viewport to the coordinate system. game: same as widget but also applies any transformations from the camera and viewport to the coordinate system.

Constructors

EventPosition(Game _game, Offset _globalPosition)

Properties

game Vector2
Coordinates of the event relative to the game position/size and transformations
latefinal
global Vector2
Coordinates of the event relative to the whole screen
latefinal
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
viewport Vector2
Coordinates of the event relative to the game position/size but applying only viewport transformations (not camera).
latefinal
widget Vector2
Coordinates of the event relative to the game widget position/size
latefinal

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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