added friendly and neutral peg, added disposition
This commit is contained in:
+3
-6
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user