core

package
v0.0.0-...-d664ad9 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MoveSpeed      = float32(3.75)
	DashSpeed      = float32(10)
	PlayerSize     = float32(16)
	DashCooldown   = 20
	DashDuration   = 10
	InvulnTime     = logic.TPS
	KnockbackSpeed = float32(5)
	KnockbackTime  = logic.TPS * 0.2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Board

type Board struct {
	Size  int
	Tiles [][]*tile.Tile
	// contains filtered or unexported fields
}

func (*Board) TileAt

func (b *Board) TileAt(x, y float32) *tile.Tile

func (*Board) Update

func (b *Board) Update(s *shape.Shape)

type Core

type Core struct {
	Shape       *shape.Shape
	Board       *Board
	Player      *Player
	Aoes        []*entity.Aoe
	Projectiles []*entity.Projectile
	// contains filtered or unexported fields
}

func New

func New() *Core

func (*Core) GetCompletion

func (c *Core) GetCompletion() float64

func (*Core) GetDifficulty

func (c *Core) GetDifficulty() float64

func (*Core) GetLoop

func (c *Core) GetLoop() int

func (*Core) GetStatistics

func (c *Core) GetStatistics() Statistics

func (*Core) GetTime

func (c *Core) GetTime() time.Duration

func (*Core) IsOver

func (c *Core) IsOver() bool

func (*Core) IsPaused

func (c *Core) IsPaused() bool

func (*Core) Loop

func (c *Core) Loop()

func (*Core) TogglePause

func (c *Core) TogglePause()

func (*Core) Update

func (c *Core) Update()

type Player

type Player struct {
	X, Y float32
	HP   int

	DashCD         int
	DashDuration   int
	InvulnDuration int

	KnockbackDuration int
	// contains filtered or unexported fields
}

func (*Player) TakeDamage

func (p *Player) TakeDamage()

func (*Player) Update

func (p *Player) Update()

type Statistics

type Statistics struct {
	LoopCount  int
	Duration   time.Duration
	Completion float64
	HP         int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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