Camera class
- Mixed in types
Constructors
- Camera(CameraConfig config)
Properties
- angle → double
-
no setter
- cameraRect → Rect
-
no setter
- cameraRectWithSpacing → Rect
-
no setter
- config → CameraConfig
-
final
- defaultShakeDuration ↔ double
-
getter/setter pair
- defaultShakeIntensity ↔ double
-
getter/setter pair
- gameRef ↔ BonfireGameInterface
-
getter/setter pairinherited
- hasGameRef → bool
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isMoving → bool
-
no setter
- position ↔ Offset
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shaking → bool
-
Whether the camera is currently shaking or not.
no setter
- zoom → double
-
no setter
Methods
-
animateLoopRotation(
{required List< double> angles, required int repeatCount, bool normalizeOnFinish = true, List<Duration> ? pauseDuration, List<Duration> ? rotationDuration, List<Curve> ? curves, VoidCallback? onFinish}) → void -
animateSimpleRotation(
{required double angle, Duration? duration, VoidCallback? onFinish, Curve curve = Curves.decelerate}) → void -
animateZoom(
{required double zoom, Duration? duration, VoidCallback? finish, Curve curve = Curves.decelerate}) → void -
contains(
Offset c) → bool -
isComponentOnCamera(
GameComponent c) → bool -
isRectOnCamera(
Rect c) → bool -
moveDown(
double displacement) → void -
moveRight(
double displacement) → void -
moveTop(
double displacement) → void -
moveToPlayer(
) → void -
moveToPlayerAnimated(
{Duration? duration, VoidCallback? finish, double zoom = 1, double angle = 0, Curve curve = Curves.decelerate}) → void -
moveToPosition(
Offset position) → void -
moveToPositionAnimated(
Offset position, {double zoom = 1, double angle = 0, VoidCallback? finish, Duration? duration, Curve curve = Curves.decelerate}) → void -
moveToTarget(
GameComponent? target) → void -
moveToTargetAnimated(
GameComponent target, {double zoom = 1, double angle = 0, VoidCallback? finish, Duration? duration, Curve curve = Curves.decelerate}) → void -
moveUp(
double displacement) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
screenPositionToWorld(
Offset position) → Offset -
shake(
{double? duration, double? intensity}) → void -
Applies a shaking effect to the camera for
duration
seconds and withintensity
expressed in pixels. IffocusPlayerOnFinishShake
is true, camera will focus on player after shaking instead of its last position -
toString(
) → String -
A string representation of this object.
inherited
-
update(
double dt) → void -
updateSpacingVisibleMap(
double space) → void -
worldPositionToScreen(
Offset position) → Offset
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited