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,25 +0,0 @@
using Godot;
using Newlon.Components.Level;
namespace Newlon.Components.Plants;
//
// Data that plant stores during runtime
//
public partial class RuntimePlantData : Entity
{
public int Line { get; set; }
public PlantResource Resource;
private AudioStream eatenSound = ResourceLoader.Load<AudioStream>("res://assets/audio/sfx/gulp.mp3");
public override void KillByDamage()
{
AudioSequencer.Play("plant_eaten", eatenSound);
base.KillByDamage();
}
public override void Kill()
{
PoolContainer.Instance.EntityField[Resource.Layer].Remove(GlobalPosition);
QueueFree();
}
}