BonfireWidget class

Inheritance

Constructors

BonfireWidget({Key? key, required GameMap map, PlayerController? joystick, KeyboardConfig? keyboardConfig, Player? player, GameInterface? interface, GameBackground? background, bool debugMode = false, bool showCollisionArea = false, Color? collisionAreaColor, Color? lightingColorGame, Color? backgroundColor, GameColorFilter? colorFilter, List<GameComponent>? hudComponents, List<GameComponent>? components, Map<String, OverlayWidgetBuilder<BonfireGame>>? overlayBuilderMap, List<String>? initialActiveOverlays, CameraConfig? cameraConfig, ValueChanged<BonfireGameInterface>? onReady, FocusNode? focusNode, bool autofocus = true, MouseCursor? mouseCursor, VoidCallback? onDispose, List<Force2D>? globalForces})
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 true
final
colorFilter GameColorFilter?
final
components List<GameComponent>?
final
debugMode bool
Used to show grid in the map and facilitate the construction and testing of the map
final
focusNode FocusNode?
The FocusNode to control the games focus to receive event inputs. If omitted, defaults to an internally controlled focus node.
final
globalForces List<Force2D>?
final
hashCode int
The hash code for this object.
no setterinherited
hudComponents List<GameComponent>?
final
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 PlayerController?
The player-controlling component.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardConfig KeyboardConfig?
final
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 using Game.mouseCursor
final
onDispose VoidCallback?
final
onReady ValueChanged<BonfireGameInterface>?
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
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