Added Farming SFX
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
using Godot;
|
||||
|
||||
namespace Babushka.scripts.CSharp.Common;
|
||||
|
||||
public partial class AudioPlayer : AudioStreamPlayer2D
|
||||
{
|
||||
/// <summary>
|
||||
/// For SFX and other audio that should be played only once and not looped.
|
||||
/// </summary>
|
||||
public void PlayOneShot()
|
||||
{
|
||||
Play();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://cfnrd5k1k0gxw
|
||||
@@ -9,6 +9,8 @@ public partial class FieldService2D : Node2D
|
||||
[Export] private Dictionary<Vector2I, FieldBehaviour2D> fields = new Dictionary<Vector2I, FieldBehaviour2D>();
|
||||
|
||||
private bool _fieldAllowed = false;
|
||||
|
||||
[Signal] public delegate void FieldCreatedEventHandler();
|
||||
|
||||
//Validate
|
||||
|
||||
@@ -33,6 +35,7 @@ public partial class FieldService2D : Node2D
|
||||
if (!fields.ContainsKey(key))
|
||||
{
|
||||
fields.Add(key, field);
|
||||
EmitSignal(SignalName.FieldCreated);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user