diff --git a/assets/collect_2.wav b/assets/collect_2.wav new file mode 100644 index 0000000..ba1893f --- /dev/null +++ b/assets/collect_2.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:337459e1ffdc915e071c000a04eb28e68abd286bd56584e0b5d7d22e521911d6 +size 41388 diff --git a/assets/collect_2.wav.import b/assets/collect_2.wav.import new file mode 100644 index 0000000..53bb29c --- /dev/null +++ b/assets/collect_2.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://4bkqsij7u6ss" +path="res://.godot/imported/collect_2.wav-31830f77af8214a8dadabbfe968e19e1.sample" + +[deps] + +source_file="res://assets/collect_2.wav" +dest_files=["res://.godot/imported/collect_2.wav-31830f77af8214a8dadabbfe968e19e1.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/island/Island.tscn b/island/Island.tscn index 34cbfa0..c5b835d 100644 --- a/island/Island.tscn +++ b/island/Island.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=15 format=3 uid="uid://bg88gc1w1gw5m"] +[gd_scene load_steps=16 format=3 uid="uid://bg88gc1w1gw5m"] [ext_resource type="PackedScene" uid="uid://dh5blytk6vmdu" path="res://island/Sea.tscn" id="1_e0hpm"] [ext_resource type="PackedScene" uid="uid://b5i1sqd88wlle" path="res://player/Player.tscn" id="3_5378m"] @@ -9,6 +9,7 @@ [ext_resource type="PackedScene" uid="uid://boxtb3trgcy8c" path="res://island/PillarMesh.tscn" id="7_grmwj"] [ext_resource type="PackedScene" uid="uid://cwf11kdk7t64k" path="res://island/HoppityMesh.tscn" id="8_5pio0"] [ext_resource type="PackedScene" uid="uid://dutcugv574855" path="res://island/Leafpile.tscn" id="9_472aa"] +[ext_resource type="PackedScene" uid="uid://v7bv81krh12e" path="res://island/Pineapple.tscn" id="10_dlxm4"] [sub_resource type="Gradient" id="Gradient_shcpx"] interpolation_mode = 2 @@ -96,7 +97,7 @@ transform = Transform3D(-1, 3.48787e-16, -8.74228e-08, 3.48787e-16, 1, -3.48787e [node name="CropTiles" type="Node3D" parent="."] [node name="Leafpile" parent="CropTiles" instance=ExtResource("9_472aa")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3, 3, 3) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3, 3, -4) [node name="Leafpile2" parent="CropTiles" instance=ExtResource("9_472aa")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4, 3, -4) @@ -168,3 +169,6 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4, 3, 59) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 3, 60) [node name="Produce" type="Node3D" parent="."] + +[node name="Pineapple" parent="Produce" instance=ExtResource("10_dlxm4")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3, 5) diff --git a/island/Seeds.tscn b/island/Seeds.tscn index ec7eac3..264b69c 100644 --- a/island/Seeds.tscn +++ b/island/Seeds.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=7 format=3 uid="uid://cm0apcnq0f26s"] +[gd_scene load_steps=8 format=3 uid="uid://cm0apcnq0f26s"] [ext_resource type="Texture2D" uid="uid://cdpn34mdaq545" path="res://assets/island_model/texture_1.png" id="1_e06sb"] [ext_resource type="Script" path="res://island/Seeds.gd" id="1_ndq82"] +[ext_resource type="AudioStream" uid="uid://4bkqsij7u6ss" path="res://assets/collect_2.wav" id="4_yfll2"] [ext_resource type="PackedScene" uid="uid://ci0hy0d4d1476" path="res://island/CollectibleByPlayer.tscn" id="5_xl41o"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_meps2"] @@ -47,6 +48,9 @@ shape = SubResource("SphereShape3D_geieh") [node name="CollectibleByPlayer" parent="." instance=ExtResource("5_xl41o")] target_path = NodePath("..") +[node name="CollectSound" parent="CollectibleByPlayer" index="0"] +stream = ExtResource("4_yfll2") + [connection signal="collected" from="CollectibleByPlayer" to="." method="_on_collectible_by_player_collected"] [editable path="CollectibleByPlayer"] diff --git a/player/Player.gd b/player/Player.gd index 3bd7fe5..3f9d2d4 100644 --- a/player/Player.gd +++ b/player/Player.gd @@ -130,6 +130,9 @@ func _process(_delta: float) -> void: func _input(event): + if event.is_action_pressed("respawn"): + respawn() + if event is InputEventKey and event.keycode == KEY_ESCAPE: get_tree().quit() diff --git a/player/Player.tscn b/player/Player.tscn index 800b495..19db56c 100644 --- a/player/Player.tscn +++ b/player/Player.tscn @@ -79,7 +79,6 @@ grow_horizontal = 2 grow_vertical = 2 [node name="CameraViewportContainer" type="SubViewportContainer" parent="Head/Viewport"] -layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 @@ -119,7 +118,6 @@ theme = SubResource("Theme_smyke") [node name="SubViewportContainer" type="SubViewportContainer" parent="HUD"] show_behind_parent = true -layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 @@ -149,7 +147,6 @@ scale = Vector2(1.65, 1) metadata/_edit_lock_ = true [node name="PineappleLabel" type="Label" parent="HUD"] -layout_mode = 1 anchors_preset = 2 anchor_top = 1.0 anchor_bottom = 1.0 @@ -164,7 +161,6 @@ text = "0 harvested" vertical_alignment = 2 [node name="AmmoLabel" type="Label" parent="HUD"] -layout_mode = 1 anchors_preset = 3 anchor_left = 1.0 anchor_top = 1.0 @@ -184,7 +180,6 @@ vertical_alignment = 2 [node name="Crosshair" type="ColorRect" parent="HUD"] material = SubResource("ShaderMaterial_2p6rt") -layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 diff --git a/project.godot b/project.godot index 451bb9d..1aee164 100644 --- a/project.godot +++ b/project.godot @@ -118,6 +118,11 @@ fire={ "events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"pressed":false,"double_click":false,"script":null) ] } +respawn={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":true,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":82,"unicode":0,"echo":false,"script":null) +] +} [layer_names]