Mainframe

This commit is contained in:
MaddoScientisto 2025-02-22 19:06:30 +01:00
commit a13355be42
16 changed files with 369 additions and 13 deletions

View file

@ -6,6 +6,7 @@ using Cirno.Scripts.Resources;
public partial class Barrel : Area2D, IDestructible
{
[Export] public bool Indestructible { get; private set; }
[Export] public float Health = 1f;
[Export] public float ExplosionRadius = 1;
@ -132,7 +133,7 @@ public partial class Barrel : Area2D, IDestructible
public void Hit(float damage, DamageType damageType = DamageType.Neutral)
{
if (_isDestroyed) return;
if (_isDestroyed || Indestructible) return;
_currentHealth -= damage;
if (_currentHealth > 0) return;