Add gas bomber skill-shot vessel

This commit is contained in:
Loïc Wisniewski 2026-08-15 04:45:15 +02:00
commit 1d9afcbc2e
28 changed files with 882 additions and 85 deletions

View file

@ -21,6 +21,7 @@ extends Node2D
# Navigation section. Optional so a scene without it still works.
@onready var pivot_cw_button: IconButton = get_node_or_null("UI/PivotCWButton")
@onready var pivot_ccw_button: IconButton = get_node_or_null("UI/PivotCCWButton")
@onready var gas_bomb_controller: GasBombController = get_node_or_null("GasBombController")
var touches: Dictionary = {}
var pinch_active: bool = false
@ -252,6 +253,8 @@ func _handle_touch(event: InputEventScreenTouch) -> void:
# The joystick gets first refusal on every touch, and only claims ones
# that begin inside its own rect - so pinch-to-zoom still works anywhere
# else on screen.
if gas_bomb_controller != null and gas_bomb_controller.handle_touch(event):
return
if _handle_pivot_touch(event):
return
if joystick != null and joystick.visible and joystick.handle_touch(event):
@ -272,6 +275,8 @@ func _handle_touch(event: InputEventScreenTouch) -> void:
func _handle_drag(event: InputEventScreenDrag) -> void:
if gas_bomb_controller != null and gas_bomb_controller.handle_drag(event):
return
if joystick != null and joystick.visible and joystick.handle_drag(event):
return
if not touches.has(event.index):