Bläddra i källkod

Merge branch 'new/chocolate'

DricomDragon 1 vecka sedan
förälder
incheckning
5f11856b1f

BIN
godot/addons/input_prompts/icons/mouse/wheel_left.png


+ 34 - 0
godot/addons/input_prompts/icons/mouse/wheel_left.png.import

@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://1gb8h0fmwu6h"
+path="res://.godot/imported/wheel_left.png-c891077ea90bbe167a1b755bd57e5309.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://addons/input_prompts/icons/mouse/wheel_left.png"
+dest_files=["res://.godot/imported/wheel_left.png-c891077ea90bbe167a1b755bd57e5309.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1

+ 5 - 1
godot/component/entity/buildings/character_sign_choco/character_sign_choco.tscn

@@ -1,6 +1,7 @@
-[gd_scene load_steps=6 format=3 uid="uid://cxdvll60r67q8"]
+[gd_scene load_steps=7 format=3 uid="uid://cxdvll60r67q8"]
 
 [ext_resource type="PackedScene" uid="uid://kk3y127ia4bk" path="res://component/entity/buildings/character_sign_choco/CartoonCharacterSignChocoLate.glb" id="1_ufwpa"]
+[ext_resource type="PackedScene" uid="uid://ba3gf7iy3mxbq" path="res://component/entity/collectibles/chocolate/chocolate.tscn" id="2_4t274"]
 
 [sub_resource type="CylinderShape3D" id="CylinderShape3D_cylle"]
 height = 4.0
@@ -40,3 +41,6 @@ shape = SubResource("BoxShape3D_ve6a0")
 [node name="Eye2" type="CollisionShape3D" parent="."]
 transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.4, 7.2, 0)
 shape = SubResource("BoxShape3D_ve6a0")
+
+[node name="ChocolateTablet" parent="." instance=ExtResource("2_4t274")]
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7.04626, 0)

+ 8 - 1
godot/component/entity/buildings/outer_stairs_house/outer_stairs_house.tscn

@@ -1,8 +1,9 @@
-[gd_scene load_steps=7 format=3 uid="uid://bwhwbm6jrvg42"]
+[gd_scene load_steps=8 format=3 uid="uid://bwhwbm6jrvg42"]
 
 [ext_resource type="PackedScene" uid="uid://6lkpo3l84cek" path="res://component/entity/buildings/outer_stairs_house/OuterStairsHouse.glb" id="1_h07vm"]
 [ext_resource type="Shape3D" uid="uid://jmhl8rtvnfcp" path="res://component/entity/props/triangle/flat_triangle_shape.tres" id="2_lu5vm"]
 [ext_resource type="Shape3D" uid="uid://8k8xlrh2hxe2" path="res://component/entity/props/triangle/triangle_shape.tres" id="2_vflk4"]
+[ext_resource type="PackedScene" uid="uid://ba3gf7iy3mxbq" path="res://component/entity/collectibles/chocolate/chocolate.tscn" id="4_mb2tj"]
 
 [sub_resource type="BoxShape3D" id="BoxShape3D_hsohw"]
 size = Vector3(4, 4, 12)
@@ -37,3 +38,9 @@ shape = SubResource("BoxShape3D_6vb0o")
 
 [node name="HouseBody" type="CollisionShape3D" parent="."]
 shape = SubResource("ConvexPolygonShape3D_n8jci")
+
+[node name="ChocolateTabletTop" parent="." instance=ExtResource("4_mb2tj")]
+transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 4, 8.75, -4)
+
+[node name="ChocolateTabletMiddle" parent="." instance=ExtResource("4_mb2tj")]
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4, 5, 4)

+ 11 - 1
godot/component/entity/buildings/summit_gate/summit_gate.tscn

@@ -1,7 +1,8 @@
-[gd_scene load_steps=7 format=3 uid="uid://bohus0ptrc77h"]
+[gd_scene load_steps=8 format=3 uid="uid://bohus0ptrc77h"]
 
 [ext_resource type="PackedScene" uid="uid://lx6lfwb4t3c5" path="res://component/entity/buildings/summit_gate/SummitGate.glb" id="1_rxo84"]
 [ext_resource type="Shape3D" uid="uid://b7uukrfpdd5q4" path="res://component/entity/buildings/summit_gate/large_summit_triangle_shape.tres" id="2_7d1cc"]
+[ext_resource type="PackedScene" uid="uid://ba3gf7iy3mxbq" path="res://component/entity/collectibles/chocolate/chocolate.tscn" id="3_ekhgg"]
 
 [sub_resource type="BoxShape3D" id="BoxShape3D_4ofps"]
 size = Vector3(18, 10, 9)
@@ -67,3 +68,12 @@ shape = ExtResource("2_7d1cc")
 [node name="LargeTriangleTopRight" type="CollisionShape3D" parent="."]
 transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 9.25, 10, 0)
 shape = ExtResource("2_7d1cc")
+
+[node name="ChocolateTabletBottom" parent="." instance=ExtResource("3_ekhgg")]
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.666396, 0)
+
+[node name="ChocolateTabletMiddle" parent="." instance=ExtResource("3_ekhgg")]
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 13.2909, 0)
+
+[node name="ChocolateTabletTop" parent="." instance=ExtResource("3_ekhgg")]
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 20.6768, 0)

+ 31 - 0
godot/component/entity/collectibles/chocolate/chocolate.gd

@@ -0,0 +1,31 @@
+class_name Chocolate
+extends Node3D
+
+
+const COLLECT_ANIM := "collection"
+
+@onready var chocolateAnimation: AnimationPlayer = $ChocolateAnimation
+
+var _collected := false
+
+
+func _on_chocolate_tablet_body_entered(body: Node3D) -> void:
+	if _collected:
+		return
+
+	if body is Walker:
+		_give_chocolate_to(body)
+		_collected = true
+
+
+func _give_chocolate_to(walker: Walker) -> void:
+	walker.give_chocolate()
+	reparent(walker)
+	chocolateAnimation.play(COLLECT_ANIM)
+	chocolateAnimation.animation_finished.connect(_finish)
+
+
+func _finish(animation_name: String) -> void:
+	if COLLECT_ANIM == animation_name:
+		# Collection is finished
+		queue_free()

+ 113 - 0
godot/component/entity/collectibles/chocolate/chocolate.tscn

@@ -0,0 +1,113 @@
+[gd_scene load_steps=11 format=3 uid="uid://ba3gf7iy3mxbq"]
+
+[ext_resource type="Script" path="res://component/entity/collectibles/chocolate/chocolate.gd" id="1_wk24q"]
+
+[sub_resource type="Animation" id="Animation_0f754"]
+resource_name = "idle"
+length = 4.0
+loop_mode = 1
+step = 1.0
+tracks/0/type = "rotation_3d"
+tracks/0/imported = false
+tracks/0/enabled = true
+tracks/0/path = NodePath(".")
+tracks/0/interp = 1
+tracks/0/loop_wrap = true
+tracks/0/keys = PackedFloat32Array(0, 1, 0, 0, 0, 1, 2, 1, 0, 1, 0, 0, 4, 1, 0, 0, 0, -1)
+tracks/1/type = "position_3d"
+tracks/1/imported = false
+tracks/1/enabled = true
+tracks/1/path = NodePath(".")
+tracks/1/interp = 2
+tracks/1/loop_wrap = true
+tracks/1/keys = PackedFloat32Array(0, 1, 0, 0, 0, 2, 1, 0, 0.25, 0)
+
+[sub_resource type="Animation" id="Animation_cfly2"]
+length = 0.001
+tracks/0/type = "rotation_3d"
+tracks/0/imported = false
+tracks/0/enabled = true
+tracks/0/path = NodePath(".")
+tracks/0/interp = 1
+tracks/0/loop_wrap = true
+tracks/0/keys = PackedFloat32Array(0, 1, 0, 0, 0, 1)
+
+[sub_resource type="Animation" id="Animation_d6qxv"]
+resource_name = "collection"
+length = 2.0
+step = 0.25
+tracks/0/type = "rotation_3d"
+tracks/0/imported = false
+tracks/0/enabled = true
+tracks/0/path = NodePath(".")
+tracks/0/interp = 1
+tracks/0/loop_wrap = true
+tracks/0/keys = PackedFloat32Array(0, 1, 0, 0, 0, 1, 0.5, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, -1, 1.5, 1, 0, -1, 0, 0, 2, 1, 0, 0, 0, 1)
+tracks/1/type = "scale_3d"
+tracks/1/imported = false
+tracks/1/enabled = true
+tracks/1/path = NodePath(".")
+tracks/1/interp = 2
+tracks/1/loop_wrap = true
+tracks/1/keys = PackedFloat32Array(1, 1, 1, 1, 1, 2, 1, 0.003, 0.003, 0.003)
+tracks/2/type = "position_3d"
+tracks/2/imported = false
+tracks/2/enabled = true
+tracks/2/path = NodePath(".")
+tracks/2/interp = 2
+tracks/2/loop_wrap = true
+tracks/2/keys = PackedFloat32Array(0, 1, 0, 0, 0, 1, 1, 0, 1.5, 0, 2, 1, 0, 0, 0)
+
+[sub_resource type="AnimationLibrary" id="AnimationLibrary_djjxd"]
+_data = {
+"RESET": SubResource("Animation_cfly2"),
+"collection": SubResource("Animation_d6qxv"),
+"idle": SubResource("Animation_0f754")
+}
+
+[sub_resource type="BoxShape3D" id="BoxShape3D_cro6x"]
+size = Vector3(1, 1, 0.325)
+
+[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_px4jl"]
+albedo_color = Color(0.294006, 0.133118, 0.019403, 1)
+metallic_specular = 0.21
+
+[sub_resource type="BoxMesh" id="BoxMesh_c10ab"]
+material = SubResource("StandardMaterial3D_px4jl")
+size = Vector3(0.8, 1, 0.2)
+
+[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ds5yo"]
+albedo_color = Color(1, 0.816667, 0, 1)
+metallic_specular = 0.66
+
+[sub_resource type="BoxMesh" id="BoxMesh_ialpe"]
+material = SubResource("StandardMaterial3D_ds5yo")
+size = Vector3(0.85, 0.8, 0.25)
+
+[node name="Chocolate" type="Node3D"]
+script = ExtResource("1_wk24q")
+
+[node name="ChocolateAnimation" type="AnimationPlayer" parent="."]
+root_node = NodePath("../ChocolateTablet")
+libraries = {
+"": SubResource("AnimationLibrary_djjxd")
+}
+autoplay = "idle"
+
+[node name="ChocolateTablet" type="Area3D" parent="."]
+transform = Transform3D(0.00300002, 0, 0, 0, 0.00300002, 0, 0, 0, 0.00300002, 0, 0, 0)
+collision_layer = 32
+collision_mask = 10
+
+[node name="ChocolateCollisionShape3D" type="CollisionShape3D" parent="ChocolateTablet"]
+transform = Transform3D(1, 0, 1.74846e-07, 0, 1, 0, -1.74846e-07, 0, 1, 0, 0, 0)
+shape = SubResource("BoxShape3D_cro6x")
+
+[node name="ChocolateMesh" type="MeshInstance3D" parent="ChocolateTablet"]
+mesh = SubResource("BoxMesh_c10ab")
+
+[node name="PaperMesh" type="MeshInstance3D" parent="ChocolateTablet"]
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.119209, 0)
+mesh = SubResource("BoxMesh_ialpe")
+
+[connection signal="body_entered" from="ChocolateTablet" to="." method="_on_chocolate_tablet_body_entered"]

+ 5 - 1
godot/component/entity/primitives/long_bridge.tscn

@@ -1,6 +1,7 @@
-[gd_scene load_steps=6 format=3 uid="uid://da7q7i7pqa5pw"]
+[gd_scene load_steps=7 format=3 uid="uid://da7q7i7pqa5pw"]
 
 [ext_resource type="Texture2D" uid="uid://bonhqr3bduuq5" path="res://component/entity/buildings/summit_gate/SummitGate_Stone_bricks.png" id="1_036e1"]
+[ext_resource type="PackedScene" uid="uid://ba3gf7iy3mxbq" path="res://component/entity/collectibles/chocolate/chocolate.tscn" id="2_mq3ic"]
 
 [sub_resource type="PhysicsMaterial" id="PhysicsMaterial_ih8w4"]
 friction = 0.9
@@ -24,3 +25,6 @@ mesh = SubResource("BoxMesh_qy4tk")
 
 [node name="Shape" type="CollisionShape3D" parent="."]
 shape = SubResource("BoxShape3D_hpjbs")
+
+[node name="ChocolateTablet" parent="." instance=ExtResource("2_mq3ic")]
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.21929, 0)

+ 5 - 1
godot/component/entity/props/triangle/flat_triangle.tscn

@@ -1,7 +1,8 @@
-[gd_scene load_steps=3 format=3 uid="uid://dhmnou48k24lr"]
+[gd_scene load_steps=4 format=3 uid="uid://dhmnou48k24lr"]
 
 [ext_resource type="PackedScene" uid="uid://julmsb44217f" path="res://component/entity/props/triangle/SimpleTriangle.glb" id="1_j6dhx"]
 [ext_resource type="Shape3D" uid="uid://jmhl8rtvnfcp" path="res://component/entity/props/triangle/flat_triangle_shape.tres" id="2_ovovf"]
+[ext_resource type="PackedScene" uid="uid://ba3gf7iy3mxbq" path="res://component/entity/collectibles/chocolate/chocolate.tscn" id="3_6amar"]
 
 [node name="FlatTriangle" type="StaticBody3D"]
 
@@ -11,3 +12,6 @@ transform = Transform3D(4, 0, 0, 0, 2, 0, 0, 0, 4, 0, 0, 0)
 [node name="CollisionShape3D" type="CollisionShape3D" parent="."]
 transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0)
 shape = ExtResource("2_ovovf")
+
+[node name="ChocolateTablet" parent="." instance=ExtResource("3_6amar")]
+transform = Transform3D(0.91756, 0, 0.397596, 0, 1, 0, -0.397596, 0, 0.91756, 0, 7.20955, 8.52127)

+ 6 - 0
godot/component/entity/walker/walker.gd

@@ -6,6 +6,7 @@ signal focus_required(me: Node3D)
 signal got_in
 signal got_out
 signal can_get_in(possible: bool)
+signal chocolate_collected
 
 ## How fast the player moves in meters per second.
 @export var speed = 14
@@ -54,6 +55,11 @@ func can_get_in_vehicle() -> bool:
 	return !is_onboard() and _get_closest_vehicle() != null
 
 
+## Give this walker a chocolate bar
+func give_chocolate():
+	chocolate_collected.emit()
+
+
 func _physics_process(delta: float) -> void:
 	if is_onboard():
 		_get_on_driver_seat()

+ 15 - 0
godot/component/ui/hud/chocolate_gauge/chocolate_gauge.gd

@@ -0,0 +1,15 @@
+class_name ChocolateGauge
+extends PanelContainer
+
+var chocolate_count := 0
+
+@onready var chocolateCounter: Label = %ChocolateCounter
+
+
+func increment_chocolate(count: int) -> void:
+	chocolate_count += count
+	chocolateCounter.set_text(str(chocolate_count))
+
+
+func _on_main_walker_chocolate_collected() -> void:
+	increment_chocolate(1)

+ 27 - 0
godot/component/ui/hud/chocolate_gauge/chocolate_gauge.tscn

@@ -0,0 +1,27 @@
+[gd_scene load_steps=2 format=3 uid="uid://cqkond8xwtdv5"]
+
+[ext_resource type="Script" path="res://component/ui/hud/chocolate_gauge/chocolate_gauge.gd" id="1_bmn7t"]
+
+[node name="ChocolateGauge" type="PanelContainer"]
+anchors_preset = 3
+anchor_left = 1.0
+anchor_top = 1.0
+anchor_right = 1.0
+anchor_bottom = 1.0
+offset_left = -40.0
+offset_top = -40.0
+grow_horizontal = 0
+grow_vertical = 0
+script = ExtResource("1_bmn7t")
+
+[node name="HBoxContainer" type="HBoxContainer" parent="."]
+layout_mode = 2
+
+[node name="ChocolateLabel" type="Label" parent="HBoxContainer"]
+layout_mode = 2
+text = "Chocolate = "
+
+[node name="ChocolateCounter" type="Label" parent="HBoxContainer"]
+unique_name_in_owner = true
+layout_mode = 2
+text = "0"

+ 3 - 3
godot/component/ui/input_prompts/get_in/get_in_container.tscn

@@ -3,11 +3,11 @@
 [ext_resource type="Texture2D" uid="uid://clcwaemf3uawa" path="res://addons/input_prompts/icons/xbox/y.png" id="1_l00e1"]
 [ext_resource type="Script" path="res://addons/input_prompts/action_prompt/action_prompt.gd" id="2_gfb15"]
 
-[sub_resource type="InputEventKey" id="InputEventKey_72vhg"]
+[sub_resource type="InputEventKey" id="InputEventKey_o4h0q"]
 device = -1
 physical_keycode = 4194309
 
-[sub_resource type="InputEventJoypadButton" id="InputEventJoypadButton_n3xn3"]
+[sub_resource type="InputEventJoypadButton" id="InputEventJoypadButton_8de4e"]
 device = -1
 button_index = 3
 
@@ -26,4 +26,4 @@ stretch_mode = 5
 script = ExtResource("2_gfb15")
 action = "get_in"
 icon = 0
-events = Array[InputEvent]([SubResource("InputEventKey_72vhg"), SubResource("InputEventJoypadButton_n3xn3")])
+events = Array[InputEvent]([SubResource("InputEventKey_o4h0q"), SubResource("InputEventJoypadButton_8de4e")])

+ 3 - 3
godot/component/ui/input_prompts/jump/jump_container.tscn

@@ -4,12 +4,12 @@
 [ext_resource type="Texture2D" uid="uid://b1e23gj3k1klg" path="res://addons/input_prompts/icons/xbox/a.png" id="2_ax62s"]
 [ext_resource type="Script" path="res://addons/input_prompts/action_prompt/action_prompt.gd" id="3_85i3m"]
 
-[sub_resource type="InputEventKey" id="InputEventKey_x61p6"]
+[sub_resource type="InputEventKey" id="InputEventKey_ucxno"]
 device = -1
 physical_keycode = 32
 unicode = 32
 
-[sub_resource type="InputEventJoypadButton" id="InputEventJoypadButton_jnl3d"]
+[sub_resource type="InputEventJoypadButton" id="InputEventJoypadButton_amp3y"]
 device = -1
 
 [node name="JumpPromptContainer" type="HBoxContainer"]
@@ -28,4 +28,4 @@ stretch_mode = 5
 script = ExtResource("3_85i3m")
 action = "main"
 icon = 0
-events = Array[InputEvent]([SubResource("InputEventKey_x61p6"), SubResource("InputEventJoypadButton_jnl3d")])
+events = Array[InputEvent]([SubResource("InputEventKey_ucxno"), SubResource("InputEventJoypadButton_amp3y")])

+ 12 - 12
godot/component/ui/input_prompts/move/move_container.tscn

@@ -7,40 +7,40 @@
 [ext_resource type="Texture2D" uid="uid://bntsrcd3hjcex" path="res://addons/input_prompts/icons/generic/left_stick_up.png" id="4_e345q"]
 [ext_resource type="Texture2D" uid="uid://dreirjfpqj40a" path="res://addons/input_prompts/icons/generic/left_stick_down.png" id="5_vrthb"]
 
-[sub_resource type="InputEventKey" id="InputEventKey_l5lln"]
+[sub_resource type="InputEventKey" id="InputEventKey_wfj4m"]
 device = -1
 physical_keycode = 65
 unicode = 97
 
-[sub_resource type="InputEventJoypadMotion" id="InputEventJoypadMotion_ud53a"]
+[sub_resource type="InputEventJoypadMotion" id="InputEventJoypadMotion_vfyik"]
 device = -1
 axis_value = -1.0
 
-[sub_resource type="InputEventKey" id="InputEventKey_pv36a"]
+[sub_resource type="InputEventKey" id="InputEventKey_iw6gn"]
 device = -1
 physical_keycode = 68
 unicode = 101
 
-[sub_resource type="InputEventJoypadMotion" id="InputEventJoypadMotion_w6dxt"]
+[sub_resource type="InputEventJoypadMotion" id="InputEventJoypadMotion_2t3i8"]
 device = -1
 axis_value = 1.0
 
-[sub_resource type="InputEventKey" id="InputEventKey_3j15a"]
+[sub_resource type="InputEventKey" id="InputEventKey_vkf1t"]
 device = -1
 physical_keycode = 87
 unicode = 44
 
-[sub_resource type="InputEventJoypadMotion" id="InputEventJoypadMotion_1xnls"]
+[sub_resource type="InputEventJoypadMotion" id="InputEventJoypadMotion_sxly5"]
 device = -1
 axis = 1
 axis_value = -1.0
 
-[sub_resource type="InputEventKey" id="InputEventKey_tseef"]
+[sub_resource type="InputEventKey" id="InputEventKey_rwo04"]
 device = -1
 physical_keycode = 83
 unicode = 111
 
-[sub_resource type="InputEventJoypadMotion" id="InputEventJoypadMotion_2wwcl"]
+[sub_resource type="InputEventJoypadMotion" id="InputEventJoypadMotion_rjep4"]
 device = -1
 axis = 1
 axis_value = 1.0
@@ -61,7 +61,7 @@ stretch_mode = 5
 script = ExtResource("2_hmylp")
 action = "move_left"
 icon = 0
-events = Array[InputEvent]([SubResource("InputEventKey_l5lln"), SubResource("InputEventJoypadMotion_ud53a")])
+events = Array[InputEvent]([SubResource("InputEventKey_wfj4m"), SubResource("InputEventJoypadMotion_vfyik")])
 
 [node name="MoveRightActionPrompt" type="TextureRect" parent="."]
 custom_minimum_size = Vector2(100, 100)
@@ -71,7 +71,7 @@ stretch_mode = 5
 script = ExtResource("2_hmylp")
 action = "move_right"
 icon = 0
-events = Array[InputEvent]([SubResource("InputEventKey_pv36a"), SubResource("InputEventJoypadMotion_w6dxt")])
+events = Array[InputEvent]([SubResource("InputEventKey_iw6gn"), SubResource("InputEventJoypadMotion_2t3i8")])
 
 [node name="MoveForwardActionPrompt" type="TextureRect" parent="."]
 custom_minimum_size = Vector2(100, 100)
@@ -81,7 +81,7 @@ stretch_mode = 5
 script = ExtResource("2_hmylp")
 action = "move_forward"
 icon = 0
-events = Array[InputEvent]([SubResource("InputEventKey_3j15a"), SubResource("InputEventJoypadMotion_1xnls")])
+events = Array[InputEvent]([SubResource("InputEventKey_vkf1t"), SubResource("InputEventJoypadMotion_sxly5")])
 
 [node name="MoveBackActionPrompt" type="TextureRect" parent="."]
 custom_minimum_size = Vector2(100, 100)
@@ -91,4 +91,4 @@ stretch_mode = 5
 script = ExtResource("2_hmylp")
 action = "move_back"
 icon = 0
-events = Array[InputEvent]([SubResource("InputEventKey_tseef"), SubResource("InputEventJoypadMotion_2wwcl")])
+events = Array[InputEvent]([SubResource("InputEventKey_rwo04"), SubResource("InputEventJoypadMotion_rjep4")])

+ 1 - 0
godot/project.godot

@@ -123,6 +123,7 @@ locale/locale_filter_mode=1
 3d_physics/layer_3="danger"
 3d_physics/layer_4="vehicle"
 3d_physics/layer_5="props"
+3d_physics/layer_6="collectibles"
 
 [rendering]
 

+ 74 - 45
godot/run/levels/infinite_level.tscn

@@ -1,4 +1,4 @@
-[gd_scene load_steps=31 format=3 uid="uid://7ivipmwaw24t"]
+[gd_scene load_steps=33 format=3 uid="uid://7ivipmwaw24t"]
 
 [ext_resource type="Texture2D" uid="uid://cgwafs6ukpm7y" path="res://component/entity/ground/ground051.jpg" id="1_3ytcp"]
 [ext_resource type="Script" path="res://run/levels/camera_tracker.gd" id="1_qdm47"]
@@ -7,6 +7,7 @@
 [ext_resource type="PackedScene" uid="uid://bcpri2x5afoyb" path="res://component/entity/props/box/box.tscn" id="2_e8xto"]
 [ext_resource type="PackedScene" uid="uid://dao17ylietgyl" path="res://component/entity/vehicles/plane/tiny_plane.tscn" id="4_tbpfc"]
 [ext_resource type="PackedScene" uid="uid://cj5dmtqadl5nf" path="res://component/entity/vehicles/jeep/Jeep.tscn" id="6_nnvc5"]
+[ext_resource type="PackedScene" uid="uid://ba3gf7iy3mxbq" path="res://component/entity/collectibles/chocolate/chocolate.tscn" id="7_5xsqf"]
 [ext_resource type="PackedScene" uid="uid://dhmnou48k24lr" path="res://component/entity/props/triangle/flat_triangle.tscn" id="7_yyaog"]
 [ext_resource type="Script" path="res://flow/music_player/music_player.gd" id="8_iulsm"]
 [ext_resource type="AudioStream" uid="uid://c3l60bt307wjh" path="res://flow/music_player/00-Wesh-tone-realaze.mp3" id="8_ndffw"]
@@ -23,6 +24,7 @@
 [ext_resource type="PackedScene" uid="uid://d6a3dml2i2qm" path="res://component/ui/input_prompts/jump/jump_container.tscn" id="17_6r3c0"]
 [ext_resource type="PackedScene" uid="uid://dl6fmkdlrcj53" path="res://component/ui/input_prompts/get_in/get_in_container.tscn" id="18_bejgn"]
 [ext_resource type="Script" path="res://flow/signal_wire/space_limit.gd" id="19_3qyrt"]
+[ext_resource type="PackedScene" uid="uid://cqkond8xwtdv5" path="res://component/ui/hud/chocolate_gauge/chocolate_gauge.tscn" id="23_wh0jf"]
 
 [sub_resource type="BoxShape3D" id="BoxShape3D_ctk0t"]
 size = Vector3(500, 10, 500)
@@ -87,138 +89,162 @@ process_mode = 4
 
 [node name="Props" type="Node3D" parent="."]
 
-[node name="Box1" parent="Props" instance=ExtResource("2_e8xto")]
+[node name="Boxes" type="Node3D" parent="Props"]
+
+[node name="Box1" parent="Props/Boxes" instance=ExtResource("2_e8xto")]
 transform = Transform3D(-0.339936, 0, 0.940448, 0, 1, 0, -0.940448, 0, -0.339936, -174.234, 0.5, 26.3796)
 
-[node name="Box2" parent="Props" instance=ExtResource("2_e8xto")]
+[node name="Box2" parent="Props/Boxes" instance=ExtResource("2_e8xto")]
 transform = Transform3D(-0.339936, 0, 0.940448, 0, 1, 0, -0.940448, 0, -0.339936, -173.898, 1.5, 27.0476)
 
-[node name="Box3" parent="Props" instance=ExtResource("2_e8xto")]
+[node name="Box3" parent="Props/Boxes" instance=ExtResource("2_e8xto")]
 transform = Transform3D(-0.544536, 0, 0.838737, 0, 1, 0, -0.838737, 0, -0.544536, -174.182, 2.5, 27.9529)
 
-[node name="Box15" parent="Props" instance=ExtResource("2_e8xto")]
+[node name="Box15" parent="Props/Boxes" instance=ExtResource("2_e8xto")]
 transform = Transform3D(-0.544536, 0, 0.838737, 0, 1, 0, -0.838737, 0, -0.544536, -169.685, 8.79002, 68.472)
 
-[node name="Box4" parent="Props" instance=ExtResource("2_e8xto")]
+[node name="Box4" parent="Props/Boxes" instance=ExtResource("2_e8xto")]
 transform = Transform3D(-0.339936, 0, 0.940448, 0, 1, 0, -0.940448, 0, -0.339936, -174.257, 1.5, 28.7933)
 
-[node name="Box5" parent="Props" instance=ExtResource("2_e8xto")]
+[node name="Box5" parent="Props/Boxes" instance=ExtResource("2_e8xto")]
 transform = Transform3D(-0.339936, 0, 0.940448, 0, 1, 0, -0.940448, 0, -0.339936, -173.86, 0.5, 27.9299)
 
-[node name="Box6" parent="Props" instance=ExtResource("2_e8xto")]
+[node name="Box6" parent="Props/Boxes" instance=ExtResource("2_e8xto")]
 transform = Transform3D(-0.339936, 0, 0.940448, 0, 1, 0, -0.940448, 0, -0.339936, -175.226, 0.5, 29.0686)
 
-[node name="Box16" parent="Props" instance=ExtResource("2_e8xto")]
+[node name="Box16" parent="Props/Boxes" instance=ExtResource("2_e8xto")]
 transform = Transform3D(-0.095255, 0, 0.995453, 0, 1, 0, -0.995453, 0, -0.095255, 132.85, 0.500002, 117.616)
 
-[node name="Box17" parent="Props" instance=ExtResource("2_e8xto")]
+[node name="Box17" parent="Props/Boxes" instance=ExtResource("2_e8xto")]
 transform = Transform3D(-0.095255, 0, 0.995453, 0, 1, 0, -0.995453, 0, -0.095255, 133.009, 1.5, 118.347)
 
-[node name="Box18" parent="Props" instance=ExtResource("2_e8xto")]
+[node name="Box18" parent="Props/Boxes" instance=ExtResource("2_e8xto")]
 transform = Transform3D(-0.318727, 0, 0.947847, 0, 1, 0, -0.947847, 0, -0.318727, 132.51, 2.5, 119.153)
 
-[node name="Box19" parent="Props" instance=ExtResource("2_e8xto")]
+[node name="Box19" parent="Props/Boxes" instance=ExtResource("2_e8xto")]
 transform = Transform3D(-0.095255, 0, 0.995453, 0, 1, 0, -0.995453, 0, -0.095255, 132.227, 1.5, 119.948)
 
-[node name="Box20" parent="Props" instance=ExtResource("2_e8xto")]
+[node name="Box20" parent="Props/Boxes" instance=ExtResource("2_e8xto")]
 transform = Transform3D(-0.095255, 0, 0.995453, 0, 1, 0, -0.995453, 0, -0.095255, 132.827, 0.500002, 119.211)
 
-[node name="Box21" parent="Props" instance=ExtResource("2_e8xto")]
+[node name="Box21" parent="Props/Boxes" instance=ExtResource("2_e8xto")]
 transform = Transform3D(-0.095255, 0, 0.995453, 0, 1, 0, -0.995453, 0, -0.095255, 131.221, 0.500002, 119.974)
 
-[node name="Box7" parent="Props" instance=ExtResource("2_e8xto")]
+[node name="Box7" parent="Props/Boxes" instance=ExtResource("2_e8xto")]
 transform = Transform3D(-0.339936, 0, 0.940448, 0, 1, 0, -0.940448, 0, -0.339936, -33.7006, 0.5, -192.521)
 
-[node name="Box8" parent="Props" instance=ExtResource("2_e8xto")]
+[node name="Box8" parent="Props/Boxes" instance=ExtResource("2_e8xto")]
 transform = Transform3D(-0.339936, 0, 0.940448, 0, 1, 0, -0.940448, 0, -0.339936, -33.3648, 1.5, -191.853)
 
-[node name="Box9" parent="Props" instance=ExtResource("2_e8xto")]
+[node name="Box9" parent="Props/Boxes" instance=ExtResource("2_e8xto")]
 transform = Transform3D(-0.544536, 0, 0.838737, 0, 1, 0, -0.838737, 0, -0.544536, -33.6479, 2.5, -190.948)
 
-[node name="Box10" parent="Props" instance=ExtResource("2_e8xto")]
+[node name="Box10" parent="Props/Boxes" instance=ExtResource("2_e8xto")]
 transform = Transform3D(-0.339936, 0, 0.940448, 0, 1, 0, -0.940448, 0, -0.339936, -33.7237, 1.5, -190.108)
 
-[node name="Box11" parent="Props" instance=ExtResource("2_e8xto")]
+[node name="Box11" parent="Props/Boxes" instance=ExtResource("2_e8xto")]
 transform = Transform3D(-0.339936, 0, 0.940448, 0, 1, 0, -0.940448, 0, -0.339936, -33.3264, 0.5, -190.971)
 
-[node name="Box12" parent="Props" instance=ExtResource("2_e8xto")]
+[node name="Box12" parent="Props/Boxes" instance=ExtResource("2_e8xto")]
 transform = Transform3D(-0.339936, 0, 0.940448, 0, 1, 0, -0.940448, 0, -0.339936, -34.6922, 0.5, -189.832)
 
-[node name="Box13" parent="Props" instance=ExtResource("2_e8xto")]
+[node name="Box13" parent="Props/Boxes" instance=ExtResource("2_e8xto")]
 transform = Transform3D(-0.544536, 0, 0.838737, 0, 1, 0, -0.838737, 0, -0.544536, 5.93014, 20.5081, 45.7705)
 
-[node name="Box14" parent="Props" instance=ExtResource("2_e8xto")]
+[node name="Box14" parent="Props/Boxes" instance=ExtResource("2_e8xto")]
 transform = Transform3D(0.239449, 0, 0.970909, 0, 1, 0, -0.970909, 0, 0.239449, 5.93014, 21.5166, 45.7705)
 
-[node name="FlatTriangle1" parent="Props" instance=ExtResource("7_yyaog")]
+[node name="Triangles" type="Node3D" parent="Props"]
+
+[node name="FlatTriangle1" parent="Props/Triangles" instance=ExtResource("7_yyaog")]
 transform = Transform3D(0.951937, 0, 0.306293, 0, 1, 0, -0.306293, 0, 0.951937, -7.64594, 0, 6.47457)
 
-[node name="FlatTriangle2" parent="Props" instance=ExtResource("7_yyaog")]
+[node name="FlatTriangle2" parent="Props/Triangles" instance=ExtResource("7_yyaog")]
 transform = Transform3D(-0.940448, 0, -0.339936, 0, 1, 0, 0.339936, 0, -0.940448, -164.24, 0, 60.6973)
 
-[node name="FlatTriangle7" parent="Props" instance=ExtResource("7_yyaog")]
+[node name="FlatTriangle7" parent="Props/Triangles" instance=ExtResource("7_yyaog")]
 transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -95.142, 0, -10.3618)
 
-[node name="FlatTriangle8" parent="Props" instance=ExtResource("7_yyaog")]
+[node name="FlatTriangle8" parent="Props/Triangles" instance=ExtResource("7_yyaog")]
 transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -97.2758, 0, -55.543)
 
-[node name="FlatTriangle20" parent="Props" instance=ExtResource("7_yyaog")]
+[node name="FlatTriangle20" parent="Props/Triangles" instance=ExtResource("7_yyaog")]
 transform = Transform3D(0.443134, 0, 0.896456, 0, 1, 0, -0.896456, 0, 0.443134, -97.2758, 0, -140.769)
 
-[node name="FlatTriangle21" parent="Props" instance=ExtResource("7_yyaog")]
+[node name="FlatTriangle21" parent="Props/Triangles" instance=ExtResource("7_yyaog")]
 transform = Transform3D(0.443134, 0, 0.896456, 0, 1, 0, -0.896456, 0, 0.443134, -161.743, 0, 34.9146)
 
-[node name="FlatTriangle23" parent="Props" instance=ExtResource("7_yyaog")]
+[node name="FlatTriangle23" parent="Props/Triangles" instance=ExtResource("7_yyaog")]
 transform = Transform3D(0.063853, 0, 0.997959, 0, 1, 0, -0.997959, 0, 0.063853, -104.29, 7.62939e-06, 29.3291)
 
-[node name="FlatTriangle22" parent="Props" instance=ExtResource("7_yyaog")]
+[node name="FlatTriangle22" parent="Props/Triangles" instance=ExtResource("7_yyaog")]
 transform = Transform3D(-0.597471, 0, 0.80189, 0, 1, 0, -0.80189, 0, -0.597471, -153.538, 0, 160.066)
 
-[node name="FlatTriangle9" parent="Props" instance=ExtResource("7_yyaog")]
+[node name="FlatTriangle9" parent="Props/Triangles" instance=ExtResource("7_yyaog")]
 transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -87.5054, 0, -32.2708)
 
-[node name="FlatTriangle3" parent="Props" instance=ExtResource("7_yyaog")]
+[node name="FlatTriangle3" parent="Props/Triangles" instance=ExtResource("7_yyaog")]
 transform = Transform3D(-0.752346, 0, 0.658768, 0, 1, 0, -0.658768, 0, -0.752346, -30.389, 0, 69.5791)
 
-[node name="FlatTriangle4" parent="Props" instance=ExtResource("7_yyaog")]
+[node name="FlatTriangle4" parent="Props/Triangles" instance=ExtResource("7_yyaog")]
 transform = Transform3D(0.311821, 0, -0.950141, 0, 1, 0, 0.950141, 0, 0.311821, -116.375, 0, 144.573)
 
-[node name="FlatTriangle5" parent="Props" instance=ExtResource("7_yyaog")]
+[node name="FlatTriangle5" parent="Props/Triangles" instance=ExtResource("7_yyaog")]
 transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 55.6478, 0, -47.5856)
 
-[node name="FlatTriangle6" parent="Props" instance=ExtResource("7_yyaog")]
+[node name="FlatTriangle6" parent="Props/Triangles" instance=ExtResource("7_yyaog")]
 transform = Transform3D(0.119634, 0, -0.992818, 0, 1, 0, 0.992818, 0, 0.119634, 16.7144, 0, -1.251)
 
-[node name="FlatTriangle10" parent="Props" instance=ExtResource("7_yyaog")]
+[node name="FlatTriangle10" parent="Props/Triangles" instance=ExtResource("7_yyaog")]
 transform = Transform3D(-0.670336, 0, 0.742058, 0, 1, 0, -0.742058, 0, -0.670336, 45.1078, 0, -5.31432)
 
-[node name="FlatTriangle11" parent="Props" instance=ExtResource("7_yyaog")]
+[node name="FlatTriangle11" parent="Props/Triangles" instance=ExtResource("7_yyaog")]
 transform = Transform3D(-0.544141, 0, -0.838994, 0, 1, 0, 0.838994, 0, -0.544141, 31.0643, 0, 62.1097)
 
-[node name="FlatTriangle15" parent="Props" instance=ExtResource("7_yyaog")]
+[node name="FlatTriangle15" parent="Props/Triangles" instance=ExtResource("7_yyaog")]
 transform = Transform3D(0.721712, 0, -0.692194, 0, 1, 0, 0.692194, 0, 0.721712, 66.7063, 1.90735e-06, -92.584)
 
-[node name="FlatTriangle16" parent="Props" instance=ExtResource("7_yyaog")]
+[node name="FlatTriangle16" parent="Props/Triangles" instance=ExtResource("7_yyaog")]
 transform = Transform3D(0.444823, 0, -0.895619, 0, 1, 0, 0.895619, 0, 0.444823, 3.58108, 1.90735e-06, -110.14)
 
-[node name="FlatTriangle19" parent="Props" instance=ExtResource("7_yyaog")]
+[node name="FlatTriangle19" parent="Props/Triangles" instance=ExtResource("7_yyaog")]
 transform = Transform3D(-0.943414, 0, 0.331618, 0, 1, 0, -0.331618, 0, -0.943414, -24.702, 1.90735e-06, -135.896)
 
-[node name="FlatTriangle18" parent="Props" instance=ExtResource("7_yyaog")]
+[node name="FlatTriangle18" parent="Props/Triangles" instance=ExtResource("7_yyaog")]
 transform = Transform3D(0.954844, 0, -0.297108, 0, 1, 0, 0.297108, 0, 0.954844, -9.49784, 1.90735e-06, -43.3424)
 
-[node name="FlatTriangle17" parent="Props" instance=ExtResource("7_yyaog")]
+[node name="FlatTriangle17" parent="Props/Triangles" instance=ExtResource("7_yyaog")]
 transform = Transform3D(0.69824, 0, 0.715863, 0, 1, 0, -0.715863, 0, 0.69824, 44.3144, 1.90735e-06, -81.2353)
 
-[node name="FlatTriangle12" parent="Props" instance=ExtResource("7_yyaog")]
+[node name="FlatTriangle12" parent="Props/Triangles" instance=ExtResource("7_yyaog")]
 transform = Transform3D(-0.544141, 0, -0.838994, 0, 1, 0, 0.838994, 0, -0.544141, 188.074, -1.90735e-06, 123.519)
 
-[node name="FlatTriangle14" parent="Props" instance=ExtResource("7_yyaog")]
+[node name="FlatTriangle14" parent="Props/Triangles" instance=ExtResource("7_yyaog")]
 transform = Transform3D(-0.0879904, 0, 0.996121, 0, 1, 0, -0.996121, 0, -0.0879904, 104.877, -1.90735e-06, 103.738)
 
-[node name="FlatTriangle13" parent="Props" instance=ExtResource("7_yyaog")]
+[node name="FlatTriangle13" parent="Props/Triangles" instance=ExtResource("7_yyaog")]
 transform = Transform3D(0.951067, 0, -0.308984, 0, 1, 0, 0.308984, 0, 0.951067, 152.451, -0.112335, 56.6457)
 
+[node name="Chocolate" type="Node3D" parent="Props"]
+
+[node name="ChocolateTablet1" parent="Props/Chocolate" instance=ExtResource("7_5xsqf")]
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 13.1804, 0.764616, 49.1112)
+
+[node name="ChocolateTablet2" parent="Props/Chocolate" instance=ExtResource("7_5xsqf")]
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -36.9071, 0.764616, 11.1705)
+
+[node name="ChocolateTablet3" parent="Props/Chocolate" instance=ExtResource("7_5xsqf")]
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -174.014, 5.1031, 27.9732)
+
+[node name="ChocolateTablet4" parent="Props/Chocolate" instance=ExtResource("7_5xsqf")]
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 103.087, 0.764616, -38.3367)
+
+[node name="ChocolateTablet5" parent="Props/Chocolate" instance=ExtResource("7_5xsqf")]
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 202.17, 0.764616, -174.564)
+
+[node name="ChocolateTablet6" parent="Props/Chocolate" instance=ExtResource("7_5xsqf")]
+transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 132.368, 3.71743, 119.417)
+
 [node name="Vehicles" type="Node3D" parent="."]
 
 [node name="TinyPlane" parent="Vehicles" instance=ExtResource("4_tbpfc")]
@@ -431,6 +457,8 @@ layout_mode = 2
 [node name="VictoryMenu" parent="UI" instance=ExtResource("17_1u7wg")]
 visible = false
 
+[node name="ChocolateGauge" parent="UI" instance=ExtResource("23_wh0jf")]
+
 [node name="WorldEnvironment" type="WorldEnvironment" parent="."]
 environment = SubResource("Environment_jdyq3")
 
@@ -463,6 +491,7 @@ transform = Transform3D(-1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0)
 shape = SubResource("WorldBoundaryShape3D_cdiox")
 
 [connection signal="can_get_in" from="MainWalker" to="UI/InputPromptsCenter/InputPromptsCollection/GetInPromptContainer" method="set_visible"]
+[connection signal="chocolate_collected" from="MainWalker" to="UI/ChocolateGauge" method="_on_main_walker_chocolate_collected"]
 [connection signal="focus_required" from="MainWalker" to="CameraTracker" method="_on_focus_required"]
 [connection signal="got_in" from="MainWalker" to="MusicPlayer" method="_on_driver_got_in"]
 [connection signal="got_in" from="MainWalker" to="UI/InputPromptsCenter/InputPromptsCollection/GetInPromptContainer" method="hide"]