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.

39 lines
465 B

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