input.touchA1.onEvent(ButtonEvent.Down, function () {
mouse.setButton(MouseButton.Left, true)
light.graph(5, 20)
light.showRing(
`red red orange red orange orange red orange red red`
)
light.clear()
mouse.setButton(MouseButton.Left, false)
})
input.onGesture(Gesture.Shake, function () {
keyboard.key("S", KeyboardKeyEvent.Press)
light.graph(5, 20)
light.showRing(
`white white white white white white white white white white`
)
light.clear()
keyboard.key("S", KeyboardKeyEvent.Up)
})
input.buttonA.onEvent(ButtonEvent.Click, function () {
keyboard.key("A", KeyboardKeyEvent.Down)
light.graph(5, 20)
light.showRing(
`yellow yellow yellow yellow yellow yellow yellow yellow yellow yellow`
)
keyboard.key("A", KeyboardKeyEvent.Up)
light.clear()
})
input.buttonB.onEvent(ButtonEvent.Click, function () {
keyboard.key("D", KeyboardKeyEvent.Down)
light.graph(5, 20)
light.showRing(
`green green green green green green green green green green`
)
light.clear()
keyboard.key("D", KeyboardKeyEvent.Up)
})
input.buttonsAB.onEvent(ButtonEvent.Click, function () {
keyboard.key("W", KeyboardKeyEvent.Down)
light.graph(5, 20)
light.showRing(
`blue blue blue blue blue blue blue blue blue blue`
)
light.clear()
keyboard.key("W", KeyboardKeyEvent.Up)
})
forever(function () {
})
Comments