Documentation ¶
Index ¶
- type Animation
- type Audio
- type Cell
- type Colliders
- type CollidersModel
- type CollidersParseModel
- type Font
- type FontColor
- type GameRole
- type Images
- type Metadata
- type MetadataModel
- func (m *MetadataModel) GetBuffSpeed() types.Vec2
- func (m *MetadataModel) GetMargins() types.Vec2
- func (m *MetadataModel) GetOffset() types.Vec2
- func (m *MetadataModel) GetScale() types.Vec2
- func (m *MetadataModel) GetSize() types.Vec2
- func (m *MetadataModel) GetSizeMaxX() float64
- func (m *MetadataModel) GetSizeMaxY() float64
- func (m *MetadataModel) GetSizeMinX() float64
- func (m *MetadataModel) GetSizeMinY() float64
- type Parser
- type RuntimeDefined
- type Shaders
- type SourcesProvider
- type TextPosition
- type Track
- type Transition
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Audio ¶
func (*Audio) GetAudioController ¶
func (*Audio) IsAllAudioLoaded ¶
Checks if there is any unloaded audio
type Colliders ¶
type Colliders struct { sync.Mutex Collection map[string][]*CollidersModel }
func NewColliders ¶
func NewColliders() *Colliders
func (*Colliders) GetCollider ¶
func (c *Colliders) GetCollider(path string) ([]*CollidersModel, error)
type CollidersModel ¶
type CollidersModel struct { Name string X, Y float64 TileHeight, TileWidth int Properties struct { IsCollision, IsWalkable bool } }
func (*CollidersModel) GetSizeMaxX ¶
func (m *CollidersModel) GetSizeMaxX() float64
func (*CollidersModel) GetSizeMaxY ¶
func (m *CollidersModel) GetSizeMaxY() float64
func (*CollidersModel) GetSizeMinX ¶
func (m *CollidersModel) GetSizeMinX() float64
func (*CollidersModel) GetSizeMinY ¶
func (m *CollidersModel) GetSizeMinY() float64
type CollidersParseModel ¶
type CollidersParseModel struct { ImageHeight int `json:"imageheight"` ImageWidth int `json:"imagewidth"` TileHeight int `json:"tileheight"` TileWidth int `json:"tilewidth"` Tiles []struct { Objectgroup struct { Id int `json:"id"` Objects []struct { Id int `json:"id"` Height float64 `json:"height"` Width float64 `json:"width"` X float64 `json:"x"` Y float64 `json:"y"` } `json:"objects"` } `json:"objectgroup"` Properties []struct { Name string `json:"name"` Type string `json:"type"` Value interface{} `json:"value"` } `json:"properties"` } `json:"tiles"` }
Model used only for input files parsing
type Images ¶
func (*Images) GetCopyOfImage ¶
type Metadata ¶
type Metadata struct { sync.Mutex Collection map[string]*MetadataModel }
func NewMetadata ¶
func NewMetadata() *Metadata
func (*Metadata) GetMetadata ¶
func (m *Metadata) GetMetadata(path string) *MetadataModel
type MetadataModel ¶
type MetadataModel struct { Type Animation Animation Transition Transition //Information about metadata file Info struct { //Parent file metadata one related to GameRole Parent string ScrollableX, ScrollableY bool } Size types.Vec2 Margins types.Vec2 Spawns []*server_external.PositionInt Physics struct { G float64 } Buffs struct { Speed float64 } Scale types.Vec2 Offset types.Vec2 Text struct { Symbols string Position TextPosition } Fonts struct { FontColor } Camera struct { MaxZoom, MinZoom, InitZoom float64 } Effects struct { TraceColorBegin [4]float32 TraceColorEnd [4]float32 } }
All the positioning properties should be in range (0; 100)
func (*MetadataModel) GetBuffSpeed ¶
func (m *MetadataModel) GetBuffSpeed() types.Vec2
func (*MetadataModel) GetMargins ¶
func (m *MetadataModel) GetMargins() types.Vec2
func (*MetadataModel) GetOffset ¶
func (m *MetadataModel) GetOffset() types.Vec2
func (*MetadataModel) GetScale ¶
func (m *MetadataModel) GetScale() types.Vec2
func (*MetadataModel) GetSize ¶
func (m *MetadataModel) GetSize() types.Vec2
func (*MetadataModel) GetSizeMaxX ¶
func (m *MetadataModel) GetSizeMaxX() float64
func (*MetadataModel) GetSizeMaxY ¶
func (m *MetadataModel) GetSizeMaxY() float64
func (*MetadataModel) GetSizeMinX ¶
func (m *MetadataModel) GetSizeMinX() float64
func (*MetadataModel) GetSizeMinY ¶
func (m *MetadataModel) GetSizeMinY() float64
type RuntimeDefined ¶
Runtime defined metadata model
type Shaders ¶
func NewShaders ¶
func NewShaders() *Shaders
type SourcesProvider ¶
type SourcesProvider interface { LoadSources(embed.FS) Audio() *Audio Font() *Font Images() *Images Metadata() *Metadata Shaders() *Shaders Colliders() *Colliders IsLoadingEnded() bool }
func UseSources ¶
func UseSources() SourcesProvider
type TextPosition ¶
type TextPosition string
const ( Center TextPosition = "center" Left TextPosition = "left" Right TextPosition = "right" )
Predefined options of allowed text positions
type Transition ¶
Click to show internal directories.
Click to hide internal directories.