Twin-stick shooter
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
423 B

package main
import (
"time"
)
type gamePlayer struct {
x, y float64
angle float64
weapon *playerWeapon
score int
soulsRescued int
health int
holyWaters int
garlicUntil time.Time
holyWaterUntil time.Time
}
func NewPlayer() (*gamePlayer, error) {
p := &gamePlayer{
weapon: &playerWeapon{
sprite: imageAtlas[ImageUzi],
cooldown: 100 * time.Millisecond,
},
health: 3,
}
return p, nil
}