mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-27 11:12:44 +01:00
examples/blocks/blocks: Unify the terms 'abstract' and 'virtual'
This commit is contained in:
parent
5004fdcf02
commit
d32b58d050
@ -232,7 +232,7 @@ func (s *GameScene) Update(state *GameState) error {
|
||||
|
||||
if s.gameover {
|
||||
if inpututil.IsKeyJustPressed(ebiten.KeySpace) ||
|
||||
anyGamepadAbstractButtonJustPressed(state.Input) {
|
||||
anyGamepadVirtualButtonJustPressed(state.Input) {
|
||||
state.SceneManager.GoTo(&TitleScene{})
|
||||
}
|
||||
return nil
|
||||
|
@ -39,7 +39,7 @@ type TitleScene struct {
|
||||
count int
|
||||
}
|
||||
|
||||
func anyGamepadAbstractButtonJustPressed(i *Input) bool {
|
||||
func anyGamepadVirtualButtonJustPressed(i *Input) bool {
|
||||
if !i.gamepadConfig.IsInitialized() {
|
||||
return false
|
||||
}
|
||||
@ -59,12 +59,12 @@ func (s *TitleScene) Update(state *GameState) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
if anyGamepadAbstractButtonJustPressed(state.Input) {
|
||||
if anyGamepadVirtualButtonJustPressed(state.Input) {
|
||||
state.SceneManager.GoTo(NewGameScene())
|
||||
return nil
|
||||
}
|
||||
|
||||
// If 'abstract' gamepad buttons are not set and any gamepad buttons are pressed,
|
||||
// If 'virtual' gamepad buttons are not set and any gamepad buttons are pressed,
|
||||
// go to the gamepad configuration scene.
|
||||
if id := state.Input.GamepadIDButtonPressed(); id >= 0 {
|
||||
g := &GamepadScene{}
|
||||
|
Loading…
Reference in New Issue
Block a user