From 64f37f4209d80bfad976dd4a139c98002caef15f Mon Sep 17 00:00:00 2001 From: Anson Bridges Date: Fri, 22 Aug 2025 12:46:04 -0700 Subject: the harmonious transition from menu to game --- objects/Airplane.tscn | 136 +++++++++++++++++++++++++++++++++++++++++ objects/HexSpace.tscn | 4 +- objects/Plane.tscn | 136 ----------------------------------------- objects/PlaneControlBoard.tscn | 96 ++++++++++++++++------------- objects/PlayerListEntry.tscn | 42 +++++++++++++ 5 files changed, 233 insertions(+), 181 deletions(-) create mode 100644 objects/Airplane.tscn delete mode 100644 objects/Plane.tscn create mode 100644 objects/PlayerListEntry.tscn (limited to 'objects') diff --git a/objects/Airplane.tscn b/objects/Airplane.tscn new file mode 100644 index 0000000..975fd6f --- /dev/null +++ b/objects/Airplane.tscn @@ -0,0 +1,136 @@ +[gd_scene load_steps=15 format=2] + +[ext_resource path="res://scripts/Airplane.gd" type="Script" id=1] +[ext_resource path="res://resources/fonts/Cochineal-Bold.otf" type="DynamicFontData" id=2] +[ext_resource path="res://textures/plane_action_indicator_board.png" type="Texture" id=3] +[ext_resource path="res://textures/gradient_transparent.png" type="Texture" id=4] +[ext_resource path="res://resources/blank_plane_material.material" type="Material" id=5] + +[sub_resource type="CylinderMesh" id=1] +material = ExtResource( 5 ) +top_radius = 0.1 +bottom_radius = 0.1 +height = 0.4 + +[sub_resource type="PrismMesh" id=2] +left_to_right = 0.2 +size = Vector3( 0.18, 0.18, 0.18 ) + +[sub_resource type="CubeMesh" id=3] +size = Vector3( 0.1, 0.05, 0.6 ) + +[sub_resource type="CubeMesh" id=4] +size = Vector3( 0.1, 0.05, 0.3 ) + +[sub_resource type="CylinderShape" id=5] +height = 0.2 +radius = 0.35 + +[sub_resource type="DynamicFont" id=6] +size = 100 +outline_size = 2 +outline_color = Color( 0, 0, 0, 1 ) +font_data = ExtResource( 2 ) + +[sub_resource type="ViewportTexture" id=7] +viewport_path = NodePath("ActionIndicatorViewport") + +[sub_resource type="SpatialMaterial" id=8] +flags_transparent = true +flags_unshaded = true +params_cull_mode = 2 +albedo_color = Color( 0.945098, 1, 0, 0.439216 ) +albedo_texture = ExtResource( 4 ) +uv1_offset = Vector3( 0, 0.498, 0 ) + +[sub_resource type="CylinderMesh" id=9] +material = SubResource( 8 ) +top_radius = 0.4 +bottom_radius = 0.4 +height = 0.3 +radial_segments = 20 + +[node name="Plane" type="Area"] +script = ExtResource( 1 ) + +[node name="Fuselage" type="MeshInstance" parent="."] +transform = Transform( -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0, 1, 0, 0, 0 ) +mesh = SubResource( 1 ) + +[node name="Cone" type="MeshInstance" parent="."] +transform = Transform( -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0, 1, -0.287144, 0.0157076, 0 ) +mesh = SubResource( 2 ) + +[node name="Wings" type="MeshInstance" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0623346, 0.0405034, 0 ) +mesh = SubResource( 3 ) + +[node name="Tail" type="MeshInstance" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.19327, 0.0606151, 0 ) +mesh = SubResource( 4 ) + +[node name="CollisionShape" type="CollisionShape" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0276226, 0.0342902, 0 ) +shape = SubResource( 5 ) + +[node name="UnsetIndicator" type="Label3D" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.280024, 0 ) +visible = false +pixel_size = 0.001 +billboard = 1 +fixed_size = true +text = "!" +font = SubResource( 6 ) + +[node name="ActionIndicator" type="Sprite3D" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.00816703, 0 ) +visible = false +centered = false +pixel_size = 0.0015 +billboard = 1 +double_sided = false +no_depth_test = true +fixed_size = true +texture = SubResource( 7 ) + +[node name="SelectionIndicator" type="MeshInstance" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.071805, 0 ) +visible = false +mesh = SubResource( 9 ) + +[node name="ActionIndicatorViewport" type="Viewport" parent="."] +size = Vector2( 320, 64 ) +transparent_bg = true +disable_3d = true +usage = 1 + +[node name="FlightInfo" type="Node2D" parent="ActionIndicatorViewport"] + +[node name="Background" type="Sprite" parent="ActionIndicatorViewport/FlightInfo"] +position = Vector2( 192, 32 ) +z_index = -1 +texture = ExtResource( 3 ) + +[node name="Action1" type="Sprite" parent="ActionIndicatorViewport/FlightInfo"] +position = Vector2( 95, 32 ) +scale = Vector2( 0.625, 0.625 ) + +[node name="Action2" type="Sprite" parent="ActionIndicatorViewport/FlightInfo"] +position = Vector2( 144, 32 ) +scale = Vector2( 0.625, 0.625 ) + +[node name="Action3" type="Sprite" parent="ActionIndicatorViewport/FlightInfo"] +position = Vector2( 193, 32 ) +scale = Vector2( 0.625, 0.625 ) + +[node name="Action4" type="Sprite" parent="ActionIndicatorViewport/FlightInfo"] +position = Vector2( 242, 32 ) +scale = Vector2( 0.625, 0.625 ) + +[node name="Action5" type="Sprite" parent="ActionIndicatorViewport/FlightInfo"] +position = Vector2( 291, 32 ) +scale = Vector2( 0.625, 0.625 ) + +[connection signal="input_event" from="." to="." method="_on_Plane_input_event"] +[connection signal="mouse_entered" from="." to="." method="_on_Plane_mouse_entered"] +[connection signal="mouse_exited" from="." to="." method="_on_Plane_mouse_exited"] diff --git a/objects/HexSpace.tscn b/objects/HexSpace.tscn index 2fa1d71..f703422 100644 --- a/objects/HexSpace.tscn +++ b/objects/HexSpace.tscn @@ -147,9 +147,9 @@ transform = Transform( 0.866025, 0, -0.5, 0, 1, 0, 0.5, 0, 0.866025, 0.0160618, mesh = SubResource( 17 ) [node name="AirportName" type="Label3D" parent="Airport"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.971102, 0 ) +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.252818, 0.302783, -0.208905 ) visible = false -pixel_size = 0.001 +pixel_size = 0.0007 billboard = 1 fixed_size = true text = "AIRPORT NAME" diff --git a/objects/Plane.tscn b/objects/Plane.tscn deleted file mode 100644 index 21ce972..0000000 --- a/objects/Plane.tscn +++ /dev/null @@ -1,136 +0,0 @@ -[gd_scene load_steps=15 format=2] - -[ext_resource path="res://scripts/Plane.gd" type="Script" id=1] -[ext_resource path="res://resources/fonts/Cochineal-Bold.otf" type="DynamicFontData" id=2] -[ext_resource path="res://textures/plane_action_indicator_board.png" type="Texture" id=3] -[ext_resource path="res://textures/gradient_transparent.png" type="Texture" id=4] -[ext_resource path="res://resources/blank_plane_material.material" type="Material" id=5] - -[sub_resource type="CylinderMesh" id=1] -material = ExtResource( 5 ) -top_radius = 0.1 -bottom_radius = 0.1 -height = 0.4 - -[sub_resource type="PrismMesh" id=2] -left_to_right = 0.2 -size = Vector3( 0.18, 0.18, 0.18 ) - -[sub_resource type="CubeMesh" id=3] -size = Vector3( 0.1, 0.05, 0.6 ) - -[sub_resource type="CubeMesh" id=4] -size = Vector3( 0.1, 0.05, 0.3 ) - -[sub_resource type="CylinderShape" id=5] -height = 0.2 -radius = 0.35 - -[sub_resource type="DynamicFont" id=6] -size = 100 -outline_size = 2 -outline_color = Color( 0, 0, 0, 1 ) -font_data = ExtResource( 2 ) - -[sub_resource type="ViewportTexture" id=7] -viewport_path = NodePath("ActionIndicatorViewport") - -[sub_resource type="SpatialMaterial" id=8] -flags_transparent = true -flags_unshaded = true -params_cull_mode = 2 -albedo_color = Color( 0.945098, 1, 0, 0.439216 ) -albedo_texture = ExtResource( 4 ) -uv1_offset = Vector3( 0, 0.498, 0 ) - -[sub_resource type="CylinderMesh" id=9] -material = SubResource( 8 ) -top_radius = 0.4 -bottom_radius = 0.4 -height = 0.3 -radial_segments = 20 - -[node name="Plane" type="Area"] -script = ExtResource( 1 ) - -[node name="Fuselage" type="MeshInstance" parent="."] -transform = Transform( -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0, 1, 0, 0, 0 ) -mesh = SubResource( 1 ) - -[node name="Cone" type="MeshInstance" parent="."] -transform = Transform( -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0, 1, -0.287144, 0.0157076, 0 ) -mesh = SubResource( 2 ) - -[node name="Wings" type="MeshInstance" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0623346, 0.0405034, 0 ) -mesh = SubResource( 3 ) - -[node name="Tail" type="MeshInstance" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.19327, 0.0606151, 0 ) -mesh = SubResource( 4 ) - -[node name="CollisionShape" type="CollisionShape" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0276226, 0.0342902, 0 ) -shape = SubResource( 5 ) - -[node name="UnsetIndicator" type="Label3D" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.280024, 0 ) -visible = false -pixel_size = 0.001 -billboard = 1 -fixed_size = true -text = "!" -font = SubResource( 6 ) - -[node name="ActionIndicator" type="Sprite3D" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.00816703, 0 ) -visible = false -centered = false -pixel_size = 0.0015 -billboard = 1 -double_sided = false -no_depth_test = true -fixed_size = true -texture = SubResource( 7 ) - -[node name="SelectionIndicator" type="MeshInstance" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.071805, 0 ) -visible = false -mesh = SubResource( 9 ) - -[node name="ActionIndicatorViewport" type="Viewport" parent="."] -size = Vector2( 320, 64 ) -transparent_bg = true -disable_3d = true -usage = 1 - -[node name="FlightInfo" type="Node2D" parent="ActionIndicatorViewport"] - -[node name="Background" type="Sprite" parent="ActionIndicatorViewport/FlightInfo"] -position = Vector2( 192, 32 ) -z_index = -1 -texture = ExtResource( 3 ) - -[node name="Action1" type="Sprite" parent="ActionIndicatorViewport/FlightInfo"] -position = Vector2( 95, 32 ) -scale = Vector2( 0.625, 0.625 ) - -[node name="Action2" type="Sprite" parent="ActionIndicatorViewport/FlightInfo"] -position = Vector2( 144, 32 ) -scale = Vector2( 0.625, 0.625 ) - -[node name="Action3" type="Sprite" parent="ActionIndicatorViewport/FlightInfo"] -position = Vector2( 193, 32 ) -scale = Vector2( 0.625, 0.625 ) - -[node name="Action4" type="Sprite" parent="ActionIndicatorViewport/FlightInfo"] -position = Vector2( 242, 32 ) -scale = Vector2( 0.625, 0.625 ) - -[node name="Action5" type="Sprite" parent="ActionIndicatorViewport/FlightInfo"] -position = Vector2( 291, 32 ) -scale = Vector2( 0.625, 0.625 ) - -[connection signal="input_event" from="." to="." method="_on_Plane_input_event"] -[connection signal="mouse_entered" from="." to="." method="_on_Plane_mouse_entered"] -[connection signal="mouse_exited" from="." to="." method="_on_Plane_mouse_exited"] diff --git a/objects/PlaneControlBoard.tscn b/objects/PlaneControlBoard.tscn index 4c58d5d..7f2364a 100644 --- a/objects/PlaneControlBoard.tscn +++ b/objects/PlaneControlBoard.tscn @@ -67,7 +67,7 @@ margin_right = -2.0 margin_bottom = -6.0 [node name="Label" type="Label" parent="DestinationHBOX"] -margin_top = 24.0 +margin_top = 23.0 margin_right = 111.0 margin_bottom = 40.0 theme = ExtResource( 1 ) @@ -75,11 +75,21 @@ custom_colors/font_color = Color( 0, 0, 0, 1 ) text = "DESTINATION: " [node name="DestinationIcon" type="TextureRect" parent="DestinationHBOX"] +visible = false margin_left = 115.0 margin_right = 179.0 margin_bottom = 64.0 texture = ExtResource( 5 ) +[node name="DestinationText" type="Label" parent="DestinationHBOX"] +visible = false +margin_left = 115.0 +margin_top = 23.0 +margin_right = 115.0 +margin_bottom = 40.0 +theme = ExtResource( 1 ) +custom_colors/font_color = Color( 0, 0, 0, 1 ) + [node name="AltitudeHBox" type="HBoxContainer" parent="."] anchor_left = 0.05 anchor_top = 0.3 @@ -87,30 +97,30 @@ anchor_right = 0.941 anchor_bottom = 0.3 [node name="Label" type="Label" parent="AltitudeHBox"] -margin_top = 24.0 -margin_right = 109.0 +margin_top = 23.0 +margin_right = 106.0 margin_bottom = 40.0 theme = ExtResource( 1 ) custom_colors/font_color = Color( 0, 0, 0, 1 ) text = "ALTITUDE: " [node name="Altitude1" type="TextureRect" parent="AltitudeHBox"] -margin_left = 113.0 -margin_right = 177.0 +margin_left = 110.0 +margin_right = 174.0 margin_bottom = 64.0 texture = ExtResource( 5 ) [node name="Altitude2" type="TextureRect" parent="AltitudeHBox"] modulate = Color( 0.3, 0.3, 0.3, 1 ) -margin_left = 181.0 -margin_right = 245.0 +margin_left = 178.0 +margin_right = 242.0 margin_bottom = 64.0 texture = ExtResource( 3 ) [node name="Altitude3" type="TextureRect" parent="AltitudeHBox"] modulate = Color( 0.3, 0.3, 0.3, 1 ) -margin_left = 249.0 -margin_right = 313.0 +margin_left = 246.0 +margin_right = 310.0 margin_bottom = 64.0 size_flags_horizontal = 0 size_flags_vertical = 0 @@ -124,160 +134,160 @@ anchor_bottom = 0.9 [node name="ActionSquare1" type="VBoxContainer" parent="ActionHBox"] margin_right = 50.0 -margin_bottom = 74.0 +margin_bottom = 77.0 script = SubResource( 3 ) [node name="MoveFirstButton" type="Button" parent="ActionHBox/ActionSquare1"] margin_right = 50.0 -margin_bottom = 22.0 +margin_bottom = 23.0 theme = ExtResource( 1 ) text = ">>" [node name="ActionOption" type="OptionButton" parent="ActionHBox/ActionSquare1"] -margin_top = 26.0 +margin_top = 27.0 margin_right = 50.0 -margin_bottom = 48.0 +margin_bottom = 50.0 rect_min_size = Vector2( 50, 0 ) theme = ExtResource( 1 ) items = [ "", null, false, 0, null, "←", null, false, 2, null, "→", null, false, 3, null, "↑", null, false, 4, null, "↓", null, false, 5, null ] selected = 0 [node name="MoveLastButton" type="Button" parent="ActionHBox/ActionSquare1"] -margin_top = 52.0 +margin_top = 54.0 margin_right = 50.0 -margin_bottom = 74.0 +margin_bottom = 77.0 theme = ExtResource( 1 ) [node name="Spacer1" type="Control" parent="ActionHBox"] margin_left = 54.0 margin_right = 73.0 -margin_bottom = 74.0 +margin_bottom = 77.0 size_flags_horizontal = 3 [node name="ActionSquare2" type="VBoxContainer" parent="ActionHBox"] margin_left = 77.0 margin_right = 127.0 -margin_bottom = 74.0 +margin_bottom = 77.0 script = SubResource( 3 ) [node name="MoveFirstButton" type="Button" parent="ActionHBox/ActionSquare2"] margin_right = 50.0 -margin_bottom = 22.0 +margin_bottom = 23.0 theme = ExtResource( 1 ) text = ">>" [node name="ActionOption" type="OptionButton" parent="ActionHBox/ActionSquare2"] -margin_top = 26.0 +margin_top = 27.0 margin_right = 50.0 -margin_bottom = 48.0 +margin_bottom = 50.0 rect_min_size = Vector2( 50, 0 ) theme = ExtResource( 1 ) items = [ "", null, false, 0, null, "←", null, false, 2, null, "→", null, false, 3, null, "↑", null, false, 4, null, "↓", null, false, 5, null ] selected = 0 [node name="MoveLastButton" type="Button" parent="ActionHBox/ActionSquare2"] -margin_top = 52.0 +margin_top = 54.0 margin_right = 50.0 -margin_bottom = 74.0 +margin_bottom = 77.0 theme = ExtResource( 1 ) [node name="Spacer2" type="Control" parent="ActionHBox"] margin_left = 131.0 margin_right = 151.0 -margin_bottom = 74.0 +margin_bottom = 77.0 size_flags_horizontal = 3 [node name="ActionSquare3" type="VBoxContainer" parent="ActionHBox"] margin_left = 155.0 margin_right = 205.0 -margin_bottom = 74.0 +margin_bottom = 77.0 script = SubResource( 3 ) [node name="MoveFirstButton" type="Button" parent="ActionHBox/ActionSquare3"] margin_right = 50.0 -margin_bottom = 22.0 +margin_bottom = 23.0 theme = ExtResource( 1 ) text = ">>" [node name="ActionOption" type="OptionButton" parent="ActionHBox/ActionSquare3"] -margin_top = 26.0 +margin_top = 27.0 margin_right = 50.0 -margin_bottom = 48.0 +margin_bottom = 50.0 rect_min_size = Vector2( 50, 0 ) theme = ExtResource( 1 ) items = [ "", null, false, 0, null, "←", null, false, 2, null, "→", null, false, 3, null, "↑", null, false, 4, null, "↓", null, false, 5, null ] selected = 0 [node name="MoveLastButton" type="Button" parent="ActionHBox/ActionSquare3"] -margin_top = 52.0 +margin_top = 54.0 margin_right = 50.0 -margin_bottom = 74.0 +margin_bottom = 77.0 theme = ExtResource( 1 ) [node name="Spacer3" type="Control" parent="ActionHBox"] margin_left = 209.0 margin_right = 228.0 -margin_bottom = 74.0 +margin_bottom = 77.0 size_flags_horizontal = 3 [node name="ActionSquare4" type="VBoxContainer" parent="ActionHBox"] margin_left = 232.0 margin_right = 282.0 -margin_bottom = 74.0 +margin_bottom = 77.0 script = SubResource( 3 ) [node name="MoveFirstButton" type="Button" parent="ActionHBox/ActionSquare4"] margin_right = 50.0 -margin_bottom = 22.0 +margin_bottom = 23.0 theme = ExtResource( 1 ) text = ">>" [node name="ActionOption" type="OptionButton" parent="ActionHBox/ActionSquare4"] -margin_top = 26.0 +margin_top = 27.0 margin_right = 50.0 -margin_bottom = 48.0 +margin_bottom = 50.0 rect_min_size = Vector2( 50, 0 ) theme = ExtResource( 1 ) items = [ "", null, false, 0, null, "←", null, false, 2, null, "→", null, false, 3, null, "↑", null, false, 4, null, "↓", null, false, 5, null ] selected = 0 [node name="MoveLastButton" type="Button" parent="ActionHBox/ActionSquare4"] -margin_top = 52.0 +margin_top = 54.0 margin_right = 50.0 -margin_bottom = 74.0 +margin_bottom = 77.0 theme = ExtResource( 1 ) [node name="Spacer4" type="Control" parent="ActionHBox"] margin_left = 286.0 margin_right = 306.0 -margin_bottom = 74.0 +margin_bottom = 77.0 size_flags_horizontal = 3 [node name="ActionSquare5" type="VBoxContainer" parent="ActionHBox"] margin_left = 310.0 margin_right = 360.0 -margin_bottom = 74.0 +margin_bottom = 77.0 script = SubResource( 3 ) [node name="MoveFirstButton" type="Button" parent="ActionHBox/ActionSquare5"] margin_right = 50.0 -margin_bottom = 22.0 +margin_bottom = 23.0 theme = ExtResource( 1 ) text = ">>" [node name="ActionOption" type="OptionButton" parent="ActionHBox/ActionSquare5"] -margin_top = 26.0 +margin_top = 27.0 margin_right = 50.0 -margin_bottom = 48.0 +margin_bottom = 50.0 rect_min_size = Vector2( 50, 0 ) theme = ExtResource( 1 ) items = [ "", null, false, 0, null, "←", null, false, 2, null, "→", null, false, 3, null, "↑", null, false, 4, null, "↓", null, false, 5, null ] selected = 0 [node name="MoveLastButton" type="Button" parent="ActionHBox/ActionSquare5"] -margin_top = 52.0 +margin_top = 54.0 margin_right = 50.0 -margin_bottom = 74.0 +margin_bottom = 77.0 theme = ExtResource( 1 ) [connection signal="pressed" from="ActionHBox/ActionSquare1/MoveFirstButton" to="ActionHBox/ActionSquare1" method="set_move_first" binds= [ true ]] diff --git a/objects/PlayerListEntry.tscn b/objects/PlayerListEntry.tscn new file mode 100644 index 0000000..2a280b1 --- /dev/null +++ b/objects/PlayerListEntry.tscn @@ -0,0 +1,42 @@ +[gd_scene load_steps=6 format=2] + +[ext_resource path="res://resources/fonts/Cochineal-Roman.otf" type="DynamicFontData" id=1] +[ext_resource path="res://resources/fonts/Cochineal-Bold.otf" type="DynamicFontData" id=2] + +[sub_resource type="DynamicFont" id=1] +size = 26 +font_data = ExtResource( 2 ) + +[sub_resource type="DynamicFont" id=2] +size = 26 +font_data = ExtResource( 1 ) + +[sub_resource type="DynamicFont" id=3] +size = 22 +font_data = ExtResource( 1 ) + +[node name="PlayerListEntry" type="HBoxContainer"] + +[node name="ColorRect" type="ColorRect" parent="."] +margin_right = 32.0 +margin_bottom = 32.0 +rect_min_size = Vector2( 32, 32 ) + +[node name="RichTextLabel" type="RichTextLabel" parent="."] +margin_left = 36.0 +margin_right = 236.0 +margin_bottom = 32.0 +rect_min_size = Vector2( 200, 30 ) +custom_fonts/bold_font = SubResource( 1 ) +custom_fonts/normal_font = SubResource( 2 ) +bbcode_enabled = true +bbcode_text = "Waiting..." +text = "Waiting..." + +[node name="KickButton" type="Button" parent="."] +margin_left = 240.0 +margin_right = 292.0 +margin_bottom = 32.0 +custom_fonts/font = SubResource( 3 ) +disabled = true +text = "Kick" -- cgit v1.2.3