Documentation ¶
Index ¶
- func CreateEntityComponent(pLvlConfig *LevelJSONConfig) *orderedmap.OrderedMap
- func CreateLvlsEntityAndComponents(Game *Game, EntCmpMap *orderedmap.OrderedMap)
- func InitializeLevel(g *Game)
- func LoadAssetDescriptions(Game *Game)
- func LoadImagesAndTextures(Game *Game)
- func LoadLvlConfig(Game *Game, path string)
- func TransformSystemSetInitialVals(g *Game)
- type AssetJSONConfig
- type EntityJSONConfig
- type Game
- type LevelJSONConfig
- type LevelPhysics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateEntityComponent ¶
func CreateEntityComponent(pLvlConfig *LevelJSONConfig) *orderedmap.OrderedMap
func CreateLvlsEntityAndComponents ¶
func CreateLvlsEntityAndComponents(Game *Game, EntCmpMap *orderedmap.OrderedMap)
func InitializeLevel ¶
func InitializeLevel(g *Game)
func LoadAssetDescriptions ¶
func LoadAssetDescriptions(Game *Game)
func LoadImagesAndTextures ¶
func LoadImagesAndTextures(Game *Game)
func LoadLvlConfig ¶
func TransformSystemSetInitialVals ¶
func TransformSystemSetInitialVals(g *Game)
Types ¶
type AssetJSONConfig ¶
type AssetJSONConfig struct { AnimatedByDefault bool `json:"AnimatedByDefault"` ImagesBasePath string `json:"ImagesBasePath"` Image string `json:"Image"` DefaultAnimationDuration uint8 `json:"DefaultAnimationDuration"` Animations *map[string]*animation `json:"Animations"` FontSize uint8 `json:"FontSize"` Text string `json:"Text"` }
type EntityJSONConfig ¶
type Game ¶
type Game struct { Window *sdl.Window Surface *sdl.Surface Renderer *sdl.Renderer Keyboard *input.Keyboard ECSManager *ecs.ECSManager AssetDescriptions *map[string]*AssetJSONConfig LvlDescription *LevelJSONConfig StateMachine *statemachine.StateMachine }
func (*Game) InitializeSDL ¶
func (g *Game) InitializeSDL()
func (*Game) LoadFirstLevel ¶
func (g *Game) LoadFirstLevel()
func (*Game) LoadWelcomeScreen ¶
func (g *Game) LoadWelcomeScreen()
func (*Game) PrepareBasicGameData ¶
func (g *Game) PrepareBasicGameData()
func (*Game) RunSystems ¶
func (*Game) RunWelcomeScreen ¶
func (g *Game) RunWelcomeScreen()
type LevelJSONConfig ¶
type LevelJSONConfig struct { LevelPhysics LevelPhysics `json:"LevelPhysics"` EntitiesDescriptions *map[string]*EntityJSONConfig `json:"Entities"` EntitiesDescriptionsOrdered orderedmap.OrderedMap }
func (*LevelJSONConfig) GetEntityDescription ¶
func (l *LevelJSONConfig) GetEntityDescription(entityID uint64) *EntityJSONConfig
func (*LevelJSONConfig) GetFirstEntityIDFromRange ¶
func (l *LevelJSONConfig) GetFirstEntityIDFromRange(entityID uint64) int
type LevelPhysics ¶
type LevelPhysics struct {
Gravity float64 `json:"Gravity"`
}
Click to show internal directories.
Click to hide internal directories.