initial commit
This commit is contained in:
commit
08c8f0a8e1
20 changed files with 1744 additions and 0 deletions
32
node_2d.gd
Normal file
32
node_2d.gd
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
extends Node2D
|
||||
|
||||
# https://docs.godotengine.org/en/stable/classes/class_inputeventmidi.html
|
||||
# https://docs.godotengine.org/en/stable/classes/class_%40globalscope.html#enum-globalscope-midimessage
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
OS.open_midi_inputs()
|
||||
print(OS.get_connected_midi_inputs())
|
||||
|
||||
|
||||
func _unhandled_input(event):
|
||||
if event is InputEventKey:
|
||||
if event.keycode == KEY_ESCAPE:
|
||||
get_tree().quit()
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(_delta):
|
||||
|
||||
# process inputs
|
||||
if Input.is_action_pressed("quit"):
|
||||
# exit the software
|
||||
get_tree().quit()
|
||||
if Input.is_action_pressed("left") or MIDIMessage.MIDI_MESSAGE_CONTROL_CHANGE == 1:
|
||||
# trigger the left controller
|
||||
print("left")
|
||||
if Input.is_action_pressed("right") or MIDIMessage.MIDI_MESSAGE_CONTROL_CHANGE == 1:
|
||||
# trigger the right controller
|
||||
print("right")
|
||||
right_turn
|
||||
Loading…
Add table
Add a link
Reference in a new issue