bullet

package
v0.0.0-...-b720342 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bullet

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

Bullet is the bullet triggered by characters.

func NewBullet

func NewBullet(img *ebiten.Image, velocity image.Point, area image.Rectangle) (*Bullet, error)

NewBullet returns a new Bullet. Please set the velocity of this bullet and the area of movement.

func (*Bullet) Draw

func (b *Bullet) Draw(screen *ebiten.Image) error

Draw draws the image of this bullet.

func (*Bullet) Fire

func (b *Bullet) Fire(point image.Point)

Fire sets the initial position and make this bullet

func (*Bullet) GetRectangle

func (b *Bullet) GetRectangle() image.Rectangle

GetRectangle returns the ractangle of this bullet.

func (*Bullet) Size

func (b *Bullet) Size() image.Point

Size returns the size of this bullet.

func (*Bullet) Update

func (b *Bullet) Update()

Update update the internal state of this bullet.

Jump to

Keyboard shortcuts

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