20 lines
519 B
C#
20 lines
519 B
C#
|
|
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);
|
||
|
|
}
|
||
|
|
}
|