Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { // Combinations contains buttons combinations Combinations [][]Button // Once determines if the action should be triggered every frame when the button is pressed (default) or only once Once bool }
Action contains buttons combinations with settings
type Axis ¶
type Axis struct {
Value interface{}
}
Axis can be an emulated axis, a gamepad axis or a mouse axis
func (*Axis) UnmarshalTOML ¶ added in v0.6.0
UnmarshalTOML fills structure fields from TOML data
type Button ¶
type Button struct {
Value interface{}
}
Button can be a US keyboard key, a mouse button or a gamepad button
func (*Button) UnmarshalTOML ¶ added in v0.6.0
UnmarshalTOML fills structure fields from TOML data
type ControllerAxis ¶
type ControllerAxis struct { ID ebiten.GamepadID Axis int Invert bool DeadZone float64 `toml:"dead_zone"` }
ControllerAxis is a gamepad axis
type ControllerButton ¶
type ControllerButton struct { ID ebiten.GamepadID GamepadButton ebiten.GamepadButton }
ControllerButton is a gamepad button
func (*ControllerButton) UnmarshalTOML ¶
func (b *ControllerButton) UnmarshalTOML(i interface{}) error
UnmarshalTOML fills structure fields from TOML data
type Controls ¶
type Controls struct { // Axes contains axis controls, used for inputs represented by a float value from -1 to 1 Axes map[string]Axis // Actions contains buttons combinations, used for general inputs Actions map[string]Action }
Controls contains input controls
type Font ¶
Font structure
func (*Font) UnmarshalTOML ¶
UnmarshalTOML fills structure fields from TOML data
type InputHandler ¶
type InputHandler struct { // Axes contains input axis values Axes map[string]float64 // Actions contains input actions Actions map[string]bool }
InputHandler contains input axis values and actions corresponding to specified controls
type Key ¶
type Key struct {
Key ebiten.Key
}
Key is a US keyboard key
func (*Key) UnmarshalText ¶
UnmarshalText fills structure fields from text data
type MouseButton ¶
type MouseButton struct {
MouseButton ebiten.MouseButton
}
MouseButton is a mouse button
func (*MouseButton) UnmarshalText ¶
func (b *MouseButton) UnmarshalText(text []byte) error
UnmarshalText fills structure fields from text data
type Resources ¶
type Resources struct { ScreenDimensions *ScreenDimensions Controls *Controls InputHandler *InputHandler SpriteSheets *map[string]components.SpriteSheet Fonts *map[string]Font AudioContext *audio.Context AudioPlayers *map[string]*audio.Player Prefabs interface{} Game interface{} }
Resources contains references to data not related to any entity
type ScreenDimensions ¶
ScreenDimensions contains current screen dimensions