target

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: MIT Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Target

type Target struct {
	Core        *core.Core
	TargetIndex int
	Hitbox      combat.Circle
	Tags        map[string]int

	HPMax     float64
	HPCurrent float64
	Alive     bool
}

func New

func New(core *core.Core, x, y, r float64) *Target

func (*Target) GetTag

func (t *Target) GetTag(key string) int

func (*Target) HP

func (t *Target) HP() float64

func (*Target) Index

func (t *Target) Index() int

func (*Target) IsAlive

func (t *Target) IsAlive() bool

func (*Target) Kill

func (t *Target) Kill()

func (*Target) MaxHP

func (t *Target) MaxHP() float64

func (*Target) Pos

func (t *Target) Pos() (float64, float64)

func (*Target) RemoveTag

func (t *Target) RemoveTag(key string)

func (*Target) SetIndex

func (t *Target) SetIndex(ind int)

func (*Target) SetPos

func (t *Target) SetPos(x, y float64)

func (*Target) SetTag

func (t *Target) SetTag(key string, val int)

func (*Target) Shape

func (t *Target) Shape() combat.Shape

Jump to

Keyboard shortcuts

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