inpututil: Rename JustPressedTouches -> JustPressedTouchIDs

This commit is contained in:
Hajime Hoshi 2018-04-30 20:07:27 +09:00
parent 342551da8d
commit db3effe65a
2 changed files with 5 additions and 5 deletions

View File

@ -182,7 +182,7 @@ func jump() bool {
if inpututil.IsMouseButtonJustPressed(ebiten.MouseButtonLeft) {
return true
}
if len(inpututil.JustPressedTouches()) > 0 {
if len(inpututil.JustPressedTouchIDs()) > 0 {
return true
}
return false

View File

@ -294,12 +294,12 @@ func GamepadButtonPressDuration(id int, button ebiten.GamepadButton) int {
return s
}
// JustPressedTouches returns touch IDs that are created just in the current frame.
// JustPressedTouchIDs returns touch IDs that are created just in the current frame.
//
// JustPressedTouches might return nil when there is not touch.
// JustPressedTouchIDs might return nil when there is not touch.
//
// JustPressedTouches is concurrent safe.
func JustPressedTouches() []int {
// JustPressedTouchIDs is concurrent safe.
func JustPressedTouchIDs() []int {
var ids []int
theInputState.m.RLock()
for id, s := range theInputState.touchDurations {