Documentation ¶
Index ¶
- Constants
- Variables
- func LevelCoordinatesToScreen(x, y float64) (float64, float64)
- func LevelUp()
- func MaxCreeps() int
- func NeededKills() int
- func Reset()
- func ScreenToLevelCoordinates(x, y float64) (float64, float64)
- func SetFish(fish level.FishType)
- func SetMessage(message string, duration int)
- func StartGame()
- type GameWorld
- type Section
Constants ¶
View Source
const ( ScreenWidth = 400 ScreenHeight = 225 )
View Source
const ( StartingRailSpeed = 0.6 FishSpeedIncrease = 0.05 )
View Source
const SectionWidth = ScreenWidth * 2
Variables ¶
View Source
var NumberPrinter = message.NewPrinter(language.English)
View Source
var RailSpeed = StartingRailSpeed
View Source
var World = &GameWorld{ CamScale: 1, CamMoving: true, PlayerWidth: 16, PlayerHeight: 16, ResetGame: true, }
Functions ¶
func NeededKills ¶
func NeededKills() int
func SetMessage ¶
Types ¶
type GameWorld ¶
type GameWorld struct { Player gohan.Entity DisableEsc bool Debug int StartMuted bool NoClip bool GodMode bool GameStarted bool GameStartedTicks int GameOver bool MessageVisible bool MessageTicks int MessageDuration int MessageUpdated bool MessageText string PlayerX, PlayerY float64 CamX, CamY float64 CamScale float64 CamMoving bool PlayerWidth float64 PlayerHeight float64 ResetGame bool ForceSeed int64 Tick int SectionA *Section SectionB *Section FirstSectionB bool Score int ScoreUpdated bool Fish level.FishType Kills int NeedKills int LevelUpTicks int KillInfoUpdated bool // contains filtered or unexported fields }
func (*GameWorld) SetGameOver ¶
func (w *GameWorld) SetGameOver()
Click to show internal directories.
Click to hide internal directories.