Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandomInsideArena ¶
Types ¶
type Coordinates ¶
type GameScreen ¶
type GameScreen struct { tl.Level LandscapeEntity *Landscape PlayerEntity *Player Obstacles []*Obstacle FPS float64 ObstacleCoordinates map[Coordinates]int // contains filtered or unexported fields }
func NewGamescreen ¶
func NewGamescreen(score int) *GameScreen
type Gameoverscreen ¶
func (*Gameoverscreen) Tick ¶
func (ts *Gameoverscreen) Tick(event tl.Event)
type Landscape ¶
type Landscape struct { *tl.Entity BackgroundRectange *tl.Rectangle Width int Height int LandscapeBorder map[Coordinates]int DeadArea map[Coordinates]int SuccessArea map[Coordinates]int LandscapeGround *tl.Rectangle }
func NewLandscape ¶
func (*Landscape) Contains ¶
func (landscape *Landscape) Contains(c Coordinates) bool
func (*Landscape) SuccessContains ¶
func (landscape *Landscape) SuccessContains(c Coordinates) bool
type Obstacle ¶
type Obstacle struct { *tl.Rectangle Position Coordinates }
func NewObstacle ¶
func NewObstacle() *Obstacle
type Player ¶
func (*Player) BorderCollision ¶
func (*Player) ObstacleCollision ¶
func (*Player) SuccessCollision ¶
type TitleScreen ¶
func NewTitleScreen ¶
func NewTitleScreen() *TitleScreen
func (*TitleScreen) Tick ¶
func (ts *TitleScreen) Tick(event tl.Event)
Click to show internal directories.
Click to hide internal directories.