Skip to content

Commit

Permalink
Fluorescent fungi sound & animation added, small grass added
Browse files Browse the repository at this point in the history
  • Loading branch information
PonderSlime committed Jul 21, 2024
1 parent 44e6765 commit d679d9d
Show file tree
Hide file tree
Showing 25 changed files with 717 additions and 54 deletions.
Binary file added project/Audio/Sound Effects/boing.wav
Binary file not shown.
24 changes: 24 additions & 0 deletions project/Audio/Sound Effects/boing.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[remap]

importer="wav"
type="AudioStreamWAV"
uid="uid://db66h1apa74hk"
path="res://.godot/imported/boing.wav-906bc1b49c115cf095fd0577f3f5ac6d.sample"

[deps]

source_file="res://Audio/Sound Effects/boing.wav"
dest_files=["res://.godot/imported/boing.wav-906bc1b49c115cf095fd0577f3f5ac6d.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
12 changes: 1 addition & 11 deletions project/Prepped Assets/Characters/player.gd
Original file line number Diff line number Diff line change
Expand Up @@ -134,48 +134,38 @@ func _hurt():
hurt.emit()

func fungi_right():
is_bouncing = true
velocity.x += -jump_speed * 1.2
await get_tree().create_timer(0.001).timeout
if is_on_floor():
is_bouncing = false
print("fungi_right")
is_bouncing = true
func fungi_up_right():
velocity.y += jump_speed * 1.2
velocity.x += -jump_speed * 1.2
await get_tree().create_timer(0.001).timeout
is_bouncing = true
print("fungi_up_right")
func fungi_up():
velocity.y += jump_speed * 1.2
await get_tree().create_timer(0.001).timeout
is_bouncing = true
print("fungi_up")
func fungi_up_left():
velocity.y += jump_speed * 1.2
velocity.x += jump_speed * 1.2
await get_tree().create_timer(0.001).timeout
is_bouncing = true
print("fungi_up_left")
func fungi_left():
velocity.x += jump_speed * 1.2
await get_tree().create_timer(0.001).timeout
is_bouncing = true
print("fungi_left")
func fungi_down_left():
velocity.y += -jump_speed * 1.2
velocity.x += jump_speed * 1.2
await get_tree().create_timer(0.001).timeout
is_bouncing = true
print("fungi_down_left")
func fungi_down():
velocity.y += -jump_speed * 1.2
await get_tree().create_timer(0.001).timeout
is_bouncing = true
print("fungi_down")
func fungi_down_right():
velocity.y += -jump_speed * 1.2
velocity.x += -jump_speed * 1.2
await get_tree().create_timer(0.001).timeout
is_bouncing = true
print("fungi_down_right")
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
extends StaticBody2D

@onready var audio = $AudioStreamPlayer2D
@onready var state_machine = $AnimationTree.get("parameters/playback")
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
Expand All @@ -13,4 +14,7 @@ func _physics_process(_delta):

func _on_area_2d_body_entered(body):
if body.name == "Player":
state_machine.travel("boing")
body.fungi_down()
audio.stop()
audio.play()
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
extends StaticBody2D

@onready var audio = $AudioStreamPlayer2D
@onready var state_machine = $AnimationTree.get("parameters/playback")
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
Expand All @@ -13,4 +14,7 @@ func _physics_process(_delta):

func _on_area_2d_body_entered(body):
if body.name == "Player":
state_machine.travel("boing")
body.fungi_down_left()
audio.stop()
audio.play()
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
extends StaticBody2D

@onready var audio = $AudioStreamPlayer2D
@onready var state_machine = $AnimationTree.get("parameters/playback")
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
Expand All @@ -13,5 +14,7 @@ func _physics_process(_delta):

func _on_area_2d_body_entered(body):
if body.name == "Player":
state_machine.travel("boing")
body.fungi_down_right()

audio.stop()
audio.play()
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
extends StaticBody2D

@onready var audio = $AudioStreamPlayer2D
@onready var state_machine = $AnimationTree.get("parameters/playback")
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
Expand All @@ -13,4 +14,7 @@ func _physics_process(_delta):

func _on_area_2d_body_entered(body):
if body.name == "Player":
state_machine.travel("boing")
body.fungi_left()
audio.stop()
audio.play()
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
extends StaticBody2D

@onready var audio = $AudioStreamPlayer2D
@onready var state_machine = $AnimationTree.get("parameters/playback")
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
Expand All @@ -13,4 +14,7 @@ func _physics_process(_delta):

func _on_area_2d_body_entered(body):
if body.name == "Player":
state_machine.travel("boing")
body.fungi_right()
audio.stop()
audio.play()
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
extends StaticBody2D

@onready var audio = $AudioStreamPlayer2D
@onready var state_machine = $AnimationTree.get("parameters/playback")
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.

func _physics_process(_delta):
func _process(delta):
pass


func _on_area_2d_body_entered(body):
if body.name == "Player":
state_machine.travel("boing")
body.fungi_up()
audio.stop()
audio.play()
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
extends StaticBody2D

@onready var audio = $AudioStreamPlayer2D
@onready var state_machine = $AnimationTree.get("parameters/playback")
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
Expand All @@ -13,4 +14,7 @@ func _physics_process(_delta):

func _on_area_2d_body_entered(body):
if body.name == "Player":
state_machine.travel("boing")
body.fungi_up_left()
audio.stop()
audio.play()
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
extends StaticBody2D

@onready var audio = $AudioStreamPlayer2D
@onready var state_machine = $AnimationTree.get("parameters/playback")
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
Expand All @@ -13,4 +14,7 @@ func _physics_process(_delta):

func _on_area_2d_body_entered(body):
if body.name == "Player":
state_machine.travel("boing")
body.fungi_up_right()
audio.stop()
audio.play()
Original file line number Diff line number Diff line change
@@ -1,14 +1,74 @@
[gd_scene load_steps=5 format=3 uid="uid://rd2mjis5gh3l"]
[gd_scene load_steps=15 format=3 uid="uid://rd2mjis5gh3l"]

[ext_resource type="Script" path="res://Prepped Assets/Environment/fungi/florescent_fungi_down.gd" id="1_s7og6"]
[ext_resource type="Texture2D" uid="uid://8fy8t4671fgw" path="res://Sprites/Environment/FluorescentFungis.png" id="2_y32yn"]
[ext_resource type="AudioStream" uid="uid://db66h1apa74hk" path="res://Audio/Sound Effects/boing.wav" id="3_eejb8"]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_33gyr"]
size = Vector2(14, 13)

[sub_resource type="RectangleShape2D" id="RectangleShape2D_630cl"]
size = Vector2(16, 14)

[sub_resource type="Animation" id="Animation_prlsp"]
resource_name = "boing"
length = 0.5833
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.5833),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0, 6]
}

[sub_resource type="Animation" id="Animation_sjoqg"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_iwgu3"]
_data = {
"RESET": SubResource("Animation_sjoqg"),
"boing": SubResource("Animation_prlsp")
}

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_n1hl0"]
animation = &"RESET"

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_uhs0v"]
animation = &"boing"

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_e5oit"]
advance_mode = 2

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_1kh1x"]

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_55dhk"]
switch_mode = 2
advance_mode = 2

[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_ka8d3"]
states/RESET/node = SubResource("AnimationNodeAnimation_n1hl0")
states/RESET/position = Vector2(464, 75)
states/boing/node = SubResource("AnimationNodeAnimation_uhs0v")
states/boing/position = Vector2(466, 162)
transitions = ["Start", "RESET", SubResource("AnimationNodeStateMachineTransition_e5oit"), "RESET", "boing", SubResource("AnimationNodeStateMachineTransition_1kh1x"), "boing", "RESET", SubResource("AnimationNodeStateMachineTransition_55dhk")]

[node name="FluorescentFungiDown" type="StaticBody2D"]
z_index = 1
rotation = 3.14159
Expand All @@ -33,4 +93,16 @@ collision_mask = 2
position = Vector2(0, -7)
shape = SubResource("RectangleShape2D_630cl")

[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("3_eejb8")

[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_iwgu3")
}

[node name="AnimationTree" type="AnimationTree" parent="."]
tree_root = SubResource("AnimationNodeStateMachine_ka8d3")
anim_player = NodePath("../AnimationPlayer")

[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"]
Original file line number Diff line number Diff line change
@@ -1,14 +1,74 @@
[gd_scene load_steps=5 format=3 uid="uid://d0q5hbacjulkd"]
[gd_scene load_steps=15 format=3 uid="uid://d0q5hbacjulkd"]

[ext_resource type="Script" path="res://Prepped Assets/Environment/fungi/florescent_fungi_down_left.gd" id="1_w1uwr"]
[ext_resource type="Texture2D" uid="uid://8fy8t4671fgw" path="res://Sprites/Environment/FluorescentFungis.png" id="2_pjcgc"]
[ext_resource type="AudioStream" uid="uid://db66h1apa74hk" path="res://Audio/Sound Effects/boing.wav" id="3_engp7"]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_4gatf"]
size = Vector2(14, 13)

[sub_resource type="RectangleShape2D" id="RectangleShape2D_rg857"]
size = Vector2(16, 14)

[sub_resource type="Animation" id="Animation_prlsp"]
resource_name = "boing"
length = 0.5833
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.5833),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0, 6]
}

[sub_resource type="Animation" id="Animation_sjoqg"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_iwgu3"]
_data = {
"RESET": SubResource("Animation_sjoqg"),
"boing": SubResource("Animation_prlsp")
}

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_n1hl0"]
animation = &"RESET"

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_uhs0v"]
animation = &"boing"

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_e5oit"]
advance_mode = 2

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_1kh1x"]

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_55dhk"]
switch_mode = 2
advance_mode = 2

[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_w238v"]
states/RESET/node = SubResource("AnimationNodeAnimation_n1hl0")
states/RESET/position = Vector2(464, 75)
states/boing/node = SubResource("AnimationNodeAnimation_uhs0v")
states/boing/position = Vector2(466, 162)
transitions = ["Start", "RESET", SubResource("AnimationNodeStateMachineTransition_e5oit"), "RESET", "boing", SubResource("AnimationNodeStateMachineTransition_1kh1x"), "boing", "RESET", SubResource("AnimationNodeStateMachineTransition_55dhk")]

[node name="FluorescentFungiDownLeft" type="StaticBody2D"]
z_index = 1
rotation = -2.35619
Expand All @@ -33,4 +93,16 @@ collision_mask = 2
position = Vector2(0, -7)
shape = SubResource("RectangleShape2D_rg857")

[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("3_engp7")

[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_iwgu3")
}

[node name="AnimationTree" type="AnimationTree" parent="."]
tree_root = SubResource("AnimationNodeStateMachine_w238v")
anim_player = NodePath("../AnimationPlayer")

[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"]
Loading

0 comments on commit d679d9d

Please sign in to comment.