Update drone and level scenes with new shapes, connections, and scripts. Add mouse interaction events for director drone. Include new level 2 & 3 scenes with various elements and components.

This commit is contained in:
Dan 2024-05-09 18:43:38 +01:00
parent 491395e6b9
commit 7009695327
238 changed files with 4275 additions and 23 deletions

View file

@ -12,7 +12,7 @@ var director_drones : Array = [] # List of all director drones in the world
@onready var drone_controls = %DroneControls
@onready var ui_controls = get_parent().get_node("UiComponent")
@onready var spawned_drones_container = get_node("SpawnedDrones")
@onready var cursor = preload("res://resources/cursors/launch_drone.png")
@onready var place_cursor = preload("res://resources/cursors/target_round_b.png")
# Drones!
@onready var director_drone = preload("res://entities/DirectorDrone.tscn")
@ -78,7 +78,7 @@ func spawn_drone(drone_type : String) -> void:
func place_drone(drone_type : String) -> void:
if !spawning_drone:
Input.set_custom_mouse_cursor(cursor, Input.CURSOR_ARROW, Vector2(32, 32))
Input.set_custom_mouse_cursor(place_cursor, Input.CURSOR_ARROW, Vector2(32, 32))
drone_controls.disable_buttons()
Log.pr("Placing " + drone_type + "...")
spawning_drone = true
@ -137,9 +137,12 @@ func _on_button_mouse_exited() -> void:
func update_director_drone_list():
director_drones.clear()
var x = 1
for drone in spawned_drones_container.get_children():
if drone is DirectorDrone:
drone.visit_order = x
director_drones.append(drone)
x += 1
Log.pr(director_drones.size())