Added final features for this release. Now only polishing (if needed) remains.

Features: Sacrifice-Node, Maintain-Node, Options for screen type, lightcolor and soundvolume, tied in sound effects, game pause when menu is open, visibly open up gate when opening it.
This commit is contained in:
2026-05-10 14:09:14 +02:00
parent 228e81ab4e
commit 8170b700b2
28 changed files with 797 additions and 14 deletions
+44
View File
@@ -0,0 +1,44 @@
using Godot;
public partial class SoundManager : Node
{
private static SoundManager instance;
[Export] private AudioStreamPlayer buttonSound;
[Export] private AudioStreamPlayer miningSound;
public override void _Ready()
{
instance = this;
}
public override void _ExitTree()
{
if (instance == this)
{
instance = null;
}
}
public static void PlayButton()
{
if (instance == null || instance.buttonSound == null) return;
instance.buttonSound.Play();
}
public static void PlayMining()
{
if (instance == null || instance.miningSound == null) return;
instance.miningSound.Play();
}
public static void SetMasterVolume(float percent)
{
percent = Mathf.Clamp(percent, 0f, 1f);
int busIndex = AudioServer.GetBusIndex("Master");
AudioServer.SetBusVolumeDb(busIndex, Mathf.LinearToDb(percent));
AudioServer.SetBusMute(busIndex, percent <= 0f);
}
}