badguy

package
v0.0.0-...-cafaf1c Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEntity1

func NewEntity1(position img.Position) *entity1

func NewEntity2

func NewEntity2(position img.Position) *entity2

func NewEntityCommon

func NewEntityCommon(position img.Position) entityCommon

func NewEntityMissile

func NewEntityMissile(position img.Position) *entityMissile

Types

type Entity

type Entity interface {
	Type() Type
	State() State
	Position() img.Position

	Move()
	Update(xshipEntity *xship.Entity, missileEntities []*missile.Entity, score *int) (newBadGuys []Entity)
	Draw()
}

type State

type State int8
const (
	BadGuyDisabledState State = iota
	BadGuyExplodingState
	BadGuyEnabledState
)

type Type

type Type uint8
const (
	BadGuy1Type Type = iota
	BadGuy2Type
	MissileType
)

Jump to

Keyboard shortcuts

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