character

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Player

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

Player is the player character.

func NewPlayer

func NewPlayer(img, anotherImg *ebiten.Image, area image.Rectangle, bGun, aGun *gun.Gun) (*Player, error)

NewPlayer returns a new Player. Please set the area of movement.

func (*Player) ChangeMode

func (p *Player) ChangeMode()

ChangeMode changes the image and the gun of this character.

func (*Player) Draw

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

Draw draws this character.

func (*Player) Fire

func (p *Player) Fire()

Fire fires onley selected gun.

func (*Player) SetLocation

func (p *Player) SetLocation(point image.Point)

SetLocation sets the location to draw this character.

func (*Player) Size

func (p *Player) Size() image.Point

Size returns the size of this character.

func (*Player) Update

func (p *Player) Update(direction pad.Direction)

Update updates the internal state. Please pass the direction of the pad to move this character.

Jump to

Keyboard shortcuts

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