Initial Commit

This commit is contained in:
June
2026-03-24 22:00:03 -07:00
parent bf9620bbb6
commit 5533b95cff
73 changed files with 1647 additions and 293 deletions

21
Scripts/Helper/hCamera.gd Normal file
View File

@@ -0,0 +1,21 @@
class_name hCamera
var name_to_id: Dictionary = {}
var id_to_name: Dictionary = {}
# Explicit setup function
func setup(cameras_dict: Dictionary) -> void:
if cameras_dict == null:
push_error("Cameras dictionary is null!")
return
name_to_id = cameras_dict.duplicate()
id_to_name.clear()
for name in name_to_id.keys():
id_to_name[int(name_to_id[name])] = name # ensure keys are ints
func getID(cameraName: String) -> int:
return name_to_id.get(cameraName.to_upper(), -1)
func getName(cam_id: int) -> String:
return id_to_name.get(cam_id, "UNKNOWN")

View File

@@ -0,0 +1 @@
uid://boy5lbwt24ugk