component

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeCars = iota + 1
	TypeFood
	TypePlush
)
View Source
const (
	SpeedCoef = 100
)
View Source
const (
	Unit = 16
)

Variables

This section is empty.

Functions

func BindMovementKeys

func BindMovementKeys() (bool, bool, bool, bool)

Types

type Basket

type Basket struct {
	O     Object
	Image *ebiten.Image
	Type  int
}

func (*Basket) DrawOn

func (b *Basket) DrawOn(screen *ebiten.Image, t int)

type Baskets

type Baskets struct {
	ToyBaskets []*Basket
	PlusPoint  int
	MinusPoint int
}

func (*Baskets) DrawOn

func (b *Baskets) DrawOn(screen *ebiten.Image)

func (*Baskets) Update

func (b *Baskets) Update(t *Toy)

type Kid

type Kid struct {
	O     Object
	Image *ebiten.Image
}

func (*Kid) DrawOn

func (k *Kid) DrawOn(screen *ebiten.Image)

func (*Kid) MoveDelay

func (k *Kid) MoveDelay()

func (*Kid) MoveRandomly

func (k *Kid) MoveRandomly(d int)

func (*Kid) Update

func (k *Kid) Update()

type Object

type Object struct {
	X      float64
	Y      float64
	VX     float64
	VY     float64
	Width  int
	Height int
}

func (*Object) CollideWith

func (o *Object) CollideWith(n *Object) bool

func (*Object) Update

func (o *Object) Update()

type Patience

type Patience struct {
	O     Object
	Level int
	Image *ebiten.Image
}

func (*Patience) DrawOn

func (p *Patience) DrawOn(screen *ebiten.Image)

func (*Patience) Update

func (p *Patience) Update(l int)

type Player

type Player struct {
	O     Object
	Image *ebiten.Image
}

func (*Player) DrawOn

func (p *Player) DrawOn(screen *ebiten.Image)

func (*Player) Update

func (p *Player) Update()

type Stamina

type Stamina struct {
	O     Object
	Level int
	Image *ebiten.Image
}

func (*Stamina) DrawOn

func (st *Stamina) DrawOn(screen *ebiten.Image)

func (*Stamina) Update

func (st *Stamina) Update(l int)

type Toy

type Toy struct {
	O        Object
	Image    *ebiten.Image
	Type     int
	Attached bool
	Spawned  bool
	Stable   bool
}

func (*Toy) Dispose

func (t *Toy) Dispose()

func (*Toy) DrawOn

func (t *Toy) DrawOn(screen *ebiten.Image)

func (*Toy) Update

func (t *Toy) Update()

Jump to

Keyboard shortcuts

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