Documentation ¶
Index ¶
- Constants
- func Clear()
- func Draw(screen *ebiten.Image) error
- func HitUpdate()
- func MoveToFront(bullet *Bullet)
- func Update()
- type Bullet
- func (n *Bullet) AnimationAttack() error
- func (n *Bullet) AnimationGotHit() error
- func (n *Bullet) Draw(screen *ebiten.Image) error
- func (n *Bullet) EntityID() uint
- func (n *Bullet) HID() string
- func (n *Bullet) IsDead() bool
- func (n *Bullet) IsHit(x, y float64) bool
- func (n *Bullet) Position() (float64, float64)
- func (n *Bullet) SHeight() int
- func (n *Bullet) SWidth() int
- func (n *Bullet) SetAnimation(name string) error
- func (n *Bullet) SetPosition(x, y float64)
- func (n *Bullet) X() float64
- func (n *Bullet) Y() float64
- type BulletData
Constants ¶
View Source
const ( BulletNone = iota BulletPlain )
View Source
const ( BehaviorNone = iota BehaviorLinear BehaviorBoomerang BehaviorCircle BehaviorLasso BehaviorWave BehaviorUp BehaviorKnockback )
Variables ¶
This section is empty.
Functions ¶
func MoveToFront ¶
func MoveToFront(bullet *Bullet)
Types ¶
type Bullet ¶
type Bullet struct {
// contains filtered or unexported fields
}
func (*Bullet) AnimationAttack ¶
func (*Bullet) AnimationGotHit ¶
func (*Bullet) SetAnimation ¶
SetAnimation sets the animation of the bullet
func (*Bullet) SetPosition ¶
type BulletData ¶
type BulletData struct { Damage int // Damage is the amount of damage dealt by the object SpriteName string // Sprite is the file name LayerName string // Layer is the layer on aseprite to use BehaviorType int // Behavior handles movement style Distance float64 // Distance is how far a bullet will travel IsImmortal bool // Lifespam is unlimited if this is true Lifespan time.Time // Lifespan is how long a bullet will be alive for, if IsImmortal is false MoveSpeed float64 // MoveSpeed is how fast a bullet moves at SourceWeaponType int // SourceWeaponType is the type of weapon that is the source of the bullet OffsetX float64 // OffsetX is the bullet's offset on spawn OffsetY float64 // OffsetY is the bullet's offset on spawn }
Click to show internal directories.
Click to hide internal directories.