ControlButton.gd 226 B

123456789101112131415
  1. extends Button
  2. export var action = "ui_up"
  3. func _ready():
  4. connect("button_down",self,"press")
  5. connect("button_up",self,"release")
  6. func press():
  7. Input.action_press(action)
  8. func release():
  9. Input.action_release(action)