Exemple #1
0
        /*PURPOSE: This public class is the Level public class. As all levels "do" the same things, with perhaps a few exceptions, there is no need
         *     to repeat code. Thus this public class will serve as a template for all "real" levels to be based on. Thus whatever this
         *     public class can do, the "real" levels can too.
         */

        protected Level(Gametype gT, Dictionary <Type, int> pL, Vector2 lS)
        {
            //Set up gametype
            typeOfGame = gT;
            cameras    = new CameraManager(pL, DEFAUT_SCREEN_SIZE);

            SizeOfLevel = lS;

            sniperSpots = new List <Vector2>();
        }
Exemple #2
0
        /*PURPOSE: This public class is the Level public class. As all levels "do" the same things, with perhaps a few exceptions, there is no need
         *     to repeat code. Thus this public class will serve as a template for all "real" levels to be based on. Thus whatever this
         *     public class can do, the "real" levels can too.
         */

        protected Level(Gametype gT, Dictionary <Type, int> pL, Vector2 lS, TextureManager tM, AudioManager audio)
        {
            //Set up gametype
            typeOfGame = gT;
            cameras    = new CameraManager(pL, gT, DEFAUT_SCREEN_SIZE);

            SizeOfLevel = lS;

            sniperSpots = new List <Vector2>();

            textures = tM;

            sounds = audio;
        }
Exemple #3
0
        public CameraManager(Dictionary <Type, int> pL, Gametype gT, Vector2 sS)
        {
            fullSize     = new Viewport(new Rectangle(0, 0, (int)sS.X, (int)sS.Y));
            safeArea     = fullSize.TitleSafeArea;
            rumbleAmount = new int[4];
            for (int i = 0; i < rumbleAmount.Length; i++)
            {
                rumbleAmount[i] = 0;
            }

            //Get sizes
            if (pL.Count == 1)
            {
                width  = (int)sS.X;
                height = (int)sS.Y;
            }
            else if (pL.Count == 2)
            {
                width  = (int)sS.X;
                height = (int)sS.Y / 2;

                SplitScreen = new Sprite("HUD/2playerSplit", sS / 2);
            }
            else
            {
                width  = (int)sS.X / 2;
                height = (int)sS.Y / 2;

                SplitScreen = new Sprite("HUD/4playerSplit", sS / 2);
            }

            cameras = new List <Camera>();
            huds    = new List <HUD>();
            for (int i = 0; i < pL.Count; i++)
            {
                cameras.Add(new Camera(pL.Keys.ElementAt(i), new Rectangle((i / 2) * width, (i % 2) * height, width, height),
                                       pL.Values.ElementAt(i), gT.GetTeammaterColor(pL.Keys.ElementAt(i))));
                huds.Add(new HUD(cameras[i], i, gT.GetTeams().Count, pL.Count <= 2));
            }

            pauseScreen       = new Sprite("HUD/pauseOverlay", sS / 2);
            pauseInstructions = new Sprite("HUD/buttons", sS / 2);

            pauserIndex = 0;
        }
Exemple #4
0
        public ManagerHelper(TextureManager tM, NPCManager nM, ProjectileManager pM, EnvironmentManager eM,
                             CameraManager cM, Gametype tG, Level l, PathHelper pH, AudioManager aM, ParticleManager ptM,
                             SpawnHelper sH, AbilityManager abM, StatisticsManager sM)
        {
            textures    = tM;
            agents      = nM;
            projectiles = pM;
            objects     = eM;
            cameras     = cM;
            theLevel    = l;
            paths       = pH;
            sounds      = aM;
            particles   = ptM;
            spawns      = sH;
            abilities   = abM;
            statistics  = sM;

            typeOfGame = tG;
            rand       = new Random();
        }
Exemple #5
0
 public Archipelago(Gametype gT, Dictionary <Type, int> pL, TextureManager tM, AudioManager audio) :
     base(gT, pL, new Vector2(1312, 992), tM, audio)
 {
 }
Exemple #6
0
 public Switch(Gametype gT, Dictionary <Type, int> pL, TextureManager tM, AudioManager audio) :
     base(gT, pL, new Vector2(800, 800), tM, audio)
 {
 }
Exemple #7
0
 public Plaza(Gametype gT, Dictionary <Type, int> pL, TextureManager tM, AudioManager audio) :
     base(gT, pL, new Vector2(1296, 976), tM, audio)
 {
 }
Exemple #8
0
 public Caged(Gametype gT, Dictionary <Type, int> pL, TextureManager tM, AudioManager audio) :
     base(gT, pL, new Vector2(864, 544), tM, audio)
 {
 }
Exemple #9
0
 public Relic(Gametype gT, Dictionary <Type, int> pL, TextureManager tM, AudioManager audio) :
     base(gT, pL, new Vector2(1088, 864), tM, audio)
 {
 }
Exemple #10
0
        public PreGame(Level level, Gametype game, PlayerIndex indexOfHost, TextureManager loadedTextures, AudioManager audio)
            : base(null, new Dictionary <Type, int>(), Vector2.Zero, loadedTextures, audio)
        {
            nextLevel = level;
            nextGame  = game;
            hostIndex = indexOfHost;

            timer     = 5;
            beginTime = 0;

            redPos    = new Vector2(-1000, 0);
            bluePos   = new Vector2(-1000, 0);
            greenPos  = new Vector2(-1000, 0);
            yellowPos = new Vector2(-1000, 0);

            on      = "on";
            mapName = nextLevel.ToString();

            initalizeTeamImages();
            initalizeBackground();



            //bases = new Sprite("Backgrounds/PreGame/tipsBases", picturePos);

            #region TIP DECLARATIONS


            this.DictTip = new Dictionary <Gametype.GT, Tip[]>();

            Tip[] assassinsTips = new Tip[4];
            assassinsTips[0] = new Tip("Mustachio's ability does damage over time.");
            assassinsTips[1] = new Tip("Not only does Aquoes' ability slow enemies" + "\n"
                                       + "but it also heals himself and his allies.");
            assassinsTips[2] = new Tip("Terron's ability deals damage if it hits an" + "\n"
                                       + "enemy.");
            assassinsTips[3] = new Tip("Dian's ability does damage to any enemy Dot" + "\n"
                                       + "that walks through the lightning.");
            this.DictTip.Add(Gametype.GT.ASSASSINS, assassinsTips);

            Tip[] assaultTips = new Tip[2];
            assaultTips[0] = new Tip("Assault is a game of offense and defense. " + "\n"
                                     + "Be wary of other commanders!");
            assaultTips[1] = new Tip("Only Commanders and Grunts can take the flag.");
            this.DictTip.Add(Gametype.GT.ASSAULT, assaultTips);

            Tip[] conquestTips = new Tip[7];
            conquestTips[0] = new Tip("Mustachio's ability to deal large amounts" + "\n"
                                      + "of damage makes it a great for base control.");
            conquestTips[1] = new Tip("Aquoes's ability has many uses in Conquest." + "\n"
                                      + "It can be used to defend bases or heal " + "\n"
                                      + "troops to siege an enemy's base.");
            conquestTips[2] = new Tip("Use Terron's ability to keep enemies away " + "\n"
                                      + "from your bases or to give yourself cover " + "\n"
                                      + "while you take theirs.");
            conquestTips[3] = new Tip("Dian's ability can be used to shred through " + "\n"
                                      + "enemies that try to go on the offensive.");
            conquestTips[4] = new Tip("When capturing a base, the base will change " + "\n"
                                      + "to the color of the team, not necessarily the" + "\n"
                                      + "color of the individual unit that captured it.");
            conquestTips[5] = new Tip("Be wary of airstrikes while attempting to" + "\n"
                                      + "capture a base.");
            conquestTips[6] = new Tip("Only Commanders and Grunts can capture bases.");
            this.DictTip.Add(Gametype.GT.CONQUEST, conquestTips);

            Tip[] ctfTips = new Tip[5];
            ctfTips[0] = new Tip("Mustachio's ability can be used to easily" + "\n"
                                 + "shut down an enemy flag runner or mow through" + "\n"
                                 + "a crowd while trying to make a capture.");
            ctfTips[1] = new Tip("Aquoes can keep enemies off his trail by" + "\n"
                                 + "using his ability to slow anyone coming " + "\n"
                                 + "after him.");
            ctfTips[2] = new Tip("Terron's boulders are great for blocking" + "\n"
                                 + "off paths and stopping persuing enemies.");
            ctfTips[3] = new Tip("Dian has amazing mobility thanks to her" + "\n"
                                 + "ability, making her very effective at" + "\n"
                                 + "capturing flags.");
            ctfTips[4] = new Tip("Only Grunts and Commanders can capture flags.");
            this.DictTip.Add(Gametype.GT.CTF, ctfTips);

            Tip[] deathmatchTips = new Tip[6];
            deathmatchTips[0] = new Tip("Coming face-to-face with a Gunner is almost " + "\n"
                                        + "certain death. Try to take a Gunner out from" + "\n"
                                        + "a distance by using grenades.");
            deathmatchTips[1] = new Tip("Rockets explode, and can take out many allied" + "\n"
                                        + "units at once. Beware the Specialist.");
            deathmatchTips[2] = new Tip("The Medic heals nearby allies.");
            deathmatchTips[3] = new Tip("The Bombardier calls in devastating airstrikes." + "\n"
                                        + "A large reticle will appear to indicate their " + "\n"
                                        + "target.");
            deathmatchTips[4] = new Tip("Keep an eye out for Snipers, who can kill" + "\n"
                                        + "you from afar.");
            deathmatchTips[5] = new Tip("The Juggernaut will try to act as a shield for" + "\n"
                                        + "his allies. Dispatch them by tossing grenades" + "\n"
                                        + "behind them.");
            this.DictTip.Add(Gametype.GT.DEATHMATCH, deathmatchTips);

            Tip[] survivalTips = new Tip[9];
            survivalTips[0] = new Tip("Gray dots will become faster over time.");
            survivalTips[1] = new Tip("You cannot kill one another in Survival.");
            survivalTips[2] = new Tip("Gray dots will become faster over time.");
            survivalTips[3] = new Tip("You cannot kill other commanders in Survival.");
            survivalTips[4] = new Tip("Gray dots will become faster over time.");
            survivalTips[5] = new Tip("You cannot kill other commanders in Survival.");
            survivalTips[6] = new Tip("Gray dots will become faster over time.");
            survivalTips[7] = new Tip("You cannot kill other commanders in Survival.");
            survivalTips[8] = new Tip("SIE SIND DAS ESSEN UND WIR SIND DIE JAGER!");
            this.DictTip.Add(Gametype.GT.SURVIVAL, survivalTips);
            #endregion
        }