world

package
v0.0.0-...-f7e941e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var World = &GameWorld{

	PlayerFireRateMult: 1.3,
	PlayerIncFireRate:  false,
	PlayerScore:        31,

	PlayerPos: kmath.Vec{X: consts.DefaultPlayerPosX, Y: consts.DefaultPlayerPosY},

	Player:       gohan.Entity(0),
	PlayerWidth:  32,
	PlayerHeigth: 32,

	ScreenW: consts.DefaultScreenW / 2,
	ScreenH: consts.DefaultScreenH / 2,
}

Functions

func SetGameOver

func SetGameOver()

func SetMessage

func SetMessage(message string, duration int)

func StartGame

func StartGame()

Types

type GameWorld

type GameWorld struct {
	Player gohan.Entity

	PlayerScore        uint
	PlayerFireRateMult float64
	PlayerIncFireRate  bool

	GameTicksCounter uint

	ScreenW, ScreenH int

	PlayerPos                 kmath.Vec
	PlayerWidth, PlayerHeigth float64

	GameStarted bool
	GameOver    bool
	ResetGame   bool

	MessageVisible  bool
	MessageTicks    int
	MessageDuration int
	MessageUpdated  bool
	MessageText     string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL