Particles system
This commit is contained in:
parent
30266b36cf
commit
0e5dee50f7
46 changed files with 643 additions and 200 deletions
|
|
@ -11,7 +11,7 @@ public partial class PauseMenu : Control
|
|||
|
||||
public void Continue()
|
||||
{
|
||||
Visible = false;
|
||||
GetParent<Control>().Visible = false;
|
||||
GetTree().Paused = false;
|
||||
}
|
||||
public void Restart()
|
||||
|
|
@ -26,7 +26,7 @@ public partial class PauseMenu : Control
|
|||
}
|
||||
public static void Pause()
|
||||
{
|
||||
Instance.Visible = true;
|
||||
Instance.GetParent<Control>().Visible = true;
|
||||
Instance.GetTree().Paused = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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