Example #1
0
        public static void InvokeCheckRoundEnd(ref bool force, ref bool allow, ref RoundSummary.LeadingTeam team, ref bool teamChanged)
        {
            CheckRoundEnd checkRoundEnd = CheckRoundEndEvent;

            if (checkRoundEnd == null)
            {
                return;
            }

            CheckRoundEndEvent ev = new CheckRoundEndEvent
            {
                LeadingTeam = team,
                ForceEnd    = force,
                Allow       = allow
            };

            checkRoundEnd.Invoke(ref ev);
            if (team != ev.LeadingTeam)
            {
                teamChanged = true;
            }
            team  = ev.LeadingTeam;
            allow = ev.Allow;
            force = ev.ForceEnd;
        }
Example #2
0
        public static void InvokeCheckRoundEnd(ref bool forceEnd, ref bool allow, ref RoundSummary.LeadingTeam leadingTeam, ref bool teamChanged)
        {
            if (CheckRoundEndEvent == null)
            {
                return;
            }

            CheckRoundEndEvent ev = new CheckRoundEndEvent
            {
                LeadingTeam = leadingTeam,
                ForceEnd    = forceEnd,
                Allow       = allow
            };

            CheckRoundEndEvent.Invoke(ref ev);

            teamChanged = leadingTeam != ev.LeadingTeam;
            leadingTeam = ev.LeadingTeam;
            allow       = ev.Allow;
            forceEnd    = ev.ForceEnd;
        }