feat: added ui and test pickups to test scene

This commit is contained in:
Sara 2024-05-17 16:09:06 +02:00
parent 6df18a8314
commit 4ec964e864
2 changed files with 36 additions and 159 deletions

19
godot/key_pickup.tscn Normal file
View file

@ -0,0 +1,19 @@
[gd_scene load_steps=3 format=3 uid="uid://ceolgn0y2m6e4"]
[sub_resource type="CylinderShape3D" id="CylinderShape3D_paw85"]
radius = 0.902055
[sub_resource type="CylinderMesh" id="CylinderMesh_242ni"]
height = 1.19
[node name="KeyPickup" type="KeyPickup"]
collision_layer = 0
collision_mask = 4
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
shape = SubResource("CylinderShape3D_paw85")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.20164, 0)
mesh = SubResource("CylinderMesh_242ni")

View file

@ -1,11 +1,8 @@
[gd_scene load_steps=11 format=3 uid="uid://e3dmisrrgqq7"]
[gd_scene load_steps=7 format=3 uid="uid://e3dmisrrgqq7"]
[ext_resource type="RallyRushGameMode" uid="uid://r8bx64rqumkl" path="res://rally_rush_game_mode.tres" id="1_p2wxn"]
[ext_resource type="Material" uid="uid://cfont63vhwa3y" path="res://grid_material.tres" id="2_dkg88"]
[sub_resource type="BoxShape3D" id="BoxShape3D_qta3q"]
[sub_resource type="BoxMesh" id="BoxMesh_wvvde"]
[ext_resource type="PackedScene" uid="uid://ceolgn0y2m6e4" path="res://key_pickup.tscn" id="3_j5pjd"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_whr25"]
rough = true
@ -16,155 +13,11 @@ size = Vector3(100, 1, 100)
[sub_resource type="PlaneMesh" id="PlaneMesh_g4f08"]
size = Vector2(100, 100)
[sub_resource type="GDScript" id="GDScript_pxbir"]
script/source = "extends RigidBody3D
func _ready():
self.custom_integrator = true
func _integrate_forces(body : PhysicsDirectBodyState3D):
body.linear_velocity = Vector3.DOWN
"
[sub_resource type="BoxShape3D" id="BoxShape3D_a14rv"]
[sub_resource type="BoxMesh" id="BoxMesh_c0m66"]
[node name="TestMap2" type="Level3D"]
game_mode_prototype = ExtResource("1_p2wxn")
[node name="Track" type="Node" parent="."]
[node name="StaticBody3D2" type="StaticBody3D" parent="Track"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.678, 0.475345, 13.3962)
[node name="CollisionShape3D" type="CollisionShape3D" parent="Track/StaticBody3D2"]
shape = SubResource("BoxShape3D_qta3q")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="Track/StaticBody3D2"]
mesh = SubResource("BoxMesh_wvvde")
skeleton = NodePath("../../..")
[node name="StaticBody3D3" type="StaticBody3D" parent="Track"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.967571, 0.475345, 17.7203)
[node name="CollisionShape3D" type="CollisionShape3D" parent="Track/StaticBody3D3"]
shape = SubResource("BoxShape3D_qta3q")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="Track/StaticBody3D3"]
mesh = SubResource("BoxMesh_wvvde")
skeleton = NodePath("../../..")
[node name="StaticBody3D4" type="StaticBody3D" parent="Track"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.20365, 0.475345, 21.4449)
[node name="CollisionShape3D" type="CollisionShape3D" parent="Track/StaticBody3D4"]
shape = SubResource("BoxShape3D_qta3q")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="Track/StaticBody3D4"]
mesh = SubResource("BoxMesh_wvvde")
skeleton = NodePath("../../..")
[node name="StaticBody3D5" type="StaticBody3D" parent="Track"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6.91436, 0.475345, 22.6742)
[node name="CollisionShape3D" type="CollisionShape3D" parent="Track/StaticBody3D5"]
shape = SubResource("BoxShape3D_qta3q")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="Track/StaticBody3D5"]
mesh = SubResource("BoxMesh_wvvde")
skeleton = NodePath("../../..")
[node name="StaticBody3D7" type="StaticBody3D" parent="Track"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8.14715, 0.475345, 12.8096)
[node name="CollisionShape3D" type="CollisionShape3D" parent="Track/StaticBody3D7"]
shape = SubResource("BoxShape3D_qta3q")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="Track/StaticBody3D7"]
mesh = SubResource("BoxMesh_wvvde")
skeleton = NodePath("../../..")
[node name="StaticBody3D8" type="StaticBody3D" parent="Track"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 15.4698, 0.475345, 14.2818)
[node name="CollisionShape3D" type="CollisionShape3D" parent="Track/StaticBody3D8"]
shape = SubResource("BoxShape3D_qta3q")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="Track/StaticBody3D8"]
mesh = SubResource("BoxMesh_wvvde")
skeleton = NodePath("../../..")
[node name="StaticBody3D9" type="StaticBody3D" parent="Track"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14.6013, 0.475345, 22.9278)
[node name="CollisionShape3D" type="CollisionShape3D" parent="Track/StaticBody3D9"]
shape = SubResource("BoxShape3D_qta3q")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="Track/StaticBody3D9"]
mesh = SubResource("BoxMesh_wvvde")
skeleton = NodePath("../../..")
[node name="StaticBody3D10" type="StaticBody3D" parent="Track"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 27.4715, 0.475345, 23.0462)
[node name="CollisionShape3D" type="CollisionShape3D" parent="Track/StaticBody3D10"]
shape = SubResource("BoxShape3D_qta3q")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="Track/StaticBody3D10"]
mesh = SubResource("BoxMesh_wvvde")
skeleton = NodePath("../../..")
[node name="StaticBody3D11" type="StaticBody3D" parent="Track"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 27.6294, 0.475345, 13.7686)
[node name="CollisionShape3D" type="CollisionShape3D" parent="Track/StaticBody3D11"]
shape = SubResource("BoxShape3D_qta3q")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="Track/StaticBody3D11"]
mesh = SubResource("BoxMesh_wvvde")
skeleton = NodePath("../../..")
[node name="StaticBody3D12" type="StaticBody3D" parent="Track"]
transform = Transform3D(0.929558, 0, 0.368676, 0, 1, 0, -0.368676, 0, 0.929558, 34.216, 0.475345, 21.2144)
[node name="CollisionShape3D" type="CollisionShape3D" parent="Track/StaticBody3D12"]
shape = SubResource("BoxShape3D_qta3q")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="Track/StaticBody3D12"]
mesh = SubResource("BoxMesh_wvvde")
skeleton = NodePath("../../..")
[node name="StaticBody3D13" type="StaticBody3D" parent="Track"]
transform = Transform3D(0.929558, 0, 0.368676, 0, 1, 0, -0.368676, 0, 0.929558, 30.9424, 0.475345, 12.5321)
[node name="CollisionShape3D" type="CollisionShape3D" parent="Track/StaticBody3D13"]
shape = SubResource("BoxShape3D_qta3q")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="Track/StaticBody3D13"]
mesh = SubResource("BoxMesh_wvvde")
skeleton = NodePath("../../..")
[node name="StaticBody3D14" type="StaticBody3D" parent="Track"]
transform = Transform3D(0.929558, 0, 0.368676, 0, 1, 0, -0.368676, 0, 0.929558, 40.0623, 0.475345, 17.4756)
[node name="CollisionShape3D" type="CollisionShape3D" parent="Track/StaticBody3D14"]
shape = SubResource("BoxShape3D_qta3q")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="Track/StaticBody3D14"]
mesh = SubResource("BoxMesh_wvvde")
skeleton = NodePath("../../..")
[node name="StaticBody3D15" type="StaticBody3D" parent="Track"]
transform = Transform3D(0.929558, 0, 0.368676, 0, 1, 0, -0.368676, 0, 0.929558, 43.1307, 0.475345, 10.7422)
[node name="CollisionShape3D" type="CollisionShape3D" parent="Track/StaticBody3D15"]
shape = SubResource("BoxShape3D_qta3q")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="Track/StaticBody3D15"]
mesh = SubResource("BoxMesh_wvvde")
skeleton = NodePath("../../..")
[node name="StaticBody3D" type="StaticBody3D" parent="Track"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.5, 0)
physics_material_override = SubResource("PhysicsMaterial_whr25")
@ -295,16 +148,6 @@ material_override = ExtResource("2_dkg88")
mesh = SubResource("PlaneMesh_g4f08")
skeleton = NodePath("../..")
[node name="RigidBody3D" type="RigidBody3D" parent="."]
transform = Transform3D(-0.992555, 0, 0.1218, 0, 1, 0, -0.1218, 0, -0.992555, -0.829948, 2.22513, 17.1488)
script = SubResource("GDScript_pxbir")
[node name="CollisionShape3D" type="CollisionShape3D" parent="RigidBody3D"]
shape = SubResource("BoxShape3D_a14rv")
[node name="MeshInstance3D" type="MeshInstance3D" parent="RigidBody3D"]
mesh = SubResource("BoxMesh_c0m66")
[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(-1, 8.41198e-08, -2.38035e-08, 0, 0.27228, 0.962218, 8.74228e-08, 0.962218, -0.27228, -0.0725344, 23.9486, -1.67003)
@ -313,3 +156,18 @@ transform = Transform3D(1, 0, 0, 0, 0.160191, 0.987086, 0, -0.987086, 0.160191,
[node name="SpawnPoint3D" type="SpawnPoint3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.28211, 0)
[node name="CanvasLayer" type="GameUI" parent="."]
[node name="DebugInfo" type="Label" parent="CanvasLayer"]
offset_right = 293.0
offset_bottom = 276.0
[node name="KeyPickup" parent="." instance=ExtResource("3_j5pjd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 28.4747, -3.8147e-06, 9.72178)
[node name="KeyPickup2" parent="." instance=ExtResource("3_j5pjd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 190.995, 0, 90.7647)
[node name="KeyPickup3" parent="." instance=ExtResource("3_j5pjd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 270.692, 1.52588e-05, -5.4676)