target

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 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
	CollidableTypes [combat.TargettableTypeCount]bool
	OnCollision     func(combat.Target)

	Alive bool
	// contains filtered or unexported fields
}

func New

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

func (*Target) AttackWillLand added in v1.2.0

func (t *Target) AttackWillLand(a combat.AttackPattern, src combat.TargetKey) (bool, string)

func (*Target) Collidable added in v1.2.0

func (t *Target) Collidable() bool

func (*Target) CollidableWith added in v1.2.0

func (t *Target) CollidableWith(x combat.TargettableType) bool

func (*Target) CollidedWith added in v1.2.0

func (t *Target) CollidedWith(x combat.Target)

func (*Target) GetTag

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

func (*Target) Index

func (t *Target) Index() int

func (*Target) IsAlive

func (t *Target) IsAlive() bool

func (*Target) Key added in v1.2.0

func (t *Target) Key() combat.TargetKey

func (*Target) Kill

func (t *Target) Kill()

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) SetKey added in v1.2.0

func (t *Target) SetKey(x combat.TargetKey)

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

func (*Target) WillCollide added in v1.2.0

func (t *Target) WillCollide(s combat.Shape) bool

Jump to

Keyboard shortcuts

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