added friendly and neutral peg, added disposition

This commit is contained in:
2026-06-29 18:11:28 -04:00
parent ebdff1b200
commit 982c3e6786
16 changed files with 171 additions and 25 deletions
+3 -6
View File
@@ -14,7 +14,7 @@ public partial class PegController : TurnController
public List<PackedScene> _hostilePegScenes;
public List<Peg> _pegs = new();
public PlayerController _playerController;
public Dictionary<int, List<Tween>> _tweenStages = new();
public Dictionary<string, List<Tween>> _tweenStages = new();
public Tween _tween;
public XmlDocument _pegProbabilities = new();
@@ -62,7 +62,6 @@ public partial class PegController : TurnController
AddChild(newHostilePeg);
_pegsCreated++;
}
}
public void HandlePegTurn()
@@ -78,14 +77,13 @@ public partial class PegController : TurnController
{
Peg peg = _pegs[i];
bool pegActed = peg.Act(loop);
if (pegActed)
if (pegActed && noPegsActed)
{
noPegsActed = false;
}
}
loop++;
}
}
public void HandlePegClick(Node CLICKED_NODE, int CLICK_TYPE)
@@ -137,8 +135,7 @@ public partial class PegController : TurnController
public void ProcessTween()
{
_tweenStages = _tweenStages.OrderBy(s => s.Key).ToDictionary();
// GD.Print(string.Join(", ", _tweenStages.Keys));
_tweenStages = _tweenStages.OrderBy(s => s.Key.Split(":")[0]).ThenBy(s => s.Key.Split(":")[1]).ToDictionary();
if (_tweenStages.Count <= 0)
{
EndTurn();