Added new enemy character. WIP.
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"mover/assets"
|
||||
"mover/fonts"
|
||||
"mover/gamedata"
|
||||
"mover/touch"
|
||||
|
||||
"github.com/hajimehoshi/ebiten/v2"
|
||||
"github.com/hajimehoshi/ebiten/v2/audio"
|
||||
@@ -38,8 +39,20 @@ func NewStartScreen() *StartScreen {
|
||||
|
||||
func (s *StartScreen) Update() error {
|
||||
|
||||
touch.UpdateTouchIDs()
|
||||
|
||||
ids := touch.GetTouchIDs()
|
||||
var touched bool = false
|
||||
for _, id := range ids {
|
||||
touched = touch.IsTouchJustPressed(id)
|
||||
if touched {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if inpututil.IsKeyJustPressed(ebiten.KeyEnter) ||
|
||||
ebiten.IsStandardGamepadButtonPressed(0, ebiten.StandardGamepadButtonCenterRight) {
|
||||
ebiten.IsStandardGamepadButtonPressed(0, ebiten.StandardGamepadButtonCenterRight) ||
|
||||
touched {
|
||||
s.eHandler[EventCompleted]()
|
||||
if s.audioplayer.IsPlaying() {
|
||||
s.audioplayer.Close()
|
||||
|
||||
Reference in New Issue
Block a user