gg/keys.go

19 lines
224 B
Go
Raw Normal View History

2023-10-23 15:45:18 +03:00
package gg
2023-02-18 07:46:33 +03:00
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
}