Documentation ¶
Index ¶
- Constants
- func Clear()
- func Draw(screen *ebiten.Image) error
- func HitUpdate()
- func Knockback(distance float64)
- func MoveToFront(npc *Npc)
- func Update()
- type Npc
- func (n *Npc) AnimationAttack() error
- func (n *Npc) AnimationGotHit() error
- func (n *Npc) Damage(damage int) bool
- func (n *Npc) Draw(screen *ebiten.Image) error
- func (n *Npc) EntityID() uint
- func (n *Npc) HID() string
- func (n *Npc) IsDead() bool
- func (n *Npc) IsHit(x, y float64) bool
- func (n *Npc) IsSimpleHit(x, y float64) bool
- func (n *Npc) Position() (float64, float64)
- func (n *Npc) SHeight() int
- func (n *Npc) SWidth() int
- func (n *Npc) SetAnimation(name string) error
- func (n *Npc) SetPosition(x, y float64)
- func (n *Npc) Update()
- func (n *Npc) X() float64
- func (n *Npc) Y() float64
- type NpcData
- type SpriteData
Constants ¶
View Source
const ( NpcNone = iota NpcBat NpcCloud NpcFlower NpcAseprite NpcPot NpcKnight NpcStump )
Variables ¶
This section is empty.
Functions ¶
func MoveToFront ¶
func MoveToFront(npc *Npc)
Types ¶
type Npc ¶
type Npc struct {
// contains filtered or unexported fields
}
func (*Npc) AnimationAttack ¶
func (*Npc) AnimationGotHit ¶
func (*Npc) IsSimpleHit ¶
func (*Npc) SetAnimation ¶
SetAnimation sets the animation of the npc
func (*Npc) SetPosition ¶
type NpcData ¶
type NpcData struct { MaxHP int Sprite *SpriteData MoveSpeed float64 }
type SpriteData ¶
type SpriteData struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.