Functional prototype
This commit is contained in:
@@ -3,6 +3,7 @@ extends Node3D
|
||||
|
||||
@export var camera_array: Array[Camera3D] = []
|
||||
@export var current_camera: int = 0
|
||||
@export var game_started: bool = false
|
||||
|
||||
|
||||
func _process(delta):
|
||||
@@ -14,3 +15,7 @@ func _process(delta):
|
||||
current_camera = 0
|
||||
camera_array[current_camera].make_current()
|
||||
print(current_camera)
|
||||
|
||||
|
||||
func start_game():
|
||||
game_started = true
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
extends Node3D
|
||||
|
||||
@export var zoom_curve: Curve
|
||||
@export var drone: RigidBody3D
|
||||
@export var child_camera: Camera3D
|
||||
|
||||
var child_camera: Camera3D
|
||||
var drone: RigidBody3D
|
||||
var dist_to_drone: float = 0.0
|
||||
|
||||
|
||||
func _ready():
|
||||
child_camera = get_child(0)
|
||||
drone = get_parent().get_node("Drone")
|
||||
|
||||
|
||||
func _physics_process(delta):
|
||||
|
||||
19
core/scripts/main_menu.gd
Normal file
19
core/scripts/main_menu.gd
Normal file
@@ -0,0 +1,19 @@
|
||||
extends Control
|
||||
|
||||
@export var start_button: Button
|
||||
@export var quit_button: Button
|
||||
|
||||
|
||||
func _ready():
|
||||
start_button.pressed.connect(_on_start_button_pressed)
|
||||
quit_button.pressed.connect(_on_quit_button_pressed)
|
||||
start_button.grab_focus()
|
||||
|
||||
|
||||
func _on_start_button_pressed():
|
||||
hide()
|
||||
GameManager.start_game()
|
||||
|
||||
|
||||
func _on_quit_button_pressed():
|
||||
get_tree().quit()
|
||||
Reference in New Issue
Block a user