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