WIP: Modifying the client node
This commit is contained in:
16
godot/scenes/utils/client_node/client_node.gd
Normal file
16
godot/scenes/utils/client_node/client_node.gd
Normal file
@ -0,0 +1,16 @@
|
||||
extends Node3D
|
||||
class_name ClientNode
|
||||
|
||||
|
||||
var available_cameras: Array[CameraMount] = []
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _physics_process(delta: float) -> void:
|
||||
var game_root := helpers.get_root_node()
|
||||
var available_cameras_raw: Array[Node] = game_root.find_children("*", "CameraMount", true, false)
|
||||
for camera_raw in available_cameras_raw:
|
||||
var camera: CameraMount = camera_raw as CameraMount
|
||||
if camera.active:
|
||||
camera.connect_to_camera()
|
||||
available_cameras.append(camera)
|
||||
|
6
godot/scenes/utils/client_node/client_node.tscn
Normal file
6
godot/scenes/utils/client_node/client_node.tscn
Normal file
@ -0,0 +1,6 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://b4y8gnogfoulk"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/utils/client_node/client_node.gd" id="1_otqq8"]
|
||||
|
||||
[node name="ClientNode" type="Node3D"]
|
||||
script = ExtResource("1_otqq8")
|
Reference in New Issue
Block a user