diff --git a/Nodes/UI.tscn b/Nodes/UI.tscn new file mode 100644 index 0000000..2ea70b2 --- /dev/null +++ b/Nodes/UI.tscn @@ -0,0 +1,19 @@ +[gd_scene format=3 uid="uid://cys06pnxfjl2m"] + +[node name="Control" type="Control"] +layout_mode = 3 +anchors_preset = 13 +anchor_left = 0.5 +anchor_right = 0.5 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="Panel" type="Panel" parent="."] +custom_minimum_size = Vector2(15, 0) +anchors_preset = 13 +anchor_left = 0.5 +anchor_right = 0.5 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 diff --git a/Nodes/game.tscn b/Nodes/game.tscn index 20c50df..238745d 100644 --- a/Nodes/game.tscn +++ b/Nodes/game.tscn @@ -1,19 +1,9 @@ -[gd_scene load_steps=9 format=3 uid="uid://cp2itfdd21cg2"] +[gd_scene load_steps=5 format=3 uid="uid://cp2itfdd21cg2"] [ext_resource type="Script" path="res://scripts/Logic/Game.gd" id="1_iox18"] [ext_resource type="PackedScene" uid="uid://bqe8ucbruto1j" path="res://Nodes/StartNode.tscn" id="2_61aog"] -[ext_resource type="PackedScene" uid="uid://byo1m0n20yl45" path="res://Nodes/cannon.tscn" id="2_vrf6k"] -[ext_resource type="Script" path="res://scripts/Train.gd" id="2_xl0he"] -[ext_resource type="PackedScene" uid="uid://vwjd5od63jgh" path="res://Nodes/Player.tscn" id="4_1ipcp"] - -[sub_resource type="BoxMesh" id="BoxMesh_ognqx"] -size = Vector3(13, 1, 25) - -[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_p3d4e"] -data = PackedVector3Array(-6.5, 0.5, 12.5, 6.5, 0.5, 12.5, -6.5, -0.5, 12.5, 6.5, 0.5, 12.5, 6.5, -0.5, 12.5, -6.5, -0.5, 12.5, 6.5, 0.5, -12.5, -6.5, 0.5, -12.5, 6.5, -0.5, -12.5, -6.5, 0.5, -12.5, -6.5, -0.5, -12.5, 6.5, -0.5, -12.5, 6.5, 0.5, 12.5, 6.5, 0.5, -12.5, 6.5, -0.5, 12.5, 6.5, 0.5, -12.5, 6.5, -0.5, -12.5, 6.5, -0.5, 12.5, -6.5, 0.5, -12.5, -6.5, 0.5, 12.5, -6.5, -0.5, -12.5, -6.5, 0.5, 12.5, -6.5, -0.5, 12.5, -6.5, -0.5, -12.5, 6.5, 0.5, 12.5, -6.5, 0.5, 12.5, 6.5, 0.5, -12.5, -6.5, 0.5, 12.5, -6.5, 0.5, -12.5, 6.5, 0.5, -12.5, -6.5, -0.5, 12.5, 6.5, -0.5, 12.5, -6.5, -0.5, -12.5, 6.5, -0.5, 12.5, 6.5, -0.5, -12.5, -6.5, -0.5, -12.5) - -[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_l76gd"] -data = PackedVector3Array(-6.5, 0.5, 12.5, 6.5, 0.5, 12.5, -6.5, -0.5, 12.5, 6.5, 0.5, 12.5, 6.5, -0.5, 12.5, -6.5, -0.5, 12.5, 6.5, 0.5, -12.5, -6.5, 0.5, -12.5, 6.5, -0.5, -12.5, -6.5, 0.5, -12.5, -6.5, -0.5, -12.5, 6.5, -0.5, -12.5, 6.5, 0.5, 12.5, 6.5, 0.5, -12.5, 6.5, -0.5, 12.5, 6.5, 0.5, -12.5, 6.5, -0.5, -12.5, 6.5, -0.5, 12.5, -6.5, 0.5, -12.5, -6.5, 0.5, 12.5, -6.5, -0.5, -12.5, -6.5, 0.5, 12.5, -6.5, -0.5, 12.5, -6.5, -0.5, -12.5, 6.5, 0.5, 12.5, -6.5, 0.5, 12.5, 6.5, 0.5, -12.5, -6.5, 0.5, 12.5, -6.5, 0.5, -12.5, 6.5, 0.5, -12.5, -6.5, -0.5, 12.5, 6.5, -0.5, 12.5, -6.5, -0.5, -12.5, 6.5, -0.5, 12.5, 6.5, -0.5, -12.5, -6.5, -0.5, -12.5) +[ext_resource type="PackedScene" uid="uid://lvlbpfnwlngv" path="res://player.tscn" id="3_kknxo"] +[ext_resource type="PackedScene" uid="uid://cys06pnxfjl2m" path="res://Nodes/UI.tscn" id="4_kxuy0"] [node name="Game" type="Node"] script = ExtResource("1_iox18") @@ -24,59 +14,9 @@ script = ExtResource("1_iox18") transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 20, 0) current = true -[node name="Player1" type="Node3D" parent="."] -transform = Transform3D(1, 0, 3.55271e-15, 0, 1, 0, -3.55271e-15, 0, 1, -12, 0, 0) -script = ExtResource("2_xl0he") - -[node name="Cannon" parent="Player1" instance=ExtResource("2_vrf6k")] - -[node name="MeshInstance3D2" type="MeshInstance3D" parent="Player1"] -mesh = SubResource("BoxMesh_ognqx") - -[node name="StaticBody3D" type="StaticBody3D" parent="Player1/MeshInstance3D2"] - -[node name="CollisionShape3D" type="CollisionShape3D" parent="Player1/MeshInstance3D2/StaticBody3D"] -shape = SubResource("ConcavePolygonShape3D_p3d4e") - -[node name="CharacterBody3D" parent="Player1" instance=ExtResource("4_1ipcp")] -transform = Transform3D(1, 0, -3.55271e-15, 0, 1, 0, 3.55271e-15, 0, 1, 0, 0, 0) - -[node name="Cannon2" parent="Player1" instance=ExtResource("2_vrf6k")] - -[node name="Player2" type="Node3D" parent="."] -transform = Transform3D(0.999998, 0, 0, 0, 1, 0, 0, 0, 0.999998, 12, 0, 0) -script = ExtResource("2_xl0he") - -[node name="MeshInstance3D" type="MeshInstance3D" parent="Player2"] -mesh = SubResource("BoxMesh_ognqx") - -[node name="StaticBody3D" type="StaticBody3D" parent="Player2/MeshInstance3D"] - -[node name="CollisionShape3D" type="CollisionShape3D" parent="Player2/MeshInstance3D/StaticBody3D"] -transform = Transform3D(1, 8.23952e-25, 0, -1.6479e-25, 1, 0, 0, -1.65436e-24, 1, 0, 0, 0) -shape = SubResource("ConcavePolygonShape3D_l76gd") - -[node name="CharacterBody3D" parent="Player2" instance=ExtResource("4_1ipcp")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0) +[node name="Player1" parent="." instance=ExtResource("3_kknxo")] [node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] transform = Transform3D(1, 0, 0, 0, 0.258819, 0.965926, 0, -0.965926, 0.258819, 0, 0, 0) -[node name="Control" type="Control" parent="."] -layout_mode = 3 -anchors_preset = 13 -anchor_left = 0.5 -anchor_right = 0.5 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 - -[node name="Panel" type="Panel" parent="Control"] -custom_minimum_size = Vector2(15, 0) -layout_mode = 1 -anchors_preset = 13 -anchor_left = 0.5 -anchor_right = 0.5 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 +[node name="Control" parent="." instance=ExtResource("4_kxuy0")] diff --git a/player.tscn b/player.tscn new file mode 100644 index 0000000..ed2c998 --- /dev/null +++ b/player.tscn @@ -0,0 +1,30 @@ +[gd_scene load_steps=6 format=3 uid="uid://lvlbpfnwlngv"] + +[ext_resource type="Script" path="res://scripts/Train.gd" id="1_0x664"] +[ext_resource type="PackedScene" uid="uid://byo1m0n20yl45" path="res://Nodes/cannon.tscn" id="2_71mfj"] +[ext_resource type="PackedScene" uid="uid://vwjd5od63jgh" path="res://Nodes/Player.tscn" id="3_in6up"] + +[sub_resource type="BoxMesh" id="BoxMesh_ognqx"] +size = Vector3(13, 1, 25) + +[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_p3d4e"] +data = PackedVector3Array(-6.5, 0.5, 12.5, 6.5, 0.5, 12.5, -6.5, -0.5, 12.5, 6.5, 0.5, 12.5, 6.5, -0.5, 12.5, -6.5, -0.5, 12.5, 6.5, 0.5, -12.5, -6.5, 0.5, -12.5, 6.5, -0.5, -12.5, -6.5, 0.5, -12.5, -6.5, -0.5, -12.5, 6.5, -0.5, -12.5, 6.5, 0.5, 12.5, 6.5, 0.5, -12.5, 6.5, -0.5, 12.5, 6.5, 0.5, -12.5, 6.5, -0.5, -12.5, 6.5, -0.5, 12.5, -6.5, 0.5, -12.5, -6.5, 0.5, 12.5, -6.5, -0.5, -12.5, -6.5, 0.5, 12.5, -6.5, -0.5, 12.5, -6.5, -0.5, -12.5, 6.5, 0.5, 12.5, -6.5, 0.5, 12.5, 6.5, 0.5, -12.5, -6.5, 0.5, 12.5, -6.5, 0.5, -12.5, 6.5, 0.5, -12.5, -6.5, -0.5, 12.5, 6.5, -0.5, 12.5, -6.5, -0.5, -12.5, 6.5, -0.5, 12.5, 6.5, -0.5, -12.5, -6.5, -0.5, -12.5) + +[node name="Player1" type="Node3D"] +transform = Transform3D(1, 0, 3.55271e-15, 0, 1, 0, -3.55271e-15, 0, 1, -12, 0, 0) +script = ExtResource("1_0x664") + +[node name="Cannon" parent="." instance=ExtResource("2_71mfj")] + +[node name="MeshInstance3D2" type="MeshInstance3D" parent="."] +mesh = SubResource("BoxMesh_ognqx") + +[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D2"] + +[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D2/StaticBody3D"] +shape = SubResource("ConcavePolygonShape3D_p3d4e") + +[node name="CharacterBody3D" parent="." instance=ExtResource("3_in6up")] +transform = Transform3D(1, 0, -3.55271e-15, 0, 1, 0, 3.55271e-15, 0, 1, 0, 0, 0) + +[node name="Cannon2" parent="." instance=ExtResource("2_71mfj")]