Exemple #1
0
        public PauseScreen(ContentManager content, GraphicsDevice device, AudioManager audio, GameData data, World w, Camera cam)
            : base(content, device, audio, data)
        {
            //Mouse.SetPosition(512, 384);
            world = w;
            camera = cam;
            menuFont1 = content.Load<SpriteFont>("Fonts/MenuFont1");
            resumeRectangle = new Rectangle(725, 76, 63, 58);
            saveRectangle = new Rectangle(402, 225, 228, 43);
            exitRectangle = new Rectangle(402, 505, 228, 43);
            baseRectangle = new Rectangle(402, 393, 228, 43);
            charRectangle = new Rectangle(402, 281, 228, 43);
            missionRectangle = new Rectangle(402, 337, 228, 43);
            titleRectangle = new Rectangle(402, 449, 228, 43);
            helpRectangle = new Rectangle(671, 81, 56, 47);
            frameRectangle = saveRectangle;

            spriteBatch = new SpriteBatch(device);
            cursor = content.Load<Texture2D>("cursor");
            fadeRectangle = new Rectangle(0, 0, 1024, 768);

            userInterface = content.Load<Texture2D>("PauseMenu");
            frame = content.Load<Texture2D>("briefing_frame");
            interfaceRectangle = new Rectangle(0, 0, 1024, 768);
        }
        public MissionCompleteScreen(ContentManager content, GraphicsDevice device, AudioManager audio, GameData data, World w, Camera cam)
            : base(content, device, audio, data)
        {
            //Mouse.SetPosition(512, 384);
            world = w;
            camera = cam;
            menuFont1 = content.Load<SpriteFont>("Fonts/MenuFont1");
            spriteBatch = new SpriteBatch(device);
            cursor = content.Load<Texture2D>("cursor");
            userInterface = content.Load<Texture2D>("missionCompleteInterface");
            frame = content.Load<Texture2D>("briefing_frame");
            forestImg = content.Load<Texture2D>("Icons/forrest");
            wasteImg = content.Load<Texture2D>("Icons/wasteland");
            arcticImg = content.Load<Texture2D>("Icons/artic");

            interfaceRectangle = new Rectangle(0, 0, 1024, 768);
            exitRectangle = new Rectangle(891, 78, 63, 55);
            baseRectangle = new Rectangle(412,579,228,43);
            exploreRectangle = new Rectangle(664, 579, 228, 43);
            imageRectangle =new Rectangle(135,474,191,137);
            helpRectangle = new Rectangle(837, 81, 56, 47);
            frameRectangle = baseRectangle;

            setupRank();
        }
Exemple #3
0
        public Map(GameData data, World world, GraphicsDevice graphicsDevice, ContentManager Content, Point position)
        {
            spriteBatch = new SpriteBatch(graphicsDevice);
            this.data = data;
            this.world = world;

            enemy = Content.Load<Texture2D>("Map\\enemy");
            player = Content.Load<Texture2D>("Map\\player");
            ground = Content.Load<Texture2D>("Map\\ground");
            obstacle = Content.Load<Texture2D>("Map\\obstacle");
            none = Content.Load<Texture2D>("Map\\none");

            size = 5;

            mapRectangle = new Rectangle[Constants.MAP_SIZE*2][];

            for (int i = 0; i < Constants.MAP_SIZE*2; i++)
            {
                mapRectangle[i] = new Rectangle[Constants.MAP_SIZE*2];
                for (int j = 0; j < Constants.MAP_SIZE*2; j++)
                {
                    mapRectangle[i][j] = new Rectangle(position.X + i*size, position.Y + j*size, size, size);
                }
            }
        }
Exemple #4
0
        public BriefingScreen(ContentManager content, GraphicsDevice device, AudioManager audio, GameData data, World w, Camera cam)
            : base(content, device, audio, data)
        {
            //Mouse.SetPosition(512, 384);
            world = w;
            camera = cam;
            menuFont1 = content.Load<SpriteFont>("Fonts/MenuFont1");
            resumeRectangle = new Rectangle(234, 100, 246, 45);
            loadRectangle = new Rectangle(294, 200, 224, 45);
            exitRectangle = new Rectangle(891, 78, 63, 55);
            spriteBatch = new SpriteBatch(device);
            cursor = content.Load<Texture2D>("cursor");
            userInterface = content.Load<Texture2D>("briefing_interface");
            frame = content.Load<Texture2D>("briefing_frame");
            newIcon = content.Load<Texture2D>("Icons/new");
            interfaceRectangle = new Rectangle(0, 0, 1024, 768);
            forestRectangle = new Rectangle(145, 173, 200, 144);
            arcticRectangle = new Rectangle(145, 329, 200, 144);
            caveRectangle = new Rectangle(145, 485, 200, 144);
            bossRectangle = new Rectangle(379, 543, 542, 111);
            frameRectangle = new Rectangle(144, 171, 203, 149);
            startRectangle = new Rectangle(563, 464, 232, 47);
            new0Rectangle = new Rectangle(155, 170, 80, 45);
            new1Rectangle = new Rectangle(155, 326, 80, 45);
            new2Rectangle = new Rectangle(155, 483, 80, 45);
            new3Rectangle = new Rectangle(390, 543, 80, 45);
            newRectangles = new Rectangle[] {new0Rectangle, new1Rectangle, new2Rectangle, new3Rectangle};
            helpRectangle = new Rectangle(837, 81, 56, 47);

            data.missions.generate((byte)data.player.level);
            data.missions.update();
        }
Exemple #5
0
        public DexScreen(ContentManager content, GraphicsDevice device, GameData data, AudioManager audio, World w, Camera cam)
            : base(content, device, audio, data)
        {
            world = w;
            camera = cam;

            menuFont1 = content.Load<SpriteFont>("Fonts/MenuFont1");
            cursor = content.Load<Texture2D>("cursor");
            userInterface = content.Load<Texture2D>("dex_interface");
            frame = content.Load<Texture2D>("briefing_frame");
            heatEnemy = content.Load<Texture2D>("Icons\\heat_enemy");
            iceEnemy = content.Load<Texture2D>("Icons\\ice_enemy");
            plasmaEnemy = content.Load<Texture2D>("Icons\\plasma_enemy");
            bossEnemy = content.Load<Texture2D>("Icons\\boss_enemy");
            neutralEnemy = content.Load<Texture2D>("Icons\\neutral_enemy");

            spriteBatch = new SpriteBatch(device);

            interfaceRectangle = new Rectangle(0, 0, 1024, 768);
            bossRectangle = new Rectangle(106, 495, 154, 156);
            heatRectangle = new Rectangle(270, 495, 154, 156);
            iceRectangle = new Rectangle(434, 495, 154, 156);
            plasmaRectangle = new Rectangle(598, 495, 154, 156);
            neutralRectangle = new Rectangle(762, 495, 154, 156);
            activeEnemyRectangle = new Rectangle(153, 196, 223, 223);
            exitRectangle = new Rectangle(891, 78, 63, 55);
            helpRectangle = new Rectangle(837, 81, 56, 47);

            frameRectangle = bossRectangle;
            activeEnemyTexture = bossEnemy;

            descriptionString = "Cobra Commander\n???\n+++++\n+++++\n+";
            frameworkString = "Name:\nType:\nHealth:\nStrength:\nSpeed:";
        }
Exemple #6
0
 public GameScreen(ContentManager content, GraphicsDevice device, AudioManager audio, GameData data)
 {
     this.content = content;
     this.device = device;
     this.audio = audio;
     this.data = data;
     nextTheme = 0;
     nextZone = 0;
 }
Exemple #7
0
        public CreditsScreen(ContentManager content, GraphicsDevice device, AudioManager audio, GameData data)
            : base(content, device, audio, data)
        {
            //Mouse.SetPosition(512, 384);

            screenTexture = content.Load<Texture2D>("credits");
            screenRectangle = new Rectangle(0, 0, 1024, 768);
            backRectangle = new Rectangle(0, 33, 440, 56);

            spriteBatch = new SpriteBatch(device);
            cursor = content.Load<Texture2D>("cursor");
            this.data = data;
        }
Exemple #8
0
        public HelpScreen(ContentManager content, GraphicsDevice device, AudioManager audio, GameData data, int backCMD)
            : base(content, device, audio, data)
        {
            //Mouse.SetPosition(512, 384);

            screenTexture = content.Load<Texture2D>("help");
            screenRectangle = new Rectangle(0, 0, 1024, 768);
            backRectangle = new Rectangle(0, 33, 234, 56);

            spriteBatch = new SpriteBatch(device);
            cursor = content.Load<Texture2D>("cursor");
            this.data = data;
            backCommand = backCMD;
        }
Exemple #9
0
        public TitleScreen(ContentManager content, GraphicsDevice device, AudioManager audio, GameData data)
            : base(content, device, audio, data)
        {
            //Mouse.SetPosition(512, 384);
            menuFont1 = content.Load<SpriteFont>("Fonts/MenuFont1");
            newGameRectangle = new Rectangle(358, 290, 286, 45);
            loadRectangle = new Rectangle(402, 390, 214, 45);
            exitRectangle = new Rectangle(409, 490, 187, 45);
            creditsRectangle = new Rectangle(368, 590, 270, 45);

            spriteBatch = new SpriteBatch(device);
            cursor = content.Load<Texture2D>("cursor");
            this.data = data;
        }
Exemple #10
0
        public ActionScreen(ContentManager content, GraphicsDevice device, AudioManager audio, GameData data, Camera cam, World w)
            : base(content, device, audio, data)
        {
            Mouse.SetPosition(512, 384);
            camera = cam;
            world = w;

            font = content.Load<SpriteFont>("Fonts/ModFont");

            hud = content.Load<Texture2D>("hud");
            hudRectangle = new Rectangle(0, 0, 1024, 768);
            HP1 = content.Load<Texture2D>("hp_1");
            HP1Rectangle = new Rectangle(37, 49, 30, 30);
            HP = content.Load<Texture2D>("hp");
            HPRectangle = new Rectangle(67, 56, 200, 17);
            spriteBatch = new SpriteBatch(device);

            //stat mod icons
            red = content.Load<Texture2D>("Icons/redslot");
            blue = content.Load<Texture2D>("Icons/blueslot");
            violet = content.Load<Texture2D>("Icons/violetslot");
            green = content.Load<Texture2D>("Icons/greenslot");

            //type mod icons
            cyan = content.Load<Texture2D>("Icons/cyanslot");
            darkblue = content.Load<Texture2D>("Icons/darkblueslot");
            orange = content.Load<Texture2D>("Icons/orangeslot");

            //element mod icons
            lightgreen = content.Load<Texture2D>("Icons/lightgreenslot");
            foxred = content.Load<Texture2D>("Icons/foxredslot");
            white = content.Load<Texture2D>("Icons/whiteslot");

            Mod1Rectangle = new Rectangle(52, 676, 40, 39);
            Mod2Rectangle = new Rectangle(91, 649, 40, 39);
            Mod3Rectangle = new Rectangle(134, 672, 40, 39);
            Mod4Rectangle = new Rectangle(93, 699, 40, 39);
            ModRectangles = new Rectangle[] {Mod1Rectangle, Mod2Rectangle, Mod3Rectangle, Mod4Rectangle};

            spawnNewEnemies = false;
            timeInMission = new TimeSpan(0);
            data.missions.activeMission.timeSpent = timeInMission;

            blurEffect = new BlurEffect(device, content);

            miniMap = new Map(data, world, device, content, new Point(750, 500));
            canShoot = true;
            lowHP = false;
        }
Exemple #11
0
        public GameOverScreen(ContentManager content, GraphicsDevice device, AudioManager audio, GameData data, World w, Camera cam)
            : base(content, device, audio, data)
        {
            //Mouse.SetPosition(512, 384);
            world = w;
            camera = cam;
            baseRectangle = new Rectangle(390, 475, 245, 50);

            spriteBatch = new SpriteBatch(device);
            cursor = content.Load<Texture2D>("cursor");
            fadeRectangle = new Rectangle(0, 0, 1024, 768);

            userInterface = content.Load<Texture2D>("gameover");
            interfaceRectangle = new Rectangle(0, 0, 1024, 768);
        }
Exemple #12
0
        public CharScreen(ContentManager content, GraphicsDevice device, AudioManager audio, GameData data, World w, Camera cam)
            : base(content, device, audio, data)
        {
            world = w;
            camera = cam;

            menuFont1 = content.Load<SpriteFont>("Fonts/MenuFont1");
            cursor = content.Load<Texture2D>("cursor");
            userInterface = content.Load<Texture2D>("CharInfo");

            //stat mod icons
            red = content.Load<Texture2D>("Icons/redslot");
            blue = content.Load<Texture2D>("Icons/blueslot");
            violet = content.Load<Texture2D>("Icons/violetslot");
            green = content.Load<Texture2D>("Icons/greenslot");

            //type mod icons
            cyan = content.Load<Texture2D>("Icons/cyanslot");
            darkblue = content.Load<Texture2D>("Icons/darkblueslot");
            orange = content.Load<Texture2D>("Icons/orangeslot");

            //element mod icons
            lightgreen = content.Load<Texture2D>("Icons/lightgreenslot");
            foxred = content.Load<Texture2D>("Icons/foxredslot");
            white = content.Load<Texture2D>("Icons/whiteslot");

            spriteBatch = new SpriteBatch(device);

            interfaceRectangle = new Rectangle(0, 0, 1024, 768);

            exitRectangle = new Rectangle(726, 78, 63, 55);

            Mod1Rectangle = new Rectangle(296, 542, 40, 39);
            Mod2Rectangle = new Rectangle(335, 515, 40, 39);
            Mod3Rectangle = new Rectangle(378, 538, 40, 39);
            Mod4Rectangle = new Rectangle(337, 565, 40, 39);
            ModRectangles = new Rectangle[] { Mod1Rectangle, Mod2Rectangle, Mod3Rectangle, Mod4Rectangle };
            helpRectangle = new Rectangle(671, 81, 56, 47);

            weaponLabel = "";
            modStatLabel = "";

            modStats = data.player.myWeapon.modStats;

            generateLabels();
        }
Exemple #13
0
        public virtual void saveGame(GameData data)
        {
            SaveData saveData;
            XmlWriter writer;
            XmlWriterSettings settings;

            saveData = new SaveData();
            saveData.playerLevel = data.player.level;
            saveData.playerXP = data.player.XP;
            saveData.weaponMods = data.player.myWeapon.mods;
            saveData.mods = data.mods._content;
            saveData.firstModValue = data.mods.firstMod.value;
            saveData.missionLevels = new byte[4];
            saveData.missionTKinds = new byte[4];
            saveData.missionTCounts = new byte[4];
            saveData.missionZones = new byte[4];
            saveData.missionAreas = new byte[4];
            saveData.missionStates = new bool[4];
            saveData.missionKinds = new byte[4][];

            for (int i = 0; i < 4; i++)
            {
                saveData.missionLevels[i] = data.missions[i].level;
                saveData.missionTKinds[i] = data.missions[i].target;
                saveData.missionTCounts[i] = data.missions[i].tarCount;
                //saveData.missionKinds[i] = data.missions[i].Kinds;
                saveData.missionZones[i] = data.missions[i].Zone;
                saveData.missionAreas[i] = data.missions[i].Area;
                saveData.missionStates[i] = data.missions[i].active;
                saveData.missionKinds[i] = data.missions[i].Kinds;
            }

            string filename = "doNotTouchThis.Never";

            settings = new XmlWriterSettings();
            settings.Indent = true;

            writer = XmlWriter.Create(filename, settings);

            using (writer)
            {
                IntermediateSerializer.Serialize(writer, saveData, null);
            }
        }
Exemple #14
0
        public IntroductionScreen(ContentManager content, GraphicsDevice device, AudioManager audio, GameData data, SpriteBatch spriteBatch)
            : base(content, device, audio, data)
        {
            this.spriteBatch = spriteBatch;

            font = content.Load<SpriteFont>("Fonts/MenuFont1");
            userInterface = content.Load<Texture2D>("Introduction");
            heatIcon = content.Load<Texture2D>("Icons/mod_hea");
            plasmaIcon = content.Load<Texture2D>("Icons/mod_pla");
            iceIcon = content.Load<Texture2D>("Icons/mod_ice");
            cursor = content.Load<Texture2D>("cursor");

            time = new TimeSpan();
            interfaceRectangle = new Rectangle(0, 0, 1024, 768);
            heatRectangle = new Rectangle(265, 256, 150, 150);
            plasmaRectangle = new Rectangle(435, 256, 150, 150);
            iceRectangle = new Rectangle(605, 256, 150, 150);
            startRectangle = new Rectangle(120, 580, 780, 135);
            onesAndZeroes = new String[20];
            voice = new String[20];
            Random random = new Random();
            onesAndZeroesDrawTimer = 0;
            selectedElement = 4;

            for (int i=0; i<20;i++)
            {
                onesAndZeroes[i] = "";
                for (int j = 0; j < 50; j++)
                {
                    onesAndZeroes[i] += random.Next(2);
                }
            }

            voice[0] = "uploading program files";
            voice[1] = "connecting to main computer";
            voice[2] = "initiate training program";
            voice[3] = "testsubject is running now";
            voice[4] = "select an element of your choice";
            voice[5] = "heat element \nclick here to start training program";
            voice[6] = "plasma element \nclick here to start training program";
            voice[7] = "ice element \nclick here to start training program";
        }
Exemple #15
0
        public virtual void loadGame(GameData data)
        {
            string filename = "doNotTouchThis.Never";

            XmlReaderSettings settings = new XmlReaderSettings();
            SaveData saveData;
            XmlReader reader;

            reader = XmlReader.Create(filename, settings);
            using (reader)
            {
                saveData = IntermediateSerializer.Deserialize<SaveData>(reader, null);
            }

            byte[][] kinds = saveData.missionKinds;

            data.loadData(saveData.playerLevel, saveData.playerXP, saveData.weaponMods,
                saveData.mods, saveData.missionLevels, saveData.missionTKinds, saveData.missionTCounts,
                saveData.missionZones, saveData.missionAreas, saveData.missionStates, saveData.missionKinds, saveData.firstModValue);
        }
Exemple #16
0
        public StoryScreen(ContentManager content, GraphicsDevice device, AudioManager audio, GameData data, SpriteBatch spriteBatch)
            : base(content, device, audio, data)
        {
            this.spriteBatch = spriteBatch;
            font = content.Load<SpriteFont>("Fonts/MenuFont1");
            cursor = content.Load<Texture2D>("cursor");
            frame = content.Load<Texture2D>("briefing_frame");
            userInterface = content.Load<Texture2D>("ai_interface");
            interfaceRectangle = new Rectangle(0, 0, 1024, 768);
            startRectangle = new Rectangle(120, 580, 780, 135);

            time = new TimeSpan();
            voice = new String[20];

            voice[0] = "Welcome! You must be T,\nthe new research robot.";
            voice[1] = "I am Ai, the Mainframe.\nI will be watching over your progress.";
            voice[2] = "You are a new model and must be tested,\nbefore you can go on real missions.";
            voice[3] = "Your tests in this phase\n consist of defeating enemies.";
            voice[4] = "Try to get as far as you can!";
            voice[5] = "Click to continue...";
        }
Exemple #17
0
        public StoryScreen(ContentManager content, GraphicsDevice device, AudioManager audio, GameData data, SpriteBatch spriteBatch)
            : base(content, device, audio, data)
        {
            this.spriteBatch   = spriteBatch;
            font               = content.Load <SpriteFont>("Fonts/MenuFont1");
            cursor             = content.Load <Texture2D>("cursor");
            frame              = content.Load <Texture2D>("briefing_frame");
            userInterface      = content.Load <Texture2D>("ai_interface");
            interfaceRectangle = new Rectangle(0, 0, 1024, 768);
            startRectangle     = new Rectangle(120, 580, 780, 135);

            time  = new TimeSpan();
            voice = new String[20];

            voice[0] = "Welcome! You must be T,\nthe new research robot.";
            voice[1] = "I am Ai, the Mainframe.\nI will be watching over your progress.";
            voice[2] = "You are a new model and must be tested,\nbefore you can go on real missions.";
            voice[3] = "Your tests in this phase\n consist of defeating enemies.";
            voice[4] = "Try to get as far as you can!";
            voice[5] = "Click to continue...";
        }
Exemple #18
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here

            audio = new AudioManager(Content);
            camera = new Camera(GraphicsDevice.Viewport.AspectRatio);
            world = new World(Content, GraphicsDevice);
            data = new GameData(Content, GraphicsDevice, audio, world);
            screen = new TitleScreen(Content, GraphicsDevice, audio, data);
            myAction = new ActionScreen(Content, GraphicsDevice, audio, data, camera, world);
            audio.playBackground(0);

            fading = false;
            fadeOut = true;
            fadeFrames = 0;
            maxFadeFrames = 30;
            fadeRectangle = new Rectangle(0, 0, 1024, 768);

            base.Initialize();
        }
Exemple #19
0
        public ModificationScreen(ContentManager content, GraphicsDevice device, AudioManager audio, GameData data, World w, Camera cam)
            : base(content, device, audio, data)
        {
            //Mouse.SetPosition(512, 384);
            world = w;
            camera = cam;
            lastMouseState = ButtonState.Released;
            modFont = content.Load<SpriteFont>("Fonts/ModFont");
            loadRectangle = new Rectangle(294, 200, 224, 45);
            exitRectangle = new Rectangle(891, 78, 63, 55);

            spriteBatch = new SpriteBatch(device);
            cursor = content.Load<Texture2D>("cursor");
            userInterface = content.Load<Texture2D>("mod_interface");
            frame = content.Load<Texture2D>("briefing_frame");

            //stat mod icons
            i_mod_nil = content.Load<Texture2D>("Icons/mod_nil");
            i_mod_str = content.Load<Texture2D>("Icons/mod_str");
            i_mod_spd = content.Load<Texture2D>("Icons/mod_spd");
            i_mod_rcg = content.Load<Texture2D>("Icons/mod_rcg");
            i_mod_acp = content.Load<Texture2D>("Icons/mod_acp");

            //type mod icons
            i_mod_bla = content.Load<Texture2D>("Icons/mod_bla");
            i_mod_wav = content.Load<Texture2D>("Icons/mod_wav");
            i_mod_tri = content.Load<Texture2D>("Icons/mod_tri");

            //element mod icons
            i_mod_pla = content.Load<Texture2D>("Icons/mod_pla");
            i_mod_hea = content.Load<Texture2D>("Icons/mod_hea");
            i_mod_ice = content.Load<Texture2D>("Icons/mod_ice");

            interfaceRectangle = new Rectangle(0, 0, 1024, 768);
            frameRectangle = new Rectangle(174, 334, 105, 105);
            startRectangle = new Rectangle(196, 583, 190, 67);
            slot1Rectangle = new Rectangle(174, 334, 105, 105);
            slot2Rectangle = new Rectangle(307, 334, 105, 105);
            slot3Rectangle = new Rectangle(174, 466, 105, 105);
            slot4Rectangle = new Rectangle(307, 466, 105, 105);
            activeModRectangle=new Rectangle(264,186,60,60);
            activeModTextRectangle = new Rectangle(234, 258, 117, 49);
            dragDropRectangle = new Rectangle(174, 334, 40, 40);
            helpRectangle = new Rectangle(837, 81, 56, 47);
            #region Inventory Rectangles
            inventoryRectangle[0] = new Rectangle[5];
            inventoryRectangle[1] = new Rectangle[5];
            inventoryRectangle[2] = new Rectangle[5];
            inventoryRectangle[3] = new Rectangle[5];
            for(int i = 0; i<4; i++)
                for (int j = 0; j < 5; j++)
                {
                    inventoryRectangle[i][j]=new Rectangle(559+i*87, 217+j*86, 68, 68);
                }
            #endregion

            #region build modlist
            inventoryItems[0] = new ModItem[5];
            inventoryItems[1] = new ModItem[5];
            inventoryItems[2] = new ModItem[5];
            inventoryItems[3] = new ModItem[5];
            for (int i = 0; i < 4; i++)
                for (int j = 0; j < 5; j++)
                {
                    inventoryItems[i][j] = new ModItem(data.mods[i+j*4]);
                    switch (data.mods[i + j * 4].type)
                    {
                        case Constants.MOD_NIL: inventoryItems[i][j].icon = i_mod_nil; break;
                        case Constants.MOD_ELM:
                            switch (data.mods[i + j * 4].value)
                            {
                                case Constants.ELM_PLA: inventoryItems[i][j].icon = i_mod_pla; break;
                                case Constants.ELM_HEA: inventoryItems[i][j].icon = i_mod_hea; break;
                                case Constants.ELM_ICE: inventoryItems[i][j].icon = i_mod_ice; break;
                                default: inventoryItems[i][j].icon = i_mod_nil; break;
                            } break;
                        case Constants.MOD_TYP:
                            switch (data.mods[i + j * 4].value)
                            {
                                case Constants.TYP_BLA: inventoryItems[i][j].icon = i_mod_bla; break;
                                case Constants.TYP_WAV: inventoryItems[i][j].icon = i_mod_wav; break;
                                case Constants.TYP_TRI: inventoryItems[i][j].icon = i_mod_tri; break;
                                default: inventoryItems[i][j].icon = i_mod_nil; break;
                            } break;
                        case Constants.MOD_STR: inventoryItems[i][j].icon = i_mod_str; break;
                        case Constants.MOD_SPD: inventoryItems[i][j].icon = i_mod_spd; break;
                        case Constants.MOD_RCG: inventoryItems[i][j].icon = i_mod_rcg; break;
                        case Constants.MOD_ACP: inventoryItems[i][j].icon = i_mod_acp; break;
                        default: inventoryItems[i][j].icon = i_mod_nil; break;
                    }
                }

            slotItems = new ModItem[4];
            if (data.player.myWeapon.mods != null)
            {
                for (int i = 0; i < 4; i++)
                {
                    slotItems[i] = new ModItem(data.player.myWeapon.mods[i]);
                    switch (slotItems[i].modification.type)
                    {
                        case Constants.MOD_NIL: slotItems[i].icon = i_mod_nil; break;
                        case Constants.MOD_ELM:
                            switch (slotItems[i].modification.value)
                            {
                                case Constants.ELM_PLA: slotItems[i].icon = i_mod_pla; break;
                                case Constants.ELM_HEA: slotItems[i].icon = i_mod_hea; break;
                                case Constants.ELM_ICE: slotItems[i].icon = i_mod_ice; break;
                                default: slotItems[i].icon = i_mod_nil; break;
                            } break;
                        case Constants.MOD_TYP:
                            switch (slotItems[i].modification.value)
                            {
                                case Constants.TYP_BLA: slotItems[i].icon = i_mod_bla; break;
                                case Constants.TYP_WAV: slotItems[i].icon = i_mod_wav; break;
                                case Constants.TYP_TRI: slotItems[i].icon = i_mod_tri; break;
                                default: slotItems[i].icon = i_mod_nil; break;
                            } break;
                        case Constants.MOD_STR: slotItems[i].icon = i_mod_str; break;
                        case Constants.MOD_SPD: slotItems[i].icon = i_mod_spd; break;
                        case Constants.MOD_RCG: slotItems[i].icon = i_mod_rcg; break;
                        case Constants.MOD_ACP: slotItems[i].icon = i_mod_acp; break;
                        default: slotItems[i].icon = i_mod_nil; break;
                    }
                }

                #region
                //slot1Item = new ModItem(data.player.myWeapon.mods[0]);
                //switch (slot1Item.modification.type)
                //{
                //    case Constants.MOD_NIL: slot1Item.icon = i_mod_nil; break;
                //    case Constants.MOD_ELM:
                //        switch(slot1Item.modification.value) {
                //            case Constants.ELM_PLA: slot1Item.icon = i_mod_pla; break;
                //            case Constants.ELM_HEA: slot1Item.icon = i_mod_hea; break;
                //            case Constants.ELM_ICE: slot1Item.icon = i_mod_ice; break;
                //            default: slot1Item.icon = i_mod_nil; break;
                //        } break;
                //    case Constants.MOD_TYP:
                //        switch(slot1Item.modification.value) {
                //            case Constants.TYP_BLA: slot1Item.icon = i_mod_bla; break;
                //            case Constants.TYP_WAV: slot1Item.icon = i_mod_wav; break;
                //            case Constants.TYP_TRI: slot1Item.icon = i_mod_tri; break;
                //            default: slot1Item.icon = i_mod_nil; break;
                //        } break;
                //    case Constants.MOD_STR: slot1Item.icon = i_mod_str; break;
                //    case Constants.MOD_SPD: slot1Item.icon = i_mod_spd; break;
                //    case Constants.MOD_RCG: slot1Item.icon = i_mod_rcg; break;
                //    case Constants.MOD_ACP: slot1Item.icon = i_mod_acp; break;
                //    default: slot1Item.icon = i_mod_nil; break;
                //}
                //slot2Item = new ModItem(data.player.myWeapon.mods[1]);
                //switch (slot2Item.modification.type)
                //{
                //    case Constants.MOD_NIL: slot2Item.icon = i_mod_nil; break;
                //    case Constants.MOD_ELM:
                //        switch (slot2Item.modification.value)
                //        {
                //            case Constants.ELM_PLA: slot2Item.icon = i_mod_pla; break;
                //            case Constants.ELM_HEA: slot2Item.icon = i_mod_hea; break;
                //            case Constants.ELM_ICE: slot2Item.icon = i_mod_ice; break;
                //            default: slot2Item.icon = i_mod_nil; break;
                //        } break;
                //    case Constants.MOD_TYP:
                //        switch (slot2Item.modification.value)
                //        {
                //            case Constants.TYP_BLA: slot2Item.icon = i_mod_bla; break;
                //            case Constants.TYP_WAV: slot2Item.icon = i_mod_wav; break;
                //            case Constants.TYP_TRI: slot2Item.icon = i_mod_tri; break;
                //            default: slot2Item.icon = i_mod_nil; break;
                //        } break;
                //    case Constants.MOD_STR: slot2Item.icon = i_mod_str; break;
                //    case Constants.MOD_SPD: slot2Item.icon = i_mod_spd; break;
                //    case Constants.MOD_RCG: slot2Item.icon = i_mod_rcg; break;
                //    case Constants.MOD_ACP: slot2Item.icon = i_mod_acp; break;
                //    default: slot2Item.icon = i_mod_nil; break;
                //}
                //slot3Item = new ModItem(data.player.myWeapon.mods[2]);
                //switch (slot3Item.modification.type)
                //{
                //    case Constants.MOD_NIL: slot3Item.icon = i_mod_nil; break;
                //    case Constants.MOD_ELM:
                //        switch (slot3Item.modification.value)
                //        {
                //            case Constants.ELM_PLA: slot3Item.icon = i_mod_pla; break;
                //            case Constants.ELM_HEA: slot3Item.icon = i_mod_hea; break;
                //            case Constants.ELM_ICE: slot3Item.icon = i_mod_ice; break;
                //            default: slot3Item.icon = i_mod_nil; break;
                //        } break;
                //    case Constants.MOD_TYP:
                //        switch (slot3Item.modification.value)
                //        {
                //            case Constants.TYP_BLA: slot3Item.icon = i_mod_bla; break;
                //            case Constants.TYP_WAV: slot3Item.icon = i_mod_wav; break;
                //            case Constants.TYP_TRI: slot3Item.icon = i_mod_tri; break;
                //            default: slot3Item.icon = i_mod_nil; break;
                //        } break;
                //    case Constants.MOD_STR: slot3Item.icon = i_mod_str; break;
                //    case Constants.MOD_SPD: slot3Item.icon = i_mod_spd; break;
                //    case Constants.MOD_RCG: slot3Item.icon = i_mod_rcg; break;
                //    case Constants.MOD_ACP: slot3Item.icon = i_mod_acp; break;
                //    default: slot3Item.icon = i_mod_nil; break;
                //}
                //slot4Item = new ModItem(data.player.myWeapon.mods[3]);
                //switch (slot4Item.modification.type)
                //{
                //    case Constants.MOD_NIL: slot4Item.icon = i_mod_nil; break;
                //    case Constants.MOD_ELM:
                //        switch (slot4Item.modification.value)
                //        {
                //            case Constants.ELM_PLA: slot4Item.icon = i_mod_pla; break;
                //            case Constants.ELM_HEA: slot4Item.icon = i_mod_hea; break;
                //            case Constants.ELM_ICE: slot4Item.icon = i_mod_ice; break;
                //            default: slot4Item.icon = i_mod_nil; break;
                //        } break;
                //    case Constants.MOD_TYP:
                //        switch (slot4Item.modification.value)
                //        {
                //            case Constants.TYP_BLA: slot4Item.icon = i_mod_bla; break;
                //            case Constants.TYP_WAV: slot4Item.icon = i_mod_wav; break;
                //            case Constants.TYP_TRI: slot4Item.icon = i_mod_tri; break;
                //            default: slot4Item.icon = i_mod_nil; break;
                //        } break;
                //    case Constants.MOD_STR: slot4Item.icon = i_mod_str; break;
                //    case Constants.MOD_SPD: slot4Item.icon = i_mod_spd; break;
                //    case Constants.MOD_RCG: slot4Item.icon = i_mod_rcg; break;
                //    case Constants.MOD_ACP: slot4Item.icon = i_mod_acp; break;
                //    default: slot4Item.icon = i_mod_nil; break;
                //}
                #endregion
            }

            slot1Item = slotItems[0];
            slot2Item = slotItems[1];
            slot3Item = slotItems[2];
            slot4Item = slotItems[3];

            #endregion

            dragDropActive = false;
        }
Exemple #20
0
        public BriefingScreen(ContentManager content, GraphicsDevice device, AudioManager audio, GameData data, World w, Camera cam)
            : base(content, device, audio, data)
        {
            //Mouse.SetPosition(512, 384);
            world              = w;
            camera             = cam;
            menuFont1          = content.Load <SpriteFont>("Fonts/MenuFont1");
            resumeRectangle    = new Rectangle(234, 100, 246, 45);
            loadRectangle      = new Rectangle(294, 200, 224, 45);
            exitRectangle      = new Rectangle(891, 78, 63, 55);
            spriteBatch        = new SpriteBatch(device);
            cursor             = content.Load <Texture2D>("cursor");
            userInterface      = content.Load <Texture2D>("briefing_interface");
            frame              = content.Load <Texture2D>("briefing_frame");
            newIcon            = content.Load <Texture2D>("Icons/new");
            interfaceRectangle = new Rectangle(0, 0, 1024, 768);
            forestRectangle    = new Rectangle(145, 173, 200, 144);
            arcticRectangle    = new Rectangle(145, 329, 200, 144);
            caveRectangle      = new Rectangle(145, 485, 200, 144);
            bossRectangle      = new Rectangle(379, 543, 542, 111);
            frameRectangle     = new Rectangle(144, 171, 203, 149);
            startRectangle     = new Rectangle(563, 464, 232, 47);
            new0Rectangle      = new Rectangle(155, 170, 80, 45);
            new1Rectangle      = new Rectangle(155, 326, 80, 45);
            new2Rectangle      = new Rectangle(155, 483, 80, 45);
            new3Rectangle      = new Rectangle(390, 543, 80, 45);
            newRectangles      = new Rectangle[] { new0Rectangle, new1Rectangle, new2Rectangle, new3Rectangle };
            helpRectangle      = new Rectangle(837, 81, 56, 47);

            data.missions.generate((byte)data.player.level);
            data.missions.update();
        }