Exemplo n.º 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);
            }
        }
    }
Exemplo n.º 2
0
 public Phase(Dictionary <QuestNames, Quest> Quests, PhaseEnd PhaseEnd)
 {
     this.Quests   = Quests;
     this.PhaseEnd = PhaseEnd;
 }