This commit is contained in:
PajamaBee 2025-07-21 23:23:12 -05:00
parent f4ffbf642b
commit f5f80fd180
15 changed files with 73 additions and 10 deletions

View file

@ -1,10 +1,11 @@
[gd_scene load_steps=10 format=3 uid="uid://bt5a8babn8gyn"]
[gd_scene load_steps=11 format=3 uid="uid://bt5a8babn8gyn"]
[ext_resource type="PackedScene" uid="uid://bubyfj3d0t4wr" path="res://Player/Player.tscn" id="1_03owx"]
[ext_resource type="Script" uid="uid://caucan7ubuwya" path="res://MainCamera.gd" id="2_wkp8b"]
[ext_resource type="PackedScene" uid="uid://tv34yqlttubv" path="res://objects/rotatableLarge.tscn" id="5_fos0i"]
[ext_resource type="PackedScene" uid="uid://deqhu8psa7fyn" path="res://locations/HauntedMansion.tscn" id="6_3dxm6"]
[ext_resource type="PackedScene" uid="uid://bqyeo1mq0f35e" path="res://locations/stage.glb" id="7_lgr22"]
[ext_resource type="PackedScene" uid="uid://g5m48diqvglc" path="res://Surfaces/Floor.tscn" id="6_lgr22"]
[ext_resource type="PackedScene" uid="uid://ch6blfiqhtt67" path="res://objects/Animals/raccoon.tscn" id="7_lgr22"]
[ext_resource type="PackedScene" uid="uid://c2qnrd7mneksy" path="res://UI/MainUI.tscn" id="8_trn2v"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_glv2v"]
@ -21,7 +22,7 @@ radius = 200.0
[node name="Main" type="Node3D"]
[node name="Player" parent="." instance=ExtResource("1_03owx")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -41.7655, -0.933056, 6.49124)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -42.1941, -0.933056, -2.90973)
[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(-4.37114e-08, -0.972775, 0.231748, 0, 0.231748, 0.972776, -1, 4.25214e-08, -1.013e-08, -0.213372, 102.096, 0)
@ -30,6 +31,7 @@ script = ExtResource("2_wkp8b")
[node name="RayCast3D" type="RayCast3D" parent="Camera3D"]
[node name="StaticBody3D" type="StaticBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -167.225, 0)
[node name="MeshInstance3D" type="MeshInstance3D" parent="StaticBody3D"]
mesh = SubResource("PlaneMesh_uu6xs")
@ -41,9 +43,6 @@ shape = SubResource("CylinderShape3D_glv2v")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(0.177645, -0.645417, 0.742886, -0.293885, 0.685651, 0.665968, -0.939188, -0.336629, -0.067876, 15.6558, 10.5503, -0.157694)
[node name="stage" parent="." instance=ExtResource("7_lgr22")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0488815, -0.757728, -1.82727)
[node name="MainUi" parent="." instance=ExtResource("8_trn2v")]
[node name="Rotatable" parent="." instance=ExtResource("5_fos0i")]
@ -64,5 +63,17 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 44.3335, 0.00558501, 43.1111)
[node name="Rotatable9" parent="." instance=ExtResource("5_fos0i")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 44.3335, 0.00558501, -46.7001)
[node name="Rotatable11" parent="." instance=ExtResource("5_fos0i")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8.69489, 0.00558501, -46.7001)
[node name="Rotatable12" parent="." instance=ExtResource("5_fos0i")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -18.0831, 0.00558501, 47.6165)
[node name="HauntedMansion" parent="." instance=ExtResource("6_3dxm6")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -149.584, -0.168726, -1.23758)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -149.584, -0.689379, -1.69503)
[node name="Floor" parent="." instance=ExtResource("6_lgr22")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0488815, -0.757728, -1.82727)
[node name="Raccoon" parent="." instance=ExtResource("7_lgr22")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -55.0482, 0.242264, 11.5166)

View file

@ -10,6 +10,9 @@ func _ready() -> void:
playerObject = $Horse
func _process(delta: float) -> void:
if playerObject.global_position.y <= -100:
playerObject.global_position = Vector3(0, 5, 0)
var rotationDif = playerObject.angular_velocity
monies += (rotationDif.length() * delta)/6.2

View file

@ -6,6 +6,9 @@ var rotationTimer = 0
func _ready() -> void:
set_rotation_amount()
func set_info(info:String):
$Info.text = info
func set_location_offset(offset):
%ViewObject.global_position = offset

View file

@ -18,9 +18,25 @@ unique_name_in_owner = true
[node name="TextureRect" type="TextureRect" parent="."]
layout_mode = 0
offset_right = 200.0
offset_right = 246.0
offset_bottom = 200.0
expand_mode = 1
[node name="Info" type="Label" parent="."]
layout_mode = 0
offset_left = 2.0
offset_top = 201.0
offset_right = 248.0
offset_bottom = 240.0
theme_override_colors/font_color = Color(1, 0, 0, 1)
theme_override_colors/font_shadow_color = Color(0, 0.882353, 0, 1)
theme_override_colors/font_outline_color = Color(0, 0, 1, 1)
theme_override_constants/outline_size = 8
theme_override_constants/shadow_outline_size = 14
theme_override_font_sizes/font_size = 28
text = "Horse - 5 dollars"
horizontal_alignment = 1
vertical_alignment = 1
[editable path="SubViewport/ViewObject"]
[editable path="SubViewport/ViewObject/horse"]

View file

@ -6,11 +6,13 @@ var shapes = [
{
"object": preload("res://models/horse.glb"),
"name": "horse",
"cost": 0,
"scene": preload("res://objects/horse.tscn")
},
{
"object": preload("res://models/shark.glb"),
"name": "shark",
"cost": 5,
"scene": preload("res://objects/shark.tscn")
},
]
@ -24,8 +26,10 @@ func close():
visible = false
func button_clicked(index):
GlobalVariables.player.change_object(shapes[index].scene.instantiate())
close()
if GlobalVariables.money >= shapes[index].cost:
GlobalVariables.money -= shapes[index].cost
GlobalVariables.player.change_object(shapes[index].scene.instantiate())
close()
func setup_buttons():
var index = 0
@ -37,5 +41,6 @@ func setup_buttons():
offset += Vector3(0, 10000, 10000)
newButton.change_object(buttonObject)
newButton.set_info(shape.name + " - " + str(shape.cost) + " dollars")
newButton.pressed.connect(button_clicked.bind(index))
index += 1

BIN
models/bear.glb Normal file

Binary file not shown.

BIN
models/catglb.glb Normal file

Binary file not shown.

BIN
models/dog.glb Normal file

Binary file not shown.

BIN
models/elephant.glb Normal file

Binary file not shown.

BIN
models/giraffe.glb Normal file

Binary file not shown.

BIN
models/pig.glb Normal file

Binary file not shown.

BIN
models/platypus.glb Normal file

Binary file not shown.

BIN
models/raccoon.glb Normal file

Binary file not shown.

BIN
models/turtle.glb Normal file

Binary file not shown.

View file

@ -0,0 +1,25 @@
[gd_scene load_steps=4 format=3 uid="uid://ch6blfiqhtt67"]
[ext_resource type="PackedScene" uid="uid://du8lkrvnc16gl" path="res://objects/Rotatable.tscn" id="1_gc7wg"]
[ext_resource type="PackedScene" uid="uid://dxuanctss76sr" path="res://models/raccoon.glb" id="2_8psji"]
[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_ko0kv"]
points = PackedVector3Array(-0.459304, 1.89517, 0.993917, 0.0405142, 1.88634, 0.993917, 0.0387483, 1.78145, -1.06475, -0.46107, 1.78973, -1.06475, -1.17459, 0.910333, -1.06475, -1.17459, 0.910333, 0.993917, -2.30787, -3.44803, 1.42434, 0.523849, 0.881627, 0.993917, 3.6929, -2.21753, 0.249951, 3.6929, -2.21753, -0.250211, -1.7845, -3.32051, 1.3811, 0.523849, 0.881627, -1.06475, -2.20661, -3.44361, -1.42544, -2.25547, -1.5468, -1.02542, -1.73387, -0.106526, -0.500153, -1.73387, -0.106526, 0.499892, -2.05354, -1.44522, 0.952911, -2.22427, -1.76154, 0.685117, -2.23546, -1.88796, 0.685117, -2.29492, -1.90452, -0.671151, -2.32141, -3.73399, 1.42434, -1.79333, -3.7257, 1.3811, 0.489115, -1.17031, 0.999775, 2.22464, -3.22832, 0.249951, 0.480873, -1.67046, 0.999775, 0.4638, -2.6702, 0.999775, 0.454969, -3.1698, 0.999775, 0.201822, -3.69866, 0.999775, 0.497945, -0.657463, -1.06475, 2.22464, -3.22832, -0.250211, 0.201822, -3.69866, -1.00004, 0.454969, -3.1698, -1.00004, -1.78509, -3.25095, -1.3836, -1.79274, -3.70086, -1.3836, -2.21426, -3.69755, -1.42544, -2.25547, -1.5468, -0.883154, -2.32141, -3.73399, 1.0737, -0.810178, -3.74447, 0.499892, 0.457324, -3.70307, 0.796976, 0.457324, -3.70307, -0.797237, -0.810178, -3.74447, -0.500153)
[node name="Raccoon" instance=ExtResource("1_gc7wg")]
yTorqueMult = 800.0
zTorqueMult = 800.0
[node name="CollisionShape3D" parent="." index="0"]
disabled = true
[node name="MeshInstance3D" parent="." index="1"]
visible = false
[node name="CollisionShape3D2" type="CollisionShape3D" parent="." index="2"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.80874, 0)
shape = SubResource("ConvexPolygonShape3D_ko0kv")
[node name="raccoon" parent="." index="3" instance=ExtResource("2_8psji")]
[editable path="raccoon"]