BonfireWidget class

Inheritance

Constructors

BonfireWidget({required GameMap map, Key? key, List<PlayerController>? playerControllers, 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, GlobalForcesSettings? globalForces, BonfireCollisionConfig? collisionConfig})
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
collisionConfig → BonfireCollisionConfig?
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 → GlobalForcesSettings?
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
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 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
playerControllers → List<PlayerController>?
Controls the player in the game. You can pass a list of controllers to control the player in different ways.
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, int wrapWidth = 65}) → 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