example

package
v0.0.0-...-0be2bd3 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Assets embed.FS

Assets is the embedded assets FS.

Functions

func Level1

func Level1() *engine.Scene

Level1 creates the level_1 scene.

Types

type Awakeman

type Awakeman struct {
	engine.Disables
	Sprite   engine.Sprite
	CameraID string
	ToastID  string
	// contains filtered or unexported fields
}

Awakeman is a bit of a god object for now...

func (*Awakeman) Ident

func (aw *Awakeman) Ident() string

Ident returns "awakeman". There should be only one!

func (*Awakeman) Prepare

func (aw *Awakeman) Prepare(game *engine.Game) error

Prepare captures necessary references to other game components.

func (*Awakeman) Scan

func (aw *Awakeman) Scan(visit engine.VisitFunc) error

Scan visits &aw.Sprite.

func (*Awakeman) String

func (aw *Awakeman) String() string

func (*Awakeman) Update

func (aw *Awakeman) Update() error

Update updates Awakeman, including capturing input, applying gravity and movement, and repositioning the camera.

type Bubble

type Bubble struct {
	Life   int
	Sprite engine.Sprite
	// contains filtered or unexported fields
}

Bubble implements a single bubble within a simple particle system.

func NewBubble

func NewBubble(pos geom.Int3) *Bubble

NewBubble creates a bubble. Before it can be used, the return value needs to be loaded, registered, and prepared.

func (*Bubble) Prepare

func (b *Bubble) Prepare(g *engine.Game) error

Prepare saves a reference to g.

func (*Bubble) Scan

func (b *Bubble) Scan(visit engine.VisitFunc) error

Scan visits &b.sprite.

func (*Bubble) String

func (b *Bubble) String() string

func (*Bubble) Update

func (b *Bubble) Update() error

Update moves the bubble randomly, and handles unregistering the bubble when it has "popped".

Jump to

Keyboard shortcuts

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