Basic fighting system
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using Godot;
|
||||
namespace Babushka.scripts.CSharp.Common.Fight;
|
||||
|
||||
public partial class FightStarter : Node
|
||||
{
|
||||
[Export(PropertyHint.ArrayType)] private PackedScene[] enemies;
|
||||
[Export] private FightInstance _fightInstance;
|
||||
[Export] private bool _once = true;
|
||||
private bool hasBeenStarted = false;
|
||||
|
||||
public void Start(Node2D _)
|
||||
{
|
||||
if (_once && hasBeenStarted)
|
||||
return;
|
||||
|
||||
hasBeenStarted = true;
|
||||
FightManager.Instance.StartFight(enemies, _fightInstance);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user