// Update is called once per frame void Update() { TeamActions = TrackActions(); if (Input.GetKeyDown(KeyCode.P) || TeamActions <= 0) { //Trigger End Turn Events (eg: spawn units) if (PhaseEnd != null) { PhaseEnd.Invoke(CurrentTeam, TurnCount); } if (PhaseEndLate != null) { PhaseEndLate.Invoke(CurrentTeam, TurnCount); } //Pass Turn Control over to the next valid team. PassTurnControl(); //Trigger Start Turn Events (eg: heal from fort) if (PhaseStart != null) { PhaseStart.Invoke(CurrentTeam, TurnCount); } if (PhaseStartLate != null) { PhaseStartLate.Invoke(CurrentTeam, TurnCount); } } }
public void registerPhase(PhaseUpdator phase, PhaseStart start = null) { _PhaseList.Add(new PhaseItem(phase, start)); }
private void Start() { PhaseStart.Invoke(CurrentTeam, TurnCount); }
public PhaseItem(PhaseUpdator upd, PhaseStart stt) { IsStart = false; Starter = stt; Updator = upd; }