Particles system
This commit is contained in:
parent
30266b36cf
commit
0e5dee50f7
46 changed files with 643 additions and 200 deletions
|
|
@ -10,7 +10,7 @@ public partial class PlantField : Node2D
|
|||
private PlantResource _resource;
|
||||
private Seedpacket _slot;
|
||||
private bool _previousCanPlace;
|
||||
|
||||
[Export] private PackedScene particles;
|
||||
public static PlantField Instance {get; private set;}
|
||||
|
||||
public override void _Ready()
|
||||
|
|
@ -97,6 +97,8 @@ public partial class PlantField : Node2D
|
|||
|
||||
RuntimeLevelData.Instance.SpendSun(_resource.Cost);
|
||||
|
||||
PoolContainer.Instance.SpawnParticles(particles, plant.GlobalPosition + Vector2.Down * Utility.TileHeight/2.0f);
|
||||
|
||||
// Unfocusing and recharging slot
|
||||
_slot.Recharge();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue