BonfireWidget class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- BonfireWidget
Constructors
-
BonfireWidget({Key? key, required GameMap map, JoystickController? joystick, Player? player, GameInterface? interface, List<
Enemy> ? enemies, List<GameDecoration> ? decorations, GameController? gameController, GameBackground? background, bool constructionMode = false, bool showCollisionArea = false, Color? constructionModeColor, Color? collisionAreaColor, Color? lightingColorGame, Color? backgroundColor, GameColorFilter? colorFilter, List<GameComponent> ? components, Map<String, OverlayWidgetBuilder< ? overlayBuilderMap, List<BonfireGame> >String> ? initialActiveOverlays, CameraConfig? cameraConfig, TapInGame? onTapDown, TapInGame? onTapUp, ValueChanged<BonfireGame> ? onReady, FocusNode? focusNode, bool autofocus = true, MouseCursor? mouseCursor, Widget? progress, Duration delayToHideProgress = Duration.zero, Duration progressTransitionDuration = const Duration(milliseconds: 500), AnimatedSwitcherTransitionBuilder progressTransitionBuilder = AnimatedSwitcher.defaultTransitionBuilder, VoidCallback? onDispose}) -
const
Properties
- autofocus → bool
-
Whether the focusNode requests focus once the game is mounted.
Defaults to true.
final
- background → GameBackground?
-
final
- backgroundColor → Color?
-
final
- cameraConfig → CameraConfig?
-
final
- collisionAreaColor → Color?
-
Color of the collision area when
showCollisionArea
is truefinal - colorFilter → GameColorFilter?
-
final
-
components
→ List<
GameComponent> ? -
final
- constructionMode → bool
-
Used to show grid in the map and facilitate the construction and testing of the map
final
- constructionModeColor → Color?
-
Color grid when
constructionMode
is truefinal -
decorations
→ List<
GameDecoration> ? -
final
- delayToHideProgress → Duration
-
final
-
enemies
→ List<
Enemy> ? -
final
- focusNode → FocusNode?
-
The FocusNode to control the games focus to receive event inputs.
If omitted, defaults to an internally controlled focus node.
final
- gameController → GameController?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
initialActiveOverlays
→ List<
String> ? -
final
- interface → GameInterface?
-
The way you cand raw things like life bars, stamina and settings. In another words, anything that you may add to the interface to the game.
final
- joystick → JoystickController?
-
The player-controlling component.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- lightingColorGame → Color?
-
Used to configure lighting in the game
final
- map → GameMap
-
Represents a map (or world) where the game occurs.
final
- mouseCursor → MouseCursor?
-
Initial mouse cursor for this
GameWidget
mouse cursor can be changed in runtime usingGame.mouseCursor
final - onDispose → VoidCallback?
-
final
-
onReady
→ ValueChanged<
BonfireGame> ? -
final
- onTapDown → TapInGame?
-
final
- onTapUp → TapInGame?
-
final
-
overlayBuilderMap
→ Map<
String, OverlayWidgetBuilder< ?BonfireGame> > -
final
- player → Player?
-
Represents the character controlled by the user in the game. Instances of this class has actions and movements ready to be used and configured.
final
- progress → Widget?
-
final
- progressTransitionBuilder → AnimatedSwitcherTransitionBuilder
-
final
- progressTransitionDuration → Duration
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showCollisionArea → bool
-
Used to draw area collision in objects.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → BonfireWidgetState -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited