file refactor

This commit is contained in:
Rendo 2025-07-11 22:35:36 +05:00
commit bffb012a26
175 changed files with 1086 additions and 1107 deletions

View file

@ -1,26 +0,0 @@
using Godot;
using Newlon.Components.Level;
using Newlon.Components.Zombies;
namespace Newlon.Components.Plants;
public partial class ExplosionComponent : Area2D
{
[Export] private int damage;
[Export] private PackedScene particles;
public void Explode()
{
foreach (var zombie in GetOverlappingAreas())
{
var zombieData = zombie.GetParent<RuntimeZombieData>();
zombieData?.TakeDamage(damage, GetParent());
}
PoolContainer.Instance.SpawnParticles(particles, GetParent<RuntimePlantData>().GlobalPosition);
GetNode<ChannelPlayer>("ExplosionPlayer").Play();
GetParent<RuntimePlantData>().Kill();
}
}