remove ebiten from KeyMap
This commit is contained in:
@@ -25,33 +25,33 @@ func (e *Engine) ClearKeyPresed() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (e *Engine) UpPressed() bool {
|
func (e *Engine) UpPressed() bool {
|
||||||
return e.PressedKey == e.Settings.KeyMap.Up
|
return e.PressedKey == e.Settings.KeyMap.Up.(ebiten.Key)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *Engine) DownPressed() bool {
|
func (e *Engine) DownPressed() bool {
|
||||||
return e.PressedKey == e.Settings.KeyMap.Down
|
return e.PressedKey == e.Settings.KeyMap.Down.(ebiten.Key)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *Engine) RightPressed() bool {
|
func (e *Engine) RightPressed() bool {
|
||||||
return e.PressedKey == e.Settings.KeyMap.Right
|
return e.PressedKey == e.Settings.KeyMap.Right.(ebiten.Key)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *Engine) LeftPressed() bool {
|
func (e *Engine) LeftPressed() bool {
|
||||||
return e.PressedKey == e.Settings.KeyMap.Left
|
return e.PressedKey == e.Settings.KeyMap.Left.(ebiten.Key)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *Engine) Action0Pressed() bool {
|
func (e *Engine) Action0Pressed() bool {
|
||||||
return e.PressedKey == e.Settings.KeyMap.Action0
|
return e.PressedKey == e.Settings.KeyMap.Action0.(ebiten.Key)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *Engine) Action1Pressed() bool {
|
func (e *Engine) Action1Pressed() bool {
|
||||||
return e.PressedKey == e.Settings.KeyMap.Action1
|
return e.PressedKey == e.Settings.KeyMap.Action1.(ebiten.Key)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *Engine) Action2Pressed() bool {
|
func (e *Engine) Action2Pressed() bool {
|
||||||
return e.PressedKey == e.Settings.KeyMap.Action2
|
return e.PressedKey == e.Settings.KeyMap.Action2.(ebiten.Key)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *Engine) Action3Pressed() bool {
|
func (e *Engine) Action3Pressed() bool {
|
||||||
return e.PressedKey == e.Settings.KeyMap.Action3
|
return e.PressedKey == e.Settings.KeyMap.Action3.(ebiten.Key)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,14 @@
|
|||||||
package entity
|
package entity
|
||||||
|
|
||||||
import "github.com/hajimehoshi/ebiten"
|
|
||||||
|
|
||||||
type KeyMap struct {
|
type KeyMap struct {
|
||||||
Up ebiten.Key
|
Up any
|
||||||
Down ebiten.Key
|
Down any
|
||||||
Right ebiten.Key
|
Right any
|
||||||
Left ebiten.Key
|
Left any
|
||||||
Action0 ebiten.Key
|
Action0 any
|
||||||
Action1 ebiten.Key
|
Action1 any
|
||||||
Action2 ebiten.Key
|
Action2 any
|
||||||
Action3 ebiten.Key
|
Action3 any
|
||||||
}
|
}
|
||||||
|
|
||||||
type ScreenSettings struct {
|
type ScreenSettings struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user