Skip to content

Commit

Permalink
Peaceful sound track added, lava scene test complete/
Browse files Browse the repository at this point in the history
  • Loading branch information
PonderSlime committed Jul 25, 2024
1 parent 9f92038 commit 00b27ea
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 14 deletions.
Binary file added project/Audio/Music/peaceful.wav
Binary file not shown.
24 changes: 24 additions & 0 deletions project/Audio/Music/peaceful.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[remap]

importer="wav"
type="AudioStreamWAV"
uid="uid://dionqrvasy46s"
path="res://.godot/imported/peaceful.wav-a757db7c0138d97fb0c60a787d6d8898.sample"

[deps]

source_file="res://Audio/Music/peaceful.wav"
dest_files=["res://.godot/imported/peaceful.wav-a757db7c0138d97fb0c60a787d6d8898.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
9 changes: 5 additions & 4 deletions project/NextLevelEntrance.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ extends Area2D

@onready var level_1 = "res://Scenes/Test/test_scene_1.tscn"
@onready var level_2 = "res://Scenes/Test/test_lava_scene_1.tscn"
@export var level_count : int = 2
@export var _anim_player : AnimationPlayer
# Called when the node enters the scene tree for the first time.
func _ready():
Expand All @@ -10,8 +11,8 @@ func _ready():

# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
if GlobalVariableLoader.progress_level >= 3:
GlobalVariableLoader.progress_level = 2
if GlobalVariableLoader.progress_level > level_count - 1:
GlobalVariableLoader.progress_level = 1
func _on_body_entered(body):
if body.name == "Player":
_anim_player.play("dissolve")
Expand All @@ -20,9 +21,9 @@ func _on_body_entered(body):
await get_tree().create_timer(0.8333).timeout
GlobalVariableLoader.goto_scene(level_1)
GlobalVariableLoader.switch_scene = true
GlobalVariableLoader.active_level = 1
GlobalVariableLoader.active_level = 2
elif GlobalVariableLoader.progress_level == 1:
GlobalVariableLoader.goto_scene(level_2)
GlobalVariableLoader.switch_scene = true
GlobalVariableLoader.active_level = 2
GlobalVariableLoader.active_level = 3

9 changes: 7 additions & 2 deletions project/Prepped Assets/Characters/audio_controller.gd
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ extends Node
var overworld = preload("res://Audio/Music/overworld.wav")
var dreadful = preload("res://Audio/Music/dreadful.wav")
var wonderful = preload("res://Audio/Music/wonderful.wav")
var peaceful = preload("res://Audio/Music/peaceful.wav")
var powerup_music = preload("res://Audio/Music/powerup.wav")
var game_over = preload("res://Audio/Music/gameover.wav")
var jump = preload("res://Audio/Sound Effects/jump.wav")
Expand All @@ -33,14 +34,18 @@ func _process(delta):
powerup_sound.play()
elif GlobalVariableLoader.current_power_up == 0 and GlobalVariableLoader.prev_power_up == 0 and GlobalVariableLoader.active_level == 0 and GlobalVariableLoader.unlockCamera == false:
if !song.is_playing():
song.stream = wonderful
song.stream = peaceful
song.play()
elif GlobalVariableLoader.current_power_up == 0 and GlobalVariableLoader.prev_power_up == 0 and GlobalVariableLoader.active_level == 1 and GlobalVariableLoader.unlockCamera == false:
if !song.is_playing():
song.stream = wonderful
song.play()
elif GlobalVariableLoader.current_power_up == 0 and GlobalVariableLoader.prev_power_up == 0 and GlobalVariableLoader.active_level == 2 and GlobalVariableLoader.unlockCamera == false:
if !song.is_playing():
song.stream = overworld
song.volume_db
song.play()
elif GlobalVariableLoader.current_power_up == 0 and GlobalVariableLoader.prev_power_up == 0 and GlobalVariableLoader.active_level == 2 and GlobalVariableLoader.unlockCamera == false:
elif GlobalVariableLoader.current_power_up == 0 and GlobalVariableLoader.prev_power_up == 0 and GlobalVariableLoader.active_level == 3 and GlobalVariableLoader.unlockCamera == false:
if !song.is_playing():
song.stream = dreadful
song.play()
Expand Down
2 changes: 1 addition & 1 deletion project/Prepped Assets/Environment/spikes/spikes.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ size = Vector2(16, 12)

[node name="Spikes" type="StaticBody2D"]
z_index = 1
position = Vector2(0, 8)
position = Vector2(0, 10)
script = ExtResource("1_v4lmq")

[node name="Sprite2D" type="Sprite2D" parent="."]
Expand Down
2 changes: 1 addition & 1 deletion project/Prepped Assets/Environment/spikes/spikes_left.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ size = Vector2(16, 12)

[node name="Spikes" type="StaticBody2D"]
z_index = 1
position = Vector2(8, 0)
position = Vector2(10, 0)
rotation = -1.5708
script = ExtResource("1_tdwti")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ size = Vector2(16, 12)

[node name="Spikes" type="StaticBody2D"]
z_index = 1
position = Vector2(-8, 0)
position = Vector2(-10, 0)
rotation = 1.5708
script = ExtResource("1_xxxug")

Expand Down
3 changes: 2 additions & 1 deletion project/Scenes/Test/save_Game.gd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
extends Node2D

@onready var tile_map = $TileMap

@export var scene_type : int = 1

static func string_to_vector2(string := "") -> Vector2:
if string:
Expand All @@ -15,6 +15,7 @@ static func string_to_vector2(string := "") -> Vector2:
return Vector2.ZERO

func _ready():
GlobalVariableLoader.active_level = scene_type
var saveFile = FileAccess.open("user://warren.save", FileAccess.READ)
if(FileAccess.get_open_error() != OK):
return false
Expand Down
4 changes: 2 additions & 2 deletions project/Scenes/Test/test_lava_scene_1.tscn

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion project/Scenes/Test/test_scene_1.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ lights = NodePath("ParallaxBackground/ParallaxLayer/ParallaxLayerElements/NightL
point_light = NodePath("ParallaxBackground/ParallaxLayer/ParallaxLayerElements/NightLights/PointLight2D")
background = NodePath("ParallaxBackground/ParallaxLayer/ParallaxLayerElements/Background")
clouds = NodePath("ParallaxBackground/ParallaxLayer/ParallaxLayerElements/Clouds")
scene_type = 1
scene_type = 2

[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_wkaj8")
Expand Down
2 changes: 1 addition & 1 deletion project/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ config_version=5
[application]

config/name="Warrenguard"
run/main_scene="res://Scenes/Test/test_scene_1.tscn"
run/main_scene="res://Scenes/Test/test_warren_1.tscn"
config/features=PackedStringArray("4.2", "Forward Plus")
run/max_fps=60
config/icon="res://icon.svg"
Expand Down

0 comments on commit 00b27ea

Please sign in to comment.