Skip to content

Commit

Permalink
resolve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
TinyTakinTeller committed Oct 6, 2024
1 parent 513e4e3 commit 70edfc8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
9 changes: 6 additions & 3 deletions global/autoload/audio/audio.gd
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
extends Node

const MAIN_MUSIC_TRACKS: int = 3
const BOSS_MUSIC_TRACK: int = 3

@export var default_sfx_pitch_variance: float = 0.5:
set(value):
default_sfx_pitch_variance = clampf(value, 0.0, 1.0)
Expand Down Expand Up @@ -37,7 +40,7 @@ func _ready() -> void:


func _initalize() -> void:
_track = randi() % music_tracks.get_child_count()
_track = randi() % MAIN_MUSIC_TRACKS
_current_audio_player = music_tracks.get_child(_track)
_current_audio_player.fade_in()

Expand All @@ -48,7 +51,7 @@ func _initalize() -> void:


func swap_crossfade_music_next() -> void:
_track = (_track + 1) % music_tracks.get_child_count()
_track = (_track + 1) % MAIN_MUSIC_TRACKS
swap_crossfade_audio(music_tracks.get_child(_track))
if Game.PARAMS_DEBUG["debug_logs"]:
prints("track", _track)
Expand Down Expand Up @@ -130,7 +133,7 @@ func _on_soul() -> void:


func _on_boss_start() -> void:
pass ## TODO boss music sountrack
swap_crossfade_audio(music_tracks.get_child(BOSS_MUSIC_TRACK))


func _on_boss_end() -> void:
Expand Down
13 changes: 8 additions & 5 deletions global/autoload/audio/audio.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=14 format=3 uid="uid://bp61l7vkkscuw"]
[gd_scene load_steps=13 format=3 uid="uid://bp61l7vkkscuw"]

[ext_resource type="Script" path="res://global/autoload/audio/audio.gd" id="1_7i6rq"]
[ext_resource type="PackedScene" uid="uid://f1stqtkpi6rl" path="res://global/autoload/audio/audio_queue/audio_queue.tscn" id="2_bb4fe"]
Expand All @@ -8,9 +8,8 @@
[ext_resource type="AudioStream" uid="uid://cjg7wv1kxy1ye" path="res://assets/audio/freesound_org/heartbeat_80bpm/loudernoises_heartbeat_80bpm.wav" id="5_s525l"]
[ext_resource type="AudioStream" uid="uid://tksoficve1me" path="res://assets/audio/skyler_newsome/forest_arr_mstr_loop.mp3" id="6_egdi5"]
[ext_resource type="AudioStream" uid="uid://b5ad2ujlpx4s8" path="res://assets/audio/joseph_philip_burke/forest_song_compressed.mp3" id="7_ompd1"]
[ext_resource type="AudioStream" uid="uid://cjhw543r57cxo" path="res://assets/audio/pixabay/junipersona/to_the_death.mp3" id="8_2pugy"]
[ext_resource type="Script" path="res://resources/songs/song.gd" id="8_tgyec"]
[ext_resource type="AudioStream" uid="uid://b44xi3ebx4ju3" path="res://assets/audio/freemusicarchive_org/universfield/corpse_rot/corpse_rot.mp3" id="9_86iap"]
[ext_resource type="AudioStream" uid="uid://blrw2u3jb1fbm" path="res://assets/audio/freemusicarchive_org/universfield/criminal_district/criminal_district.mp3" id="10_5odgy"]

[sub_resource type="Resource" id="Resource_gc3pj"]
script = ExtResource("8_tgyec")
Expand All @@ -19,8 +18,8 @@ combat_audio_stream = ExtResource("6_egdi5")

[sub_resource type="Resource" id="Resource_e4642"]
script = ExtResource("8_tgyec")
idle_audio_stream = ExtResource("10_5odgy")
combat_audio_stream = ExtResource("9_86iap")
idle_audio_stream = ExtResource("8_2pugy")
combat_audio_stream = ExtResource("8_2pugy")

[node name="Audio" type="Node"]
script = ExtResource("1_7i6rq")
Expand All @@ -47,6 +46,10 @@ max_volume_combat = 0.4
default_audio = SubResource("Resource_e4642")
max_volume_idle = 3.0

[node name="BulletHellBoss" parent="Music" instance=ExtResource("4_gols3")]
default_audio = ExtResource("8_2pugy")
max_volume_idle = 0.5

[node name="Ambience" type="Node" parent="."]

[node name="Heartbeat" parent="Ambience" instance=ExtResource("4_gols3")]
Expand Down

0 comments on commit 70edfc8

Please sign in to comment.