Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Components ¶
type Components struct { Engine *EngineComponents Game interface{} }
Components contains engine and game components
func InitComponents ¶
func InitComponents(manager *ecs.Manager, gameComponents interface{}) *Components
InitComponents initializes components
type EngineComponents ¶
type EngineComponents struct { SpriteRender *ecs.SliceComponent Transform *ecs.SliceComponent Text *ecs.SliceComponent UITransform *ecs.SliceComponent }
EngineComponents contains references to all engine components
type Sprite ¶
type Sprite struct { // Horizontal position of the sprite in the sprite sheet X int // Vertical position of the sprite in the sprite sheet Y int // Width of the sprite Width int // Height of the sprite Height int }
Sprite structure
type SpriteRender ¶
type SpriteRender struct { // Reference sprite sheet SpriteSheet *SpriteSheet // Index of the sprite on the sprite sheet SpriteNumber int // Draw options Options ebiten.DrawImageOptions }
SpriteRender component
type SpriteSheet ¶
type SpriteSheet struct { // Texture image Texture Texture `toml:"texture_image"` // List of sprites Sprites []Sprite }
SpriteSheet structure
Click to show internal directories.
Click to hide internal directories.