flame_fuse library
Implement function-based behavior composition in Flame.
See Fuse for usage details.
Mixins
- Fuse
- Adds a fuse method to a Flame component. While inside this method, behavior may be composed by calling any number of fuse* functions.
- FuseCollisions
-
Mixin that enables the usage of
fuseCollision*fuses. - FuseDoubleTaps
-
Mixin that enables the usage of
fuseDoubleTap*fuses. - FuseDrags
-
Mixin that enables the usage of
fuseDrag*fuses. - FuseHovers
-
Mixin that enables the usage of
fuseHover*fuses. - FuseKeys
-
Mixin that enables the usage of
fuseKey*fuses. - FusePointers
-
Mixin that enables the usage of
fusePointer*fuses. - FuseTaps
-
Mixin that enables the usage of
fuseTap*fuses.
Functions
-
fuseCamera(
) → CameraComponent - Returns the current Flame game's camera.
-
fuseCollision<
C extends PositionComponent> (FuseCollisionFn< C> fn) → void -
Calls
fnwhen this component is colliding with another component of typeC. -
fuseCollisionEffect<
C extends PositionComponent> (FuseCollisionEffectFn< C> fn) → void -
Calls
fnwhen this component collides with another component of typeC. -
fuseCollisionEffectPoints<
C extends PositionComponent> (FuseCollisionEffectPointsFn< C> fn) → void -
Calls
fnwhen this component collides with another component of typeC. -
fuseCollisionEnd<
C extends PositionComponent> (FuseCollisionEndFn< C> fn) → void -
Calls
fnwhen this component stops colliding with another component of typeC. -
fuseCollisionPoints<
C extends PositionComponent> (FuseCollisionPointsFn< C> fn) → void -
Calls
fnwhen this component is colliding with another component of typeC. -
fuseCollisionStart<
C extends PositionComponent> (FuseCollisionFn< C> fn) → void -
Calls
fnwhen this component collides with another component of typeC. -
fuseCollisionStartPoints<
C extends PositionComponent> (FuseCollisionPointsFn< C> fn) → void -
Calls
fnwhen this component collides with another component of typeC. -
fuseComponent<
C extends Fuse> () → C - Returns the current Flame component.
-
fuseDoubleTapCancel(
FuseDoubleTapCancelFn fn) → void -
Calls
fnwhen a double-tap cancel event occurs. -
fuseDoubleTapDown(
FuseDoubleTapDownFn fn) → void -
Calls
fnwhen a double-tap down event occurs. -
fuseDoubleTapUp(
FuseDoubleTapFn fn) → void -
Calls
fnwhen a double-tap up event occurs. -
fuseDragCancel(
FuseDragCancelFn fn) → void -
Calls
fnwhen a drag cancel event occurs. -
fuseDragEffect(
FuseDragEffectFn fn) → void -
Calls
fnwhen a drag start event occurs. -
fuseDragEnd(
FuseDragEndFn fn) → void -
Calls
fnwhen a drag end event occurs. -
fuseDragStart(
FuseDragStartFn fn) → void -
Calls
fnwhen a drag start event occurs. -
fuseDragUpdate(
FuseDragUpdateFn fn) → void -
Calls
fnwhen a drag update event occurs. -
fuseGame<
G extends FlameGame< (World> >) → G - Returns the current Flame game.
-
fuseHoverEffect(
FuseHoverEffectFn fn) → void -
Calls
fnwhen hover enters this component. -
fuseHoverEnter(
FuseHoverEnterFn fn) → void -
Calls
fnwhen hover enters this component. -
fuseHoverExit(
FuseHoverExitFn fn) → void -
Calls
fnwhen hover exits this component. -
fuseHoverUpdate(
FuseHoverUpdateFn fn) → void -
Calls
fnwhile hovering over this component. -
fuseKeyEvent(
FuseKeyEventFn fn) → void -
Calls function
fnwhen a key event occurs. -
fuseLongTapDown(
FuseLongTapDownFn fn) → void -
Calls
fnwhen a long tap down event occurs. -
fuseMount(
FuseMountFn fn) → void -
Calls function
fnwhen the current Flame component is mounted. -
fuseParentResize(
FuseParentResizeFn fn) → void -
Calls function
fnwhenever the parent component is resized. -
fusePointerMove(
FusePointerMoveFn fn) → void -
Calls
fnwhen the pointer moves. -
fusePointerMoveStop(
FusePointerMoveStopFn fn) → void -
Calls
fnwhen the pointer stops. -
fuseRemove(
FuseRemoveFn fn) → void -
Calls function
fnwhen the current Flame component is removed. -
fuseResize(
FuseResizeFn fn) → void -
Calls function
fnwhen the current Flame game is resized. -
fuseTapCancel(
FuseTapCancelFn fn) → void -
Calls
fnwhen a tap cancel event occurs. -
fuseTapDown(
FuseTapDownFn fn) → void -
Calls
fnwhen a tap down event occurs. -
fuseTapUp(
FuseTapUpFn fn) → void -
Calls
fnwhen a tap up event occurs. -
fuseUpdate(
FuseUpdateFn fn) → void -
Calls function
fnon every Flame game update. -
fuseWorld(
) → World - Returns the current Flame game's world.
Typedefs
-
FuseCollisionEffectFn<
C extends PositionComponent> = dynamic Function()? Function(C other) -
FuseCollisionEffectPointsFn<
C extends PositionComponent> = dynamic Function()? Function(C other, Set< Vector2> points) -
FuseCollisionEndFn<
C extends PositionComponent> = dynamic Function(C other) -
FuseCollisionFn<
C extends PositionComponent> = dynamic Function(C other) -
FuseCollisionPointsFn<
C extends PositionComponent> = dynamic Function(C other, Set< Vector2> points) - FuseDoubleTapCancelFn = dynamic Function(DoubleTapCancelEvent event)
- FuseDoubleTapDownFn = dynamic Function(DoubleTapDownEvent event)
- FuseDoubleTapFn = dynamic Function(DoubleTapEvent event)
- FuseDragCancelFn = dynamic Function(DragCancelEvent event)
- FuseDragEffectFn = dynamic Function(DragEndEvent event)? Function(DragStartEvent event)
- FuseDragEndFn = dynamic Function(DragEndEvent event)
- FuseDragStartFn = dynamic Function(DragStartEvent event)
- FuseDragUpdateFn = dynamic Function(DragUpdateEvent event)
- FuseHoverEffectFn = dynamic Function()? Function()
- FuseHoverEnterFn = dynamic Function()
- FuseHoverExitFn = dynamic Function()
- FuseHoverUpdateFn = dynamic Function(double dt)
-
FuseKeyEventFn
= bool? Function(KeyEvent event, Set<
LogicalKeyboardKey> keysPressed) - FuseLongTapDownFn = dynamic Function(TapDownEvent event)
- FuseMountFn = dynamic Function()
- FuseParentResizeFn = dynamic Function(Vector2 maxSize)
- FusePointerMoveFn = dynamic Function(PointerMoveEvent event)
- FusePointerMoveStopFn = dynamic Function(PointerMoveEvent event)
- FuseRemoveFn = dynamic Function()
- FuseResizeFn = dynamic Function(Vector2 size)
- FuseTapCancelFn = dynamic Function(TapCancelEvent event)
- FuseTapDownFn = dynamic Function(TapDownEvent event)
- FuseTapUpFn = dynamic Function(TapUpEvent event)
- FuseUpdateFn = dynamic Function(double dt)