Adding basic car

This commit is contained in:
2026-01-21 17:59:14 -06:00
parent 900951b1a7
commit 582b2c43cb
14 changed files with 452 additions and 279 deletions
+17 -13
View File
@@ -1,11 +1,12 @@
[gd_scene load_steps=17 format=3 uid="uid://dchj6g2i8ebph"]
[gd_scene load_steps=18 format=3 uid="uid://dchj6g2i8ebph"]
[ext_resource type="Script" uid="uid://brgmxhhhtakja" path="res://scenes/Levels/level.gd" id="1_a4mo8"]
[ext_resource type="PackedScene" uid="uid://bb6hj6l23043x" path="res://assets/models/human.blend" id="1_eg4yq"]
[ext_resource type="Script" uid="uid://bpxggc8nr6tf6" path="res://scenes/player.gd" id="1_muv8p"]
[ext_resource type="PackedScene" uid="uid://c5of6aaxop1hl" path="res://scenes/block.tscn" id="2_tc7dm"]
[ext_resource type="Script" uid="uid://b7fopt7sx74g8" path="res://scenes/Levels/menu.gd" id="3_tc7dm"]
[ext_resource type="PackedScene" path="res://scenes/Characters/repo_bot.tscn" id="4_repo"]
[ext_resource type="PackedScene" uid="uid://c5of6aaxop1hl" path="res://scenes/block.tscn" id="2_tc7dm"]
[ext_resource type="Script" uid="uid://b7fopt7sx74g8" path="res://scenes/Levels/menu.gd" id="3_tc7dm"]
[ext_resource type="PackedScene" path="res://scenes/Characters/repo_bot.tscn" id="4_repo"]
[ext_resource type="PackedScene" path="res://scenes/Vehicles/car.tscn" id="5_car"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_2q6dc"]
bounce = 0.5
@@ -58,11 +59,11 @@ debug_color = Color(0.29772994, 0.6216631, 0.28140613, 0.41960785)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
mesh = SubResource("SphereMesh_w7c3h")
[node name="Player" type="RigidBody3D" parent="."]
physics_material_override = SubResource("PhysicsMaterial_w8frs")
script = ExtResource("1_muv8p")
camera_path = NodePath("Camera3D")
phone_path = NodePath("../PhoneUI")
[node name="Player" type="RigidBody3D" parent="."]
physics_material_override = SubResource("PhysicsMaterial_w8frs")
script = ExtResource("1_muv8p")
camera_path = NodePath("Camera3D")
phone_path = NodePath("../PhoneUI")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Player"]
shape = SubResource("SphereShape3D_mx8sn")
@@ -71,10 +72,13 @@ shape = SubResource("SphereShape3D_mx8sn")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.31670225, 0)
current = true
[node name="SpotLight3D" type="SpotLight3D" parent="Player"]
[node name="Ground" type="StaticBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
[node name="SpotLight3D" type="SpotLight3D" parent="Player"]
[node name="Car" parent="." instance=ExtResource("5_car")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6, 0, -3)
[node name="Ground" type="StaticBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
[node name="CollisionShape3D" type="CollisionShape3D" parent="Ground"]
shape = SubResource("BoxShape3D_2q6dc")
+12 -9
View File
@@ -14,13 +14,15 @@ func _input(event):
else:
pause_game()
func pause_game():
get_tree().paused = true
visible = true
func pause_game():
get_tree().paused = true
visible = true
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
func resume_game():
get_tree().paused = false
visible = false
func resume_game():
get_tree().paused = false
visible = false
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
func _on_quit_button_pressed():
get_tree().quit()
@@ -28,9 +30,10 @@ func _on_quit_button_pressed():
func _on_continue_button_pressed():
resume_game()
func _on_main_menu_button_pressed():
resume_game()
get_tree().change_scene_to_file(START_SCREEN_SCENE)
func _on_main_menu_button_pressed():
resume_game()
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
get_tree().change_scene_to_file(START_SCREEN_SCENE)
func _register_focus_sounds() -> void:
if pause_menu == null: