core

package
v0.0.0-...-7aa605c Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TPS = 60

	ArenaSize = 192
)
View Source
const (
	PlayerMovementSpeed = 1.

	ShootingTicks   = 15
	ShootingCD      = 30
	InvulnTicks     = 20
	InvulnCD        = InvulnTicks
	DashingTicks    = 10
	DashingCD       = 60
	DashingSpeedMod = 3
)

Variables

View Source
var (
	PlayerSize = mgl64.Vec3{1, 2, 1}
)

Functions

This section is empty.

Types

type Camera

type Camera struct {
	// contains filtered or unexported fields
}

func NewCamera

func NewCamera(pos, front mgl64.Vec3, fov, ratio float64) *Camera

func (*Camera) Direction

func (p *Camera) Direction() mgl64.Vec3

func (*Camera) FoV

func (p *Camera) FoV() float64

func (*Camera) Position

func (p *Camera) Position() mgl64.Vec3

func (*Camera) ProjectionMatrix

func (p *Camera) ProjectionMatrix() mgl64.Mat4

func (*Camera) Right

func (p *Camera) Right() mgl64.Vec3

func (*Camera) SetPosition

func (p *Camera) SetPosition(position mgl64.Vec3)

func (*Camera) SetYawPitch

func (p *Camera) SetYawPitch(yaw, pitch float64)

func (*Camera) Update

func (p *Camera) Update()

func (*Camera) ViewMatrix

func (p *Camera) ViewMatrix() mgl64.Mat4

func (*Camera) YawPitch

func (p *Camera) YawPitch() (float64, float64)

type Floor

type Floor struct {
	Image *ebiten.Image
	// contains filtered or unexported fields
}

func (*Floor) AddMarker

func (f *Floor) AddMarker(m *aoe.Marker)

func (*Floor) Draw

func (f *Floor) Draw(extraShape aoe.Shape)

func (*Floor) Update

func (f *Floor) Update()

type Game

type Game struct {
	Player   *Player
	Building *building.Phase
	Boss     entity.Boss
	// contains filtered or unexported fields
}

func NewGame

func NewGame(camera *Camera, resolution image.Rectangle) *Game

func (*Game) Draw

func (g *Game) Draw(screen *ebiten.Image)

func (*Game) Stage

func (g *Game) Stage() Stage

func (*Game) StageNumber

func (g *Game) StageNumber() int

func (*Game) StageSheetImage

func (g *Game) StageSheetImage() *ebiten.Image

func (*Game) Update

func (g *Game) Update()

type Player

type Player struct {
	Core       *building.Core
	ActiveHand *hand.Hand
	RightHand  *hand.Hand
	LeftHand   *hand.Hand
	// contains filtered or unexported fields
}

func (*Player) Dead

func (p *Player) Dead() bool

func (*Player) DrawHands

func (p *Player) DrawHands(screen *ebiten.Image, ctx *graphics.Context)

func (*Player) TakeHit

func (p *Player) TakeHit(dmg float64)

func (*Player) Update

func (p *Player) Update(ctx *entity.Context)

type Stage

type Stage byte
const (
	Building Stage = iota
	BossFight
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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