gg/keys.go
2023-10-23 15:47:27 +03:00

18 lines
224 B
Go

package gg
import (
"github.com/hajimehoshi/ebiten/v2"
)
type Key = ebiten.Key
func (e *Engine) KeyIsPressed(k Key) bool {
keys := e.Keys()
for _, v := range keys {
if v == k {
return true
}
}
return false
}