player

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear

func Clear()

func Draw

func Draw(screen *ebiten.Image) error

func HitUpdate

func HitUpdate()

func IsDead

func IsDead() bool

func MoveToFront

func MoveToFront(player *Player)

func Update

func Update()

func WeaponAdd

func WeaponAdd(weapon *weapon.Weapon)

func X

func X() float64

func Y

func Y() float64

Types

type Player

type Player struct {
	// contains filtered or unexported fields
}

func At

func At(x, y float64) *Player

func HID

func HID(hid string) *Player

func Key

func Key(index int) *Player

func New

func New(spriteName string, layerName string) (*Player, error)

func Players

func Players() []*Player

func (*Player) AnimationAttack

func (n *Player) AnimationAttack() error

func (*Player) AnimationGotHit

func (n *Player) AnimationGotHit() error

func (*Player) AttractionRange

func (n *Player) AttractionRange() float64

func (*Player) Damage

func (n *Player) Damage(damage int) bool

func (*Player) Draw

func (n *Player) Draw(screen *ebiten.Image) error

func (*Player) EntityID

func (n *Player) EntityID() uint

func (*Player) HID

func (n *Player) HID() string

func (*Player) IsDead

func (n *Player) IsDead() bool

func (*Player) IsHit

func (n *Player) IsHit(x, y float64) bool

func (*Player) Position

func (n *Player) Position() (float64, float64)

func (*Player) SHeight

func (n *Player) SHeight() int

func (*Player) SWidth

func (n *Player) SWidth() int

func (*Player) SetAnimation

func (n *Player) SetAnimation(name string) error

SetAnimation sets the animation of the player

func (*Player) SetPosition

func (n *Player) SetPosition(x, y float64)

func (*Player) Update

func (n *Player) Update()

func (*Player) X

func (n *Player) X() float64

func (*Player) Y

func (n *Player) Y() float64

Jump to

Keyboard shortcuts

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