core

package
v0.0.0-...-157546e Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JumpVelocityIncr     = 0.02
	FallVelocityTerminal = -0.5
	FallVelocityIncr     = -0.025
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Camera

type Camera struct {
	HAngle float64
	Zoom   float64
	// contains filtered or unexported fields
}

func (*Camera) Update

func (c *Camera) Update()

type Game

type Game struct {
	Level  *level.HMap
	Player *agents.Player
	Agent  agents.Agent
	Camera *Camera
	// contains filtered or unexported fields
}

func NewGame

func NewGame(lvl int) *Game

func (*Game) AgentSeen

func (g *Game) AgentSeen() bool

func (*Game) GetLevel

func (g *Game) GetLevel() int

func (*Game) IsOver

func (g *Game) IsOver() bool

func (*Game) PlayerSeen

func (g *Game) PlayerSeen() bool

func (*Game) ResolveCollisions

func (g *Game) ResolveCollisions(agent agents.Agent, intent geom.Vec3)

func (*Game) Status

func (g *Game) Status() GameStatus

func (*Game) TimeRemaining

func (g *Game) TimeRemaining() time.Duration

func (*Game) Update

func (g *Game) Update()

type GameStatus

type GameStatus = byte
const (
	GameStatusDefeat GameStatus = iota
	GameStatusVictory
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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