Exemplo n.º 1
0
        private IEnumerator RoundPlaying()
        {
            // As soon as the round begins playing let the players control the tanks.
            EnableTankControl();

            // Clear the text from the screen.
            m_MessageText.text = string.Empty;

            // While there is not one tank left...
            while (!OneTankLeft())
            {
                // Trigger the 'Heavy Duty Traveler' highlight if the tank has covered a specified distance
                if (!HeavyDutyTravelerAchievement && TraveledAGoodDistance())
                {
                    // Create a screenshot highlight 'Heavy Duty Traveler' and associate it with the 'Misc Group' group.
                    Highlights.ScreenshotHighlightParams shp = new Highlights.ScreenshotHighlightParams();
                    shp.groupId     = "MISC_GROUP";
                    shp.highlightId = "HEAVY_DUTY_TRAVELER";
                    Highlights.SetScreenshotHighlight(shp);

                    HeavyDutyTravelerAchievement = true;
                }

                // ... return on the next frame.
                yield return(null);
            }

            // Trigger 'Kaboom' highlight every other round
            if (m_RoundNumber % 2 == 0)
            {
                // Create a screenshot highlight 'Kaboom' and associate it with the 'Shot Highlight Group' group.
                Highlights.ScreenshotHighlightParams shp = new Highlights.ScreenshotHighlightParams();
                shp.groupId     = "SHOT_HIGHLIGHT_GROUP";
                shp.highlightId = "KABOOM";
                Highlights.SetScreenshotHighlight(shp);
            }


            // Trigger 'Hurt Me Plenty' video highlight after the third round
            if (m_RoundNumber == 3)
            {
                // Create a video highlight 'Hurt Me Plenty' and associate it with the 'Shot Highlight Group' group.
                Highlights.VideoHighlightParams vhp = new Highlights.VideoHighlightParams();
                vhp.groupId     = "SHOT_HIGHLIGHT_GROUP";
                vhp.highlightId = "HURT_ME_PLENTY";
                // Provide start and end times for the video being captured. Negative values indicate events in the past. Unit is milliseconds
                vhp.startDelta = -3000;
                vhp.endDelta   = 2000;
                Highlights.SetVideoHighlight(vhp);
            }
        }