Add core game components including ConfigFileHandler, GameManager, SaveSystem, and UIManager

This commit is contained in:
2025-08-10 01:35:35 +02:00
parent 8467f67090
commit 4098d192af
31 changed files with 1347 additions and 2 deletions

View File

@@ -0,0 +1,31 @@
using Godot;
namespace Mr.BrickAdventures.scripts.components;
public partial class InvulnerabilityComponent : Node
{
[Export] public float Duration { get; set; } = 1f;
[Export] public FlashingComponent FlashingComponent { get; set; }
private bool _isInvulnerable = false;
public void Activate()
{
if (_isInvulnerable)
return;
_isInvulnerable = true;
FlashingComponent?.StartFlashing();
var timer = GetTree().CreateTimer(Duration);
timer.Timeout += Deactivate;
}
private void Deactivate()
{
_isInvulnerable = false;
FlashingComponent?.StopFlashing();
}
public bool IsInvulnerable() => _isInvulnerable;
}