Adaptive music and music 👍

This commit is contained in:
Rendo 2025-07-21 14:28:40 +05:00
commit dcffb97a3d
48 changed files with 603 additions and 24 deletions

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://mu86q1r1dvgo"
path="res://.godot/imported/03. Choose Your Seeds.mp3-b2ba9096d8ebcbeb1a207d029d597292.mp3str"
[deps]
source_file="res://assets/audio/music/03. Choose Your Seeds.mp3"
dest_files=["res://.godot/imported/03. Choose Your Seeds.mp3-b2ba9096d8ebcbeb1a207d029d597292.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://p0ixcpn1k405"
path="res://.godot/imported/20. Grasswalk IN-GAME.mp3-2a935a3458044929750006ec48e07f41.mp3str"
[deps]
source_file="res://assets/audio/music/20. Grasswalk IN-GAME.mp3"
dest_files=["res://.godot/imported/20. Grasswalk IN-GAME.mp3-2a935a3458044929750006ec48e07f41.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://cfybn7wn04frs"
path="res://.godot/imported/Grasswalk_Standard.mp3-974093166280b875e182c844f114c4e5.mp3str"
[deps]
source_file="res://assets/audio/music/Grasswalk_Standard.mp3"
dest_files=["res://.godot/imported/Grasswalk_Standard.mp3-974093166280b875e182c844f114c4e5.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://get7nh1goi1c"
path="res://.godot/imported/Grasswalk_cool.mp3-d847d63d93be466e675b7f89675b7c85.mp3str"
[deps]
source_file="res://assets/audio/music/Grasswalk_cool.mp3"
dest_files=["res://.godot/imported/Grasswalk_cool.mp3-d847d63d93be466e675b7f89675b7c85.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://bbxws8mw4vv35"
path="res://.godot/imported/chime.mp3-5d9dc45a83334afa169f0f2fc15cd04c.mp3str"
[deps]
source_file="res://assets/audio/sfx/dropables/chime.mp3"
dest_files=["res://.godot/imported/chime.mp3-5d9dc45a83334afa169f0f2fc15cd04c.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://hnm3v15ihvy3"
path="res://.godot/imported/coin.mp3-e6d411b392eaa4ec7c8cd46abb34d8bd.mp3str"
[deps]
source_file="res://assets/audio/sfx/dropables/coin.mp3"
dest_files=["res://.godot/imported/coin.mp3-e6d411b392eaa4ec7c8cd46abb34d8bd.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://dvv1upuxxxf37"
path="res://.godot/imported/moneyfalls.mp3-e0d4cd7f72cbdae93ab972c988e2a812.mp3str"
[deps]
source_file="res://assets/audio/sfx/dropables/moneyfalls.mp3"
dest_files=["res://.godot/imported/moneyfalls.mp3-e0d4cd7f72cbdae93ab972c988e2a812.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://bwnmx7t3hcw6h"
path="res://.godot/imported/awooga.mp3-f45c6860e90c31104a350f28523e35af.mp3str"
[deps]
source_file="res://assets/audio/sfx/level/awooga.mp3"
dest_files=["res://.godot/imported/awooga.mp3-f45c6860e90c31104a350f28523e35af.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://dtnnbgiwq2vai"
path="res://.godot/imported/finalwave.mp3-dcbe20f8c70ad55e1917f74a9fbf2fc6.mp3str"
[deps]
source_file="res://assets/audio/sfx/level/finalwave.mp3"
dest_files=["res://.godot/imported/finalwave.mp3-dcbe20f8c70ad55e1917f74a9fbf2fc6.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://c6hteaxu7qh7d"
path="res://.godot/imported/hugewave.mp3-5e0b0ab861349f58743dde97161ac64c.mp3str"
[deps]
source_file="res://assets/audio/sfx/level/hugewave.mp3"
dest_files=["res://.godot/imported/hugewave.mp3-5e0b0ab861349f58743dde97161ac64c.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://xx3uqvsnwyni"
path="res://.godot/imported/lightfill.mp3-cb750d3f80f53d14ded3d64fd2e4a213.mp3str"
[deps]
source_file="res://assets/audio/sfx/level/lightfill.mp3"
dest_files=["res://.godot/imported/lightfill.mp3-cb750d3f80f53d14ded3d64fd2e4a213.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://o5ebedp7b2mk"
path="res://.godot/imported/losemusic.mp3-a68202d81056cc9d853a2c962833706d.mp3str"
[deps]
source_file="res://assets/audio/sfx/level/losemusic.mp3"
dest_files=["res://.godot/imported/losemusic.mp3-a68202d81056cc9d853a2c962833706d.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://b6xb6mjdecg6a"
path="res://.godot/imported/readysetplant.mp3-e50c0aaca7d2b46e253287798fb969a1.mp3str"
[deps]
source_file="res://assets/audio/sfx/level/readysetplant.mp3"
dest_files=["res://.godot/imported/readysetplant.mp3-e50c0aaca7d2b46e253287798fb969a1.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://dlso0448ug80m"
path="res://.godot/imported/winmusic.mp3-53f592a3276b4e11874b84ace4fd5d88.mp3str"
[deps]
source_file="res://assets/audio/sfx/level/winmusic.mp3"
dest_files=["res://.godot/imported/winmusic.mp3-53f592a3276b4e11874b84ace4fd5d88.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://bssv6e03pt6ro"
path="res://.godot/imported/limbs_pop.mp3-ba82136d9bf16d8f8150f40d920599cc.mp3str"
[deps]
source_file="res://assets/audio/sfx/limbs_pop.mp3"
dest_files=["res://.godot/imported/limbs_pop.mp3-ba82136d9bf16d8f8150f40d920599cc.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://b1evq3sgppjdv"
path="res://.godot/imported/zombie_falling_1.mp3-2de447d457098877d99fbe800f933a7d.mp3str"
[deps]
source_file="res://assets/audio/sfx/zombie_falling_1.mp3"
dest_files=["res://.godot/imported/zombie_falling_1.mp3-2de447d457098877d99fbe800f933a7d.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://fs1tcp24gvfs"
path="res://.godot/imported/zombie_falling_2.mp3-65d48366d99ae052aba28568b4dc1db5.mp3str"
[deps]
source_file="res://assets/audio/sfx/zombie_falling_2.mp3"
dest_files=["res://.godot/imported/zombie_falling_2.mp3-65d48366d99ae052aba28568b4dc1db5.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View file

@ -1,6 +1,7 @@
[gd_resource type="Resource" script_class="AdventureLevelResource" load_steps=30 format=3 uid="uid://ctbue7dex4umy"]
[gd_resource type="Resource" script_class="AdventureLevelResource" load_steps=31 format=3 uid="uid://ctbue7dex4umy"]
[ext_resource type="Script" uid="uid://bximdujbkj2n4" path="res://addons/pvzadventure/AdventureLevelResource.cs" id="1_46lr8"]
[ext_resource type="Resource" uid="uid://b7jjqhhb6cv7i" path="res://assets/rewards/CucumberReward.tres" id="1_pd3l1"]
[ext_resource type="Script" uid="uid://cw7yc3i2lgcja" path="res://addons/pvzadventure/WaveEvent.cs" id="2_otfbt"]
[ext_resource type="Script" uid="uid://7rptlb5qr3b6" path="res://addons/pvzadventure/WaveData.cs" id="3_cugtx"]
[ext_resource type="Script" uid="uid://dl12rj75tk2qi" path="res://addons/pvzadventure/RowSpawn.cs" id="4_y1e37"]
@ -129,5 +130,6 @@ startSun = 50
wavePercentage = 0.5
standardWaveDelay = 30.0
initialWaveDelay = 20.0
reward = ExtResource("1_pd3l1")
waves = [SubResource("Resource_qsvr4"), SubResource("Resource_otfbt"), SubResource("Resource_nv3y4"), SubResource("Resource_mt5r8"), SubResource("Resource_kugcf"), SubResource("Resource_oyvhx"), SubResource("Resource_k4k25"), SubResource("Resource_oxbea"), SubResource("Resource_5cdj6")]
initialScenes = Array[PackedScene]([null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null])

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=17 format=3 uid="uid://dpxxjfd5lv5sv"]
[gd_scene load_steps=20 format=3 uid="uid://dpxxjfd5lv5sv"]
[ext_resource type="Theme" uid="uid://e8n88g31w7x7" path="res://assets/themes/ChooseYourSeeds.tres" id="1_bfo8i"]
[ext_resource type="Texture2D" uid="uid://dr8a0rx42o3qy" path="res://assets/sprites/gui/ChooseYourSeeds/PlantFrame.tres" id="2_so2bw"]
@ -12,6 +12,8 @@
[ext_resource type="AudioStream" uid="uid://bdx83fokp6kha" path="res://assets/audio/sfx/buttonclick.mp3" id="9_v7xff"]
[ext_resource type="Script" uid="uid://c1x4n4nqyq72f" path="res://scripts/audio/ChannelSettings.cs" id="10_nlh6x"]
[ext_resource type="PackedScene" uid="uid://bvpt0q4j6nx18" path="res://scenes/gui/almanach.tscn" id="11_nlh6x"]
[ext_resource type="AudioStream" uid="uid://mu86q1r1dvgo" path="res://assets/audio/music/03. Choose Your Seeds.mp3" id="13_y65t1"]
[ext_resource type="Script" uid="uid://b4ysi1iutmju3" path="res://scripts/ChooseYourSeedsMusic.cs" id="14_rptyw"]
[sub_resource type="ViewportTexture" id="ViewportTexture_rmoaa"]
viewport_path = NodePath("Panel/MarginContainer/VBoxContainer/HBoxContainer/Frame/Previewport")
@ -35,6 +37,10 @@ script = ExtResource("10_nlh6x")
restartTreshold = -1.0
metadata/_custom_type_script = "uid://c1x4n4nqyq72f"
[sub_resource type="AudioStreamPlaylist" id="AudioStreamPlaylist_lkvg0"]
stream_count = 1
stream_0 = ExtResource("13_y65t1")
[node name="ChooseYourSeeds" type="Control"]
process_mode = 3
layout_mode = 3
@ -168,4 +174,10 @@ metadata/_custom_type_script = "uid://c36bj8u7jghc7"
[node name="Almanach" parent="Independer" instance=ExtResource("11_nlh6x")]
visible = false
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = SubResource("AudioStreamPlaylist_lkvg0")
autoplay = true
bus = &"MusicBus"
script = ExtResource("14_rptyw")
[connection signal="pressed" from="Panel/LevelRunButton" to="ChannelPlayer" method="Play"]

View file

@ -1,6 +1,9 @@
[gd_scene load_steps=43 format=3 uid="uid://dd3yegl1xo44m"]
[gd_scene load_steps=54 format=3 uid="uid://dd3yegl1xo44m"]
[ext_resource type="AudioStream" uid="uid://b6xb6mjdecg6a" path="res://assets/audio/sfx/level/readysetplant.mp3" id="1_4gg2g"]
[ext_resource type="Script" uid="uid://bndu1h5kgcde8" path="res://scripts/level/RuntimeLevelData.cs" id="1_31ltw"]
[ext_resource type="AudioStream" uid="uid://c6hteaxu7qh7d" path="res://assets/audio/sfx/level/hugewave.mp3" id="1_i7rp7"]
[ext_resource type="AudioStream" uid="uid://dtnnbgiwq2vai" path="res://assets/audio/sfx/level/finalwave.mp3" id="1_xsaqy"]
[ext_resource type="Script" uid="uid://bso32xkw738sy" path="res://scripts/level/PoolContainer.cs" id="2_s5sti"]
[ext_resource type="PackedScene" uid="uid://devn21c7luf45" path="res://scenes/level components/field_controller.tscn" id="2_w4oj7"]
[ext_resource type="Script" uid="uid://blpu7t8tf6277" path="res://scripts/particles/FallFloor.cs" id="3_4bmqp"]
@ -13,13 +16,16 @@
[ext_resource type="Script" uid="uid://btqwxelqxheh3" path="res://scripts/gui/RestartButton.cs" id="9_2ybed"]
[ext_resource type="PackedScene" uid="uid://c668qnmmpli5r" path="res://scenes/gui/wave_progress.tscn" id="9_7v6ps"]
[ext_resource type="Script" uid="uid://dpdpv2oyxdna7" path="res://scripts/gui/ExitButton.cs" id="10_nvbnq"]
[ext_resource type="AudioStream" uid="uid://o5ebedp7b2mk" path="res://assets/audio/sfx/level/losemusic.mp3" id="11_8vb7v"]
[ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="11_p133p"]
[ext_resource type="AudioStream" uid="uid://bdx83fokp6kha" path="res://assets/audio/sfx/buttonclick.mp3" id="12_6gkho"]
[ext_resource type="AudioStream" uid="uid://dlso0448ug80m" path="res://assets/audio/sfx/level/winmusic.mp3" id="12_y5tw7"]
[ext_resource type="Script" uid="uid://c0ov2bq5er0gh" path="res://scripts/entities/plants/LoseZone.cs" id="13_0x4ji"]
[ext_resource type="Script" uid="uid://cslqjdd5wq4rc" path="res://scripts/level/SunSpawner.cs" id="14_y72yf"]
[ext_resource type="PackedScene" uid="uid://bpekho7leatr5" path="res://scenes/sun.tscn" id="15_7v6ps"]
[ext_resource type="PackedScene" uid="uid://jm7wm08d2mi7" path="res://scenes/level components/right_boundary_marker.tscn" id="16_s7icd"]
[ext_resource type="PackedScene" uid="uid://plc2gus4ppds" path="res://scenes/level components/left_boundary_marker.tscn" id="17_8qqc4"]
[ext_resource type="AudioStream" uid="uid://xx3uqvsnwyni" path="res://assets/audio/sfx/level/lightfill.mp3" id="18_i7rp7"]
[ext_resource type="Script" uid="uid://812ldoyxd5n5" path="res://scripts/level/LoseCheckbox.cs" id="19_482ps"]
[ext_resource type="Script" uid="uid://1lkhoh43h86m" path="res://scripts/level/GameTimer.cs" id="19_s7icd"]
[ext_resource type="Script" uid="uid://84gvlkflxdhk" path="res://scripts/level/zombe_spawners/RowSpawner.cs" id="22_8qqc4"]
@ -27,6 +33,10 @@
[ext_resource type="Resource" uid="uid://kqqqjubwm37a" path="res://assets/rewards/DefaultReward.tres" id="24_7v6ps"]
[ext_resource type="Script" uid="uid://bc3s06ejbotma" path="res://scripts/gui/ZombieLevelPreviewer.cs" id="24_y5tw7"]
[ext_resource type="Script" uid="uid://b31mnk4enldc4" path="res://scripts/level/InitialPackedSceneSpawner.cs" id="26_i7rp7"]
[ext_resource type="AudioStream" uid="uid://bwnmx7t3hcw6h" path="res://assets/audio/sfx/level/awooga.mp3" id="32_xsaqy"]
[ext_resource type="AudioStream" uid="uid://cfybn7wn04frs" path="res://assets/audio/music/Grasswalk_Standard.mp3" id="34_tqd4v"]
[ext_resource type="AudioStream" uid="uid://get7nh1goi1c" path="res://assets/audio/music/Grasswalk_cool.mp3" id="35_4gg2g"]
[ext_resource type="Script" uid="uid://bnj5tlcpmep2o" path="res://scripts/MusicTransitioner.cs" id="36_wwgye"]
[sub_resource type="Animation" id="Animation_vbgdr"]
resource_name = "CYS_Sequence"
@ -95,6 +105,20 @@ tracks/1/keys = {
"update": 1,
"values": ["final_wave"]
}
tracks/2/type = "method"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("LastWavePlayer")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"Play"
}]
}
[sub_resource type="Animation" id="Animation_pqj5f"]
resource_name = "HW_Sequence"
@ -123,10 +147,24 @@ tracks/1/keys = {
"update": 1,
"values": [true, false]
}
tracks/2/type = "method"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("HugeWavePlayer")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"Play"
}]
}
[sub_resource type="Animation" id="Animation_8ajos"]
resource_name = "PG_Sequence"
length = 5.0
length = 7.0
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
@ -170,7 +208,7 @@ tracks/3/path = NodePath("GUI/ReadySetPlant:text")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(2, 2.667, 3.334),
"times": PackedFloat32Array(2, 2.537, 3.154),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": ["ready", "set", "plant"]
@ -182,7 +220,7 @@ tracks/4/path = NodePath("GUI/ReadySetPlant:visible")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0, 2, 5),
"times": PackedFloat32Array(0, 2, 7),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [false, true, false]
@ -194,13 +232,28 @@ tracks/5/path = NodePath("Data")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(3.33333),
"times": PackedFloat32Array(3.15333),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [2],
"method": &"SetLevelState"
}]
}
tracks/6/type = "audio"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("ReadySetPlantPlayer")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"clips": [{
"end_offset": 0.0,
"start_offset": 0.0,
"stream": ExtResource("1_4gg2g")
}],
"times": PackedFloat32Array(2)
}
tracks/6/use_blend = true
[sub_resource type="Animation" id="Animation_yw4uo"]
length = 0.001
@ -354,7 +407,7 @@ tracks/5/keys = {
[sub_resource type="Animation" id="Animation_h1ksq"]
resource_name = "fade"
length = 4.0
length = 5.0
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
@ -415,6 +468,21 @@ tracks/4/keys = {
"update": 0,
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
}
tracks/5/type = "audio"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("GameOverPlayer")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"clips": [{
"end_offset": 0.0,
"start_offset": 0.0,
"stream": ExtResource("11_8vb7v")
}],
"times": PackedFloat32Array(0)
}
tracks/5/use_blend = true
[sub_resource type="Animation" id="Animation_y72yf"]
resource_name = "win"
@ -431,6 +499,35 @@ tracks/0/keys = {
"update": 0,
"values": [Color(1, 1, 0.92, 0), Color(1, 1, 0.92, 0), Color(1, 1, 0.92, 1)]
}
tracks/1/type = "audio"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("GameOverPlayer")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"clips": [{
"end_offset": 0.0,
"start_offset": 0.0,
"stream": ExtResource("12_y5tw7")
}],
"times": PackedFloat32Array(0)
}
tracks/1/use_blend = true
tracks/2/type = "method"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("ChannelPlayer")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(2),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"Play"
}]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_pb02i"]
_data = {
@ -455,6 +552,30 @@ distance = 135.0
normal = Vector2(1, 0)
distance = 139.0
[sub_resource type="AudioStreamInteractive" id="AudioStreamInteractive_4tlhg"]
clip_count = 2
clip_0/name = &"Grasswalk Standard"
clip_0/stream = ExtResource("34_tqd4v")
clip_0/auto_advance = 0
clip_1/name = &"Grasswalk Cool"
clip_1/stream = ExtResource("35_4gg2g")
clip_1/auto_advance = 1
clip_1/next_clip = 0
_transitions = {
Vector2i(0, 1): {
"fade_beats": 5.0,
"fade_mode": 3,
"from_time": 2,
"to_time": 0
},
Vector2i(1, 0): {
"fade_beats": 5.0,
"fade_mode": 4,
"from_time": 0,
"to_time": 0
}
}
[node name="StandardLevel" type="Node2D"]
[node name="MainAnimationPlayer" type="AnimationPlayer" parent="."]
@ -665,6 +786,15 @@ audioStream = ExtResource("12_6gkho")
channel = "button"
metadata/_custom_type_script = "uid://c36bj8u7jghc7"
[node name="GameOverPlayer" type="AudioStreamPlayer" parent="GameOverScreen"]
bus = &"SFXBus"
[node name="ChannelPlayer" type="Node" parent="GameOverScreen"]
script = ExtResource("11_p133p")
audioStream = ExtResource("18_i7rp7")
channel = "lightfill"
metadata/_custom_type_script = "uid://c36bj8u7jghc7"
[node name="GameOverZombie" type="CanvasLayer" parent="."]
process_mode = 3
layer = 12
@ -711,6 +841,7 @@ waveTimer = NodePath("WaveTimer")
approachNotificationTime = 5.0
player = NodePath("../GameOverScreen/AnimationPlayer")
rewardParent = NodePath("../RewardLayer")
firstWaveSound = ExtResource("32_xsaqy")
[node name="WaveTimer" type="Timer" parent="LevelRunner"]
one_shot = true
@ -733,6 +864,30 @@ shape = SubResource("WorldBoundaryShape2D_yw4uo")
[node name="InitialSpawner" type="Node" parent="."]
script = ExtResource("26_i7rp7")
[node name="HugeWavePlayer" type="Node" parent="."]
script = ExtResource("11_p133p")
audioStream = ExtResource("1_i7rp7")
channel = "huge_wave"
metadata/_custom_type_script = "uid://c36bj8u7jghc7"
[node name="LastWavePlayer" type="Node" parent="."]
script = ExtResource("11_p133p")
audioStream = ExtResource("1_xsaqy")
channel = "fl_wave"
metadata/_custom_type_script = "uid://c36bj8u7jghc7"
[node name="MusicController" type="AudioStreamPlayer" parent="."]
stream = SubResource("AudioStreamInteractive_4tlhg")
bus = &"MusicBus"
script = ExtResource("36_wwgye")
[node name="Timer" type="Timer" parent="MusicController"]
wait_time = 30.0
one_shot = true
ignore_time_scale = true
[node name="ReadySetPlantPlayer" type="AudioStreamPlayer" parent="."]
[connection signal="OnLevelStateChanged" from="Data" to="SunSpawner/Timer" method="OnLevelStateChanged"]
[connection signal="OnLevelStateChanged" from="Data" to="ZombieLevelPrevewer" method="OnLevelStateChanged"]
[connection signal="OnLevelStateChanged" from="Data" to="InitialSpawner" method="OnLevelStateChanged"]
@ -740,7 +895,9 @@ script = ExtResource("26_i7rp7")
[connection signal="pressed" from="GameOverScreen/VBoxContainer/ExitButton" to="GameOverScreen/VBoxContainer/TapPlayer" method="Play"]
[connection signal="timeout" from="SunSpawner/Timer" to="SunSpawner" method="Spawn"]
[connection signal="FinalWaveInitiated" from="LevelRunner" to="MainAnimationPlayer" method="play" binds= ["FW_Sequence"]]
[connection signal="HugeWaveApproachingCallback" from="LevelRunner" to="MusicController" method="OnHugeWaveApproaching"]
[connection signal="HugeWaveApproachingCallback" from="LevelRunner" to="MainAnimationPlayer" method="play" binds= ["HW_Sequence"]]
[connection signal="HugeWaveInitiated" from="LevelRunner" to="GUI/WaveProgress" method="OnHugeWaveApproached"]
[connection signal="ResourceChanged" from="LevelRunner" to="GUI/WaveProgress" method="SetLevelData"]
[connection signal="WaveChanged" from="LevelRunner" to="GUI/WaveProgress" method="OnWaveChanged"]
[connection signal="timeout" from="MusicController/Timer" to="MusicController" method="OnTimerTimeout"]

View file

@ -0,0 +1,24 @@
using Godot;
using Newlon.Components.Level;
public partial class ChooseYourSeedsMusic : AudioStreamPlayer
{
public override void _Ready()
{
RuntimeLevelData.Instance.OnLevelStateChanged += OnLevelStateChanged;
}
private void OnLevelStateChanged(RuntimeLevelData.LevelStates state)
{
if (state == RuntimeLevelData.LevelStates.ChooseYourSeeds)
{
Play();
}
else
{
var tween = CreateTween();
tween.TweenProperty(this, "volume_linear", 0, 1);
tween.TweenCallback(Callable.From(Stop));
}
}
}

View file

@ -0,0 +1 @@
uid://b4ysi1iutmju3

View file

@ -0,0 +1,41 @@
using Godot;
using Newlon.Components.Level;
using System;
public partial class MusicTransitioner : AudioStreamPlayer
{
private AudioStreamPlaybackInteractive playback;
private Timer timer;
public override void _Ready()
{
RuntimeLevelData.Instance.OnLevelStateChanged += OnLevelStateChanged;
timer = GetNode<Timer>("Timer");
}
private void OnLevelStateChanged(RuntimeLevelData.LevelStates state)
{
if (state == RuntimeLevelData.LevelStates.Game)
{
Play();
playback = (AudioStreamPlaybackInteractive)GetStreamPlayback();
VolumeLinear = 1;
}
else
{
var tween = CreateTween();
tween.TweenProperty(this, "volume_linear", 0, 1);
tween.TweenCallback(Callable.From(Stop));
}
}
public void OnHugeWaveApproaching()
{
playback.SwitchToClip(1);
timer.Start();
}
public void OnTimerTimeout()
{
playback.SwitchToClip(0);
}
}

View file

@ -0,0 +1 @@
uid://bnj5tlcpmep2o

View file

@ -63,8 +63,8 @@ public partial class SaveSerializer : Node
Settings.Music = parsed.MusicVolume;
Settings.Splash = parsed.SplashSeen;
AudioServer.SetBusVolumeDb(1, Mathf.LinearToDb((float)Settings.SFX));
AudioServer.SetBusVolumeDb(2, Mathf.LinearToDb((float)Settings.Music));
AudioServer.SetBusVolumeDb(2, Mathf.LinearToDb(Mathf.Exp((float)Settings.SFX) - 1));
AudioServer.SetBusVolumeDb(1, Mathf.LinearToDb(Mathf.Exp((float)Settings.Music) - 1));
var playerProgress = PlayerProgress.Instance;
playerProgress.MaxSeedpackets = parsed.SeedpacketSlots;

View file

@ -0,0 +1,12 @@
using Godot;
using System;
public partial class ScalableAudioPlayer : AudioStreamPlayer
{
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta)
{
if(PitchScale != (float)Engine.TimeScale)
PitchScale = (float)Engine.TimeScale * (float)Engine.TimeScale;
}
}

View file

@ -0,0 +1 @@
uid://wfjsgbg3fekl

View file

@ -12,7 +12,7 @@ public partial class AudioSlider : HSlider
[Export] private TYPE affects;
public override void _Ready()
{
DragEnded += OnDragEnded;
ValueChanged += OnValueChanged;
if (affects == TYPE.SFX)
{
SetValueNoSignal(Settings.SFX);
@ -23,20 +23,19 @@ public partial class AudioSlider : HSlider
}
}
private void OnDragEnded(bool hasChanged)
private void OnValueChanged(double value)
{
if (hasChanged)
if (affects == TYPE.SFX)
{
if (affects == TYPE.SFX)
{
Settings.SFX = Value;
AudioServer.SetBusVolumeDb(2, Mathf.LinearToDb((float)Value));
}
else
{
Settings.Music = Value;
AudioServer.SetBusVolumeDb(1, Mathf.LinearToDb((float)Value));
}
var volume = Mathf.LinearToDb(Mathf.Exp((float)value) - 1); ;
Settings.SFX = value;
AudioServer.SetBusVolumeDb(2, volume);
}
else
{
var volume = Mathf.LinearToDb(Mathf.Exp((float)value) - 1); ;
Settings.Music = value;
AudioServer.SetBusVolumeDb(1, volume);
}
}

View file

@ -53,5 +53,6 @@ public partial class FastForwardButton : Button
}
Engine.TimeScale = speed;
}
}

View file

@ -2,7 +2,7 @@ extends Node
func _on_play_button_pressed() -> void:
LevelController.call("StartLevel",preload("uid://dd3yegl1xo44m"),preload("uid://ds2js2vylygvy"))
LevelController.call("StartLevel",preload("uid://dd3yegl1xo44m"),preload("uid://ctbue7dex4umy"))
$ChannelPlayer.call("Play")

View file

@ -19,6 +19,7 @@ public partial class LevelRunner : Node
[Export] private float approachNotificationTime;
[Export] private AnimationPlayer player;
[Export] private Node rewardParent;
[Export] private AudioStream firstWaveSound;
[Signal] public delegate void ResourceChangedEventHandler(AdventureLevelResource resource);
[Signal] public delegate void WaveChangedEventHandler(int to);
[Signal] public delegate void HugeWaveApproachingCallbackEventHandler();
@ -68,6 +69,10 @@ public partial class LevelRunner : Node
EmitSignal(SignalName.FinalWaveInitiated);
return;
}
if (waveIndex == 0)
{
AudioSequencer.Play("fl_wave",firstWaveSound);
}
waveTimer.WaitTime = resource.waves[waveIndex].customWaveDelay > 0 ? resource.waves[waveIndex].customWaveDelay : resource.standardWaveDelay;
waveTimer.Start();