Particles system
This commit is contained in:
parent
30266b36cf
commit
0e5dee50f7
46 changed files with 643 additions and 200 deletions
|
|
@ -6,6 +6,7 @@ namespace Newlon.Components.GUI;
|
|||
|
||||
public partial class ShovelButton : TextureButton
|
||||
{
|
||||
[Export] private PackedScene particles;
|
||||
private void OnFocusExited()
|
||||
{
|
||||
ButtonPressed = false;
|
||||
|
|
@ -27,7 +28,10 @@ public partial class ShovelButton : TextureButton
|
|||
{
|
||||
if (PoolContainer.Instance.EntityField[i].TryGetValue(checkedPosition, out var entity) && entity is RuntimePlantData plantData)
|
||||
{
|
||||
plantData.Kill();
|
||||
plantData.Kill();
|
||||
|
||||
PoolContainer.Instance.SpawnParticles(particles, plantData.GlobalPosition + Vector2.Down * Utility.TileHeight/2.0f);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue