mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-21 09:03:47 +00:00
Mainframe
This commit is contained in:
parent
fc833ae300
commit
a13355be42
16 changed files with 369 additions and 13 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue