18 lines
224 B
Go
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
|
|
}
|