entity

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DirLeft int = iota
	DirRight
	DirUp
	DirDown
)

Variables

View Source
var (
	VecLeft  = rl.Vector2{X: -1, Y: 0}
	VecRight = rl.Vector2{X: 1, Y: 0}
	VecUp    = rl.Vector2{X: 0, Y: 1}
	VecDown  = rl.Vector2{X: 0, Y: -1}

	VecDirections = []rl.Vector2{

		VecLeft,
		VecRight,
		VecUp,
		VecDown,
	}
)

The following are axis direction vectors based on world coordinates. UP/DOWN is intentionally UP = positive (which is different from window coordinates)

Functions

func NewPenguin

func NewPenguin() *penguin

Types

type AnimationTracker

type AnimationTracker interface {
	Draw(windowPosition rl.Vector2, color rl.Color) error
	SetAnimation(id int)
}

type EntityAnimation

type EntityAnimation interface {
	Draw(step int, windowPosition rl.Vector2, color rl.Color) error
	GetSpeed() int
}

Jump to

Keyboard shortcuts

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