Documentation ¶
Index ¶
- Constants
- func DrawRenderables(g *Game, level Level, screen *ebiten.Image)
- func GetDiceRoll(num int) int
- func GetRandomInt(num int) int
- func LoadImageFromAssets(name string) *ebiten.Image
- func MovePlayer(g *Game)
- func RegisterBosses(g *Game, renderable *ecs.Component)
- func RegisterEntities(game *Game)
- func ResetPlayer(g *Game)
- type EntityQueryManager
- type Game
- type GameData
- type GameMap
- type Level
- type MapTile
- type Monster
- type Movable
- type Player
- type PlayerStats
- type Position
- type Renderable
Constants ¶
View Source
const ( PlayersView = "playersView" RenderablesView = "renderablesView" BossesView = "bossesView" )
ECS View Lookups
View Source
const (
GameName = "Baron"
)
Variables ¶
This section is empty.
Functions ¶
func DrawRenderables ¶
Draw images on top of the tiles. Each Renderable has a current position.
func GetDiceRoll ¶
func GetRandomInt ¶
func LoadImageFromAssets ¶
func LoadImageFromAssets(name string) *ebiten.Image
Loads an image from the assets folder. Todo: Stop using relative pathing!
func MovePlayer ¶
func MovePlayer(g *Game)
func RegisterBosses ¶
func ResetPlayer ¶
func ResetPlayer(g *Game)
Types ¶
type EntityQueryManager ¶
type EntityQueryManager struct { }
type Game ¶
type GameData ¶
func NewGameData ¶
func NewGameData() GameData
type GameMap ¶
type GameMap struct {
CurrentLevel Level
}
func NewGameMap ¶
func NewGameMap() GameMap
type Level ¶
type Level struct { Tiles []*MapTile // contains filtered or unexported fields }
func (*Level) CreateTiles ¶
func (*Level) GetIndexFromXY ¶
type Player ¶
type Player struct { Image *ebiten.Image Stats *PlayerStats CurrX int CurrY int IsDead bool Deaths int }
func (*Player) TransformHealth ¶
Apply a damaging effect to the player
type PlayerStats ¶
type Renderable ¶
type Renderable struct {
Image *ebiten.Image
}
Click to show internal directories.
Click to hide internal directories.