// 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); } } }
private void Start() { PhaseStart.Invoke(CurrentTeam, TurnCount); }