object

package
v0.0.0-...-d12af05 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Collides

func Collides(a, b collidable, tolerance float32) bool

Collides returns true if two collidable a and b intersects with each other.

func InitScoreAnim

func InitScoreAnim()

Types

type Food

type Food struct {
	c.TeleCompTriang
	IsActive bool
	Center   c.Vec32
}

func NewFoodRandLoc

func NewFoodRandLoc() *Food

func (Food) CollEnabled

func (f Food) CollEnabled() bool

Implement collidable interface ------------------------------

func (Food) CollisionRects

func (f Food) CollisionRects() []c.RectF32

func (Food) Draw

func (f Food) Draw(dst *ebiten.Image)

type ScoreAnim

type ScoreAnim struct {
	c.TeleCompTriang
	// contains filtered or unexported fields
}

func NewScoreAnim

func NewScoreAnim(pos c.Vec32) *ScoreAnim

func (*ScoreAnim) Draw

func (s *ScoreAnim) Draw(dst *ebiten.Image)

func (*ScoreAnim) Update

func (s *ScoreAnim) Update() bool

Returns true when the animation is finished

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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