Rescaled maps and reworked drone code
Rescaled maps and reworked drone code to support fpv remote and joy controller with a menu switch
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=13 format=3 uid="uid://deah8x3tnm045"]
|
||||
[gd_scene load_steps=15 format=3 uid="uid://deah8x3tnm045"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://b3ecco3iykmlc" path="res://assets/textures/overcast_soil_puresky_4k.hdr" id="1_4mr0e"]
|
||||
[ext_resource type="PackedScene" uid="uid://dwvmna8qc0vb4" path="res://core/drone/drone.tscn" id="2_orkyq"]
|
||||
@@ -29,6 +29,12 @@ bake_resolution = 1
|
||||
_data = [Vector2(0, 90), 0.0, -220.055, 0, 0, Vector2(0.0753138, 59.5526), -282.238, -282.238, 0, 0, Vector2(0.449093, 7.72959), -32.7953, -32.7953, 0, 0, Vector2(0.994421, 1), -7.74656, 0.0, 0, 0]
|
||||
point_count = 4
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_rjteo"]
|
||||
shadow_color = Color(0, 0, 0, 0.611765)
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_ymk35"]
|
||||
shadow_color = Color(0, 0, 0, 0.611765)
|
||||
|
||||
[node name="Main" type="Node3D"]
|
||||
|
||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
||||
@@ -46,6 +52,7 @@ environment = SubResource("Environment_ruppb")
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.017014, 0)
|
||||
|
||||
[node name="Drone" parent="ResetPoint" node_paths=PackedStringArray("reset_point") instance=ExtResource("2_orkyq")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -20.7659, 0, -31.913)
|
||||
reset_point = NodePath("..")
|
||||
|
||||
[node name="LOSView" type="Node3D" parent="." node_paths=PackedStringArray("drone", "child_camera")]
|
||||
@@ -64,7 +71,7 @@ script = ExtResource("3_sec6q")
|
||||
process_mode = 3
|
||||
layer = 2
|
||||
|
||||
[node name="MainMenu" type="Control" parent="CanvasLayer" node_paths=PackedStringArray("start_button", "quit_button")]
|
||||
[node name="MainMenu" type="Control" parent="CanvasLayer" node_paths=PackedStringArray("start_button", "quit_button", "controller_mode_button", "joy_controller_label", "fpv_remote_label")]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
@@ -74,6 +81,9 @@ grow_vertical = 2
|
||||
script = ExtResource("4_bknjq")
|
||||
start_button = NodePath("HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer/StartButton")
|
||||
quit_button = NodePath("HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer/QuitButton")
|
||||
controller_mode_button = NodePath("HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer/HBoxContainer/ControllerModeButton")
|
||||
joy_controller_label = NodePath("HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer/HBoxContainer/JoyControllerLabel")
|
||||
fpv_remote_label = NodePath("HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer/HBoxContainer/FPVRemoteLabel")
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="CanvasLayer/MainMenu"]
|
||||
layout_mode = 1
|
||||
@@ -100,7 +110,7 @@ alignment = 1
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="CanvasLayer/MainMenu/HBoxContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_right = 150
|
||||
theme_override_constants/margin_right = 65
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/MainMenu/HBoxContainer/VBoxContainer/MarginContainer"]
|
||||
layout_mode = 2
|
||||
@@ -109,13 +119,36 @@ alignment = 1
|
||||
|
||||
[node name="StartButton" type="Button" parent="CanvasLayer/MainMenu/HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
focus_neighbor_bottom = NodePath("../QuitButton")
|
||||
focus_neighbor_bottom = NodePath("../HBoxContainer/ControllerModeButton")
|
||||
theme_override_font_sizes/font_size = 50
|
||||
text = "START"
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer/MainMenu/HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="JoyControllerLabel" type="Label" parent="CanvasLayer/MainMenu/HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer/HBoxContainer"]
|
||||
self_modulate = Color(0, 1, 0, 1)
|
||||
layout_mode = 2
|
||||
text = "JOY CONTROLLER"
|
||||
label_settings = SubResource("LabelSettings_rjteo")
|
||||
|
||||
[node name="ControllerModeButton" type="CheckButton" parent="CanvasLayer/MainMenu/HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
focus_neighbor_top = NodePath("../../StartButton")
|
||||
focus_neighbor_bottom = NodePath("../../QuitButton")
|
||||
alignment = 1
|
||||
icon_alignment = 1
|
||||
|
||||
[node name="FPVRemoteLabel" type="Label" parent="CanvasLayer/MainMenu/HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer/HBoxContainer"]
|
||||
self_modulate = Color(0.498039, 0.498039, 0.498039, 1)
|
||||
layout_mode = 2
|
||||
text = "FPV REMOTE"
|
||||
label_settings = SubResource("LabelSettings_ymk35")
|
||||
|
||||
[node name="QuitButton" type="Button" parent="CanvasLayer/MainMenu/HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
focus_neighbor_top = NodePath("../StartButton")
|
||||
focus_neighbor_top = NodePath("../HBoxContainer/ControllerModeButton")
|
||||
theme_override_font_sizes/font_size = 50
|
||||
text = "QUIT"
|
||||
|
||||
@@ -181,3 +214,5 @@ theme_override_font_sizes/font_size = 25
|
||||
text = "QUIT"
|
||||
|
||||
[node name="TestLevel" parent="." instance=ExtResource("4_oqdxa")]
|
||||
|
||||
[connection signal="toggled" from="CanvasLayer/MainMenu/HBoxContainer/VBoxContainer/MarginContainer/VBoxContainer/HBoxContainer/ControllerModeButton" to="CanvasLayer/MainMenu" method="_on_controller_mode_button_toggled"]
|
||||
|
||||
Reference in New Issue
Block a user