Audio system and rich text

This commit is contained in:
Rendo 2025-06-29 14:28:51 +05:00
commit 68cafff083
161 changed files with 1605 additions and 255 deletions

View file

@ -10,6 +10,7 @@ public partial class PlantField : Node2D
private PlantResource _resource;
private Seedpacket _slot;
private bool _previousCanPlace;
private ChannelPlayer player;
[Export] private PackedScene particles;
public static PlantField Instance {get; private set;}
@ -17,6 +18,7 @@ public partial class PlantField : Node2D
{
Instance = this;
_plantSetter = GetChild<Node2D>(0);
player = GetNode<ChannelPlayer>("PlantPlayer");
}
public void SetPlant(Seedpacket slot, PlantResource plant)
@ -99,6 +101,8 @@ public partial class PlantField : Node2D
PoolContainer.Instance.SpawnParticles(particles, plant.GlobalPosition + Vector2.Down * Utility.TileHeight/2.0f);
player.Play();
// Unfocusing and recharging slot
_slot.Recharge();
}