コード例 #1
0
        public EnemyManager()
        {
            mList  = new List <BaseEnemy>();
            mGroup = new GameObjectsGroup <BaseEnemy>();

            mTimeIntervalBetweenEnemies = cTIME_BETWEEN_ENEMIES;
        }
コード例 #2
0
        private HUD()
        {
            mRectHead = new Rectangle(20,
                                      10,
                                      100,
                                      100);

            mRectPlayerBarEnergy = new Rectangle(128,
                                                 566,
                                                 181,
                                                 23);

            mRectPlayerBar = new Rectangle(128,
                                           564,
                                           181,
                                           27);

            mRectBarEnergy = new Rectangle(315,
                                           566,
                                           0,
                                           23);

            mRectBar = new Rectangle(315,
                                     564,
                                     182,
                                     27);


            mRectColorSlot1 = new Rectangle(574, 535, 70, 70);
            mRectColorSlot2 = new Rectangle(634, 512, 70, 70);
            mRectColorSlot3 = new Rectangle(695, 535, 70, 66);

            /*mRectColorSlot1 = new Rectangle(574 - 260, 535, 70, 70);
             * mRectColorSlot2 = new Rectangle(634 - 260, 512, 70, 70);
             * mRectColorSlot3 = new Rectangle(695 - 260, 535, 70, 66);
             */
            mButtonRed   = new Button("gameplay\\hud\\new\\balde_red", "gameplay\\hud\\new\\balde_red_selected", "gameplay\\hud\\new\\balde_red_selected", mRectColorSlot1);
            mButtonGreen = new Button("gameplay\\hud\\new\\balde_green", "gameplay\\hud\\new\\balde_green_selected", "gameplay\\hud\\new\\balde_green_selected", mRectColorSlot2);
            mButtonBlue  = new Button("gameplay\\hud\\new\\balde_blue", "gameplay\\hud\\new\\balde_blue_selected", "gameplay\\hud\\new\\balde_blue_selected", mRectColorSlot3);

            //mButtonPause = new Button("gameplay\\hud\\new\\pause", "gameplay\\hud\\new\\pause_select", "gameplay\\hud\\new\\pause_selected", new Rectangle(727, 28, 54, 63));

            mButtonRed.setCollisionRect(19, 19, 33, 33);
            mButtonGreen.setCollisionRect(19, 19, 33, 33);
            mButtonBlue.setCollisionRect(19, 19, 33, 33);
            //mButtonPause.setCollisionRect(0, 0, 70, 70);

            SoundManager.LoadSound(cSOUND_COLOR);

            mGroupButtons = new GameObjectsGroup <Button>();
            mGroupButtons.addGameObject(mButtonRed);
            mGroupButtons.addGameObject(mButtonGreen);
            mGroupButtons.addGameObject(mButtonBlue);
            //mGroupButtons.addGameObject(mButtonPause);
        }
コード例 #3
0
        private void init()
        {
            mSpriteBatch = Game1.getInstance().getScreenManager().getSpriteBatch();

            mBackground = new Background("mainmenu\\help\\bg_listras");
            mBackground.loadContent(Game1.getInstance().getScreenManager().getContent());

            mBackgroundImage = new Background("mainmenu\\help\\01_objective");
            mBackgroundImage.loadContent(Game1.getInstance().getScreenManager().getContent());
            mBackgroundImage.setLocation(0, 50);
            mList.Add(mBackgroundImage);
            mBackgroundImage = new Background("mainmenu\\help\\02_movement");
            mBackgroundImage.loadContent(Game1.getInstance().getScreenManager().getContent());
            mBackgroundImage.setLocation(0, 50);
            mList.Add(mBackgroundImage);
            mBackgroundImage = new Background("mainmenu\\help\\03_payattention");
            mBackgroundImage.loadContent(Game1.getInstance().getScreenManager().getContent());
            mBackgroundImage.setLocation(0, 50);
            mList.Add(mBackgroundImage);
            mBackgroundImage = new Background("mainmenu\\help\\04_mouseclicks");
            mBackgroundImage.loadContent(Game1.getInstance().getScreenManager().getContent());
            mBackgroundImage.setLocation(0, 50);
            mList.Add(mBackgroundImage);
            //mBackgroundImage = new Background("mainmenu\\help\\05_items");
            //mBackgroundImage.loadContent(Game1.getInstance().getScreenManager().getContent());
            //mBackgroundImage.setLocation(0, 50);
            //mList.Add(mBackgroundImage);

            mCurrentBackground = mList.ElementAt(0);

            mCursor = new Cursor();
            mCursor.loadContent(Game1.getInstance().getScreenManager().getContent());

            mButtonBack     = new Button("mainmenu\\help\\Menu_back", "mainmenu\\help\\Menu_back_select", "mainmenu\\help\\Menu_back_selected", new Rectangle(45, 450, 178, 128));
            mButtonPrevious = new Button("mainmenu\\help\\previous", "mainmenu\\help\\previous_select", "mainmenu\\help\\previous_selected", new Rectangle(350, 474, 80, 86));
            mButtonNext     = new Button("mainmenu\\help\\next", "mainmenu\\help\\next_select", "mainmenu\\help\\next_selected", new Rectangle(586, 474, 80, 86));

            mGroupButtons = new GameObjectsGroup <Button>();
            mGroupButtons.addGameObject(mButtonBack);
            mGroupButtons.addGameObject(mButtonPrevious);
            mGroupButtons.addGameObject(mButtonNext);
            mGroupButtons.loadContent(Game1.getInstance().getScreenManager().getContent());

            mNext     = Game1.getInstance().getScreenManager().getContent().Load <Texture2D>("mainmenu\\help\\next_disabled");
            mPrevious = Game1.getInstance().getScreenManager().getContent().Load <Texture2D>("mainmenu\\help\\previous_disabled");
            //mMenu = new MenuGrade();

            SoundManager.LoadSound(cSOUND_HIGHLIGHT);

            mFade = new Fade(this, "fades\\blackfade", Fade.SPEED.ULTRAFAST);

            //executeFade(mFade, Fade.sFADE_IN_EFFECT_GRADATIVE);
        }
コード例 #4
0
        public PauseScreen(GamePlayScreen owner)
        {
            mOwner = owner;

            if (!SoundManager.isPlaying())
            {
                SoundManager.PlayMusic("sound\\music\\theme");
            }
            mSpriteBatch = Game1.getInstance().getScreenManager().getSpriteBatch();

            mBackgroundImage = new Background("mainmenu\\help\\bg_listras");
            mBackgroundImage.loadContent(Game1.getInstance().getScreenManager().getContent());

            mList.Add(mBackgroundImage);

            mCurrentBackground = mList.ElementAt(0);

            mCursor = new Cursor();
            mCursor.loadContent(Game1.getInstance().getScreenManager().getContent());

            mButtonContinue = new Button("mainmenu\\buttons\\adventure_continue", "mainmenu\\buttons\\adventure_continue_select", "mainmenu\\buttons\\adventure_continue_selected", new Rectangle(400 - 286 / 2, 300 - 103 / 2 - 50, 286, 103));
            mButtonHelp     = new Button("mainmenu\\buttons\\mainmenu_help", "mainmenu\\buttons\\mainmenu_help_select", "mainmenu\\buttons\\mainmenu_help_selected", new Rectangle(400 - 225 / 2, 300 - 103 / 2 + 50, 225, 103));
            mButtonExit     = new Button("mainmenu\\buttons\\exit", "mainmenu\\buttons\\exit_select", "mainmenu\\buttons\\exit_selected", new Rectangle(400 - 225 / 2, 300 - 103 / 2 + 150, 225, 103));

            mPauseTitleTexture      = Game1.getInstance().getScreenManager().getContent().Load <Texture2D>("mainmenu\\paused_title_03");
            mPauseBackgroundTexture = Game1.getInstance().getScreenManager().getContent().Load <Texture2D>("mainmenu\\help\\bg_listras");

            mGroupButtons = new GameObjectsGroup <Button>();
            //mGroupButtons.addGameObject(mButtonContinue);
            mGroupButtons.addGameObject(mButtonContinue);
            mGroupButtons.addGameObject(mButtonExit);
            mGroupButtons.addGameObject(mButtonHelp);

            mGroupButtons.loadContent(Game1.getInstance().getScreenManager().getContent());

            //mButtonPlay.loadContent(Game1.getInstance().getScreenManager().getContent());
            //mButtonHelp.loadContent(Game1.getInstance().getScreenManager().getContent());
            //mButtonCredits.loadContent(Game1.getInstance().getScreenManager().getContent());

            //Game1.print("LOC: "  + mGroupButtons.getGameObject(2).getLocation());

            SoundManager.LoadSound(cSOUND_HIGHLIGHT);
        }
コード例 #5
0
        public GameoverScreen()
        {
            if (!SoundManager.isPlaying())
            {
                SoundManager.PlayMusic("sound\\music\\theme");
            }
            mSpriteBatch = Game1.getInstance().getScreenManager().getSpriteBatch();

            mBackgroundImage = new Background("mainmenu\\mainmenubg");
            mBackgroundImage.loadContent(Game1.getInstance().getScreenManager().getContent());

            mList.Add(mBackgroundImage);

            mCurrentBackground = mList.ElementAt(0);

            mCursor = new Cursor();
            mCursor.loadContent(Game1.getInstance().getScreenManager().getContent());

            mButtonYes = new Button("gameplay\\pausescreen\\continue", "gameplay\\pausescreen\\continue_select", "gameplay\\pausescreen\\continue_selected", new Rectangle(400 - 319 / 2, 300 - 117 / 2 - 50, 319, 117));
            mButtonNo  = new Button("gameplay\\pausescreen\\exit", "gameplay\\pausescreen\\exit_select", "gameplay\\pausescreen\\exit_selected", new Rectangle(400 - 290 / 2, 300 - 115 / 2 + 80, 290, 115));

            //mPauseTitleTexture = Game1.getInstance().getScreenManager().getContent().Load<Texture2D>("gameplay\\pausescreen\\paused_title");
            mGameoverBackgroundTexture = Game1.getInstance().getScreenManager().getContent().Load <Texture2D>("fades\\blackfade");

            mGroupButtons = new GameObjectsGroup <Button>();
            //mGroupButtons.addGameObject(mButtonContinue);
            mGroupButtons.addGameObject(mButtonYes);
            mGroupButtons.addGameObject(mButtonNo);

            mGroupButtons.loadContent(Game1.getInstance().getScreenManager().getContent());

            //mButtonPlay.loadContent(Game1.getInstance().getScreenManager().getContent());
            //mButtonHelp.loadContent(Game1.getInstance().getScreenManager().getContent());
            //mButtonCredits.loadContent(Game1.getInstance().getScreenManager().getContent());

            //Game1.print("LOC: "  + mGroupButtons.getGameObject(2).getLocation());

            SoundManager.LoadSound(cSOUND_HIGHLIGHT);
        }
コード例 #6
0
        public MainMenuScreen()
        {
            ObjectSerialization.Save <ProgressObject>(Game1.sPROGRESS_FILE_NAME, Game1.progressObject.setStageAndColor(1, ProgressObject.PlayerColor.BLUE));

            if (!SoundManager.isPlaying())
            {
                SoundManager.PlayMusic("sound\\music\\theme");
            }
            mSpriteBatch = Game1.getInstance().getScreenManager().getSpriteBatch();

            mBackgroundImage = new Background("mainmenu\\MainMenu_bg");
            mBackgroundImage.addPart(new String[1] {
                "mainmenu\\MainMenu_barco"
            }, 1, 125, 110, 80, 600 - 211);
            mBackgroundImage.addPart(new String[1] {
                "mainmenu\\MainMenu_areia"
            }, 1, 801, 201, 0, 600 - 201);

            mBackgroundImage.addPart(new String[36] {
                "mainmenu\\Mato01\\MainMenu_mato01_00000",
                "mainmenu\\Mato01\\MainMenu_mato01_00001",
                "mainmenu\\Mato01\\MainMenu_mato01_00002",
                "mainmenu\\Mato01\\MainMenu_mato01_00003",
                "mainmenu\\Mato01\\MainMenu_mato01_00004",
                "mainmenu\\Mato01\\MainMenu_mato01_00005",
                "mainmenu\\Mato01\\MainMenu_mato01_00006",
                "mainmenu\\Mato01\\MainMenu_mato01_00007",
                "mainmenu\\Mato01\\MainMenu_mato01_00008",
                "mainmenu\\Mato01\\MainMenu_mato01_00009",
                "mainmenu\\Mato01\\MainMenu_mato01_00010",
                "mainmenu\\Mato01\\MainMenu_mato01_00011",
                "mainmenu\\Mato01\\MainMenu_mato01_00012",
                "mainmenu\\Mato01\\MainMenu_mato01_00013",
                "mainmenu\\Mato01\\MainMenu_mato01_00014",
                "mainmenu\\Mato01\\MainMenu_mato01_00015",
                "mainmenu\\Mato01\\MainMenu_mato01_00016",
                "mainmenu\\Mato01\\MainMenu_mato01_00017",
                "mainmenu\\Mato01\\MainMenu_mato01_00018",
                "mainmenu\\Mato01\\MainMenu_mato01_00019",
                "mainmenu\\Mato01\\MainMenu_mato01_00020",
                "mainmenu\\Mato01\\MainMenu_mato01_00021",
                "mainmenu\\Mato01\\MainMenu_mato01_00022",
                "mainmenu\\Mato01\\MainMenu_mato01_00023",
                "mainmenu\\Mato01\\MainMenu_mato01_00024",
                "mainmenu\\Mato01\\MainMenu_mato01_00025",
                "mainmenu\\Mato01\\MainMenu_mato01_00026",
                "mainmenu\\Mato01\\MainMenu_mato01_00027",
                "mainmenu\\Mato01\\MainMenu_mato01_00028",
                "mainmenu\\Mato01\\MainMenu_mato01_00029",
                "mainmenu\\Mato01\\MainMenu_mato01_00030",
                "mainmenu\\Mato01\\MainMenu_mato01_00031",
                "mainmenu\\Mato01\\MainMenu_mato01_00032",
                "mainmenu\\Mato01\\MainMenu_mato01_00033",
                "mainmenu\\Mato01\\MainMenu_mato01_00034",
                "mainmenu\\Mato01\\MainMenu_mato01_00035",
            }, 1, 232, 111, 0, 600 - 111);

            mBackgroundImage.addPart(new String[36] {
                "mainmenu\\Mato02\\Mato02__00000",
                "mainmenu\\Mato02\\Mato02__00001",
                "mainmenu\\Mato02\\Mato02__00002",
                "mainmenu\\Mato02\\Mato02__00003",
                "mainmenu\\Mato02\\Mato02__00004",
                "mainmenu\\Mato02\\Mato02__00005",
                "mainmenu\\Mato02\\Mato02__00006",
                "mainmenu\\Mato02\\Mato02__00007",
                "mainmenu\\Mato02\\Mato02__00008",
                "mainmenu\\Mato02\\Mato02__00009",
                "mainmenu\\Mato02\\Mato02__00010",
                "mainmenu\\Mato02\\Mato02__00011",
                "mainmenu\\Mato02\\Mato02__00012",
                "mainmenu\\Mato02\\Mato02__00013",
                "mainmenu\\Mato02\\Mato02__00014",
                "mainmenu\\Mato02\\Mato02__00015",
                "mainmenu\\Mato02\\Mato02__00016",
                "mainmenu\\Mato02\\Mato02__00017",
                "mainmenu\\Mato02\\Mato02__00018",
                "mainmenu\\Mato02\\Mato02__00019",
                "mainmenu\\Mato02\\Mato02__00020",
                "mainmenu\\Mato02\\Mato02__00021",
                "mainmenu\\Mato02\\Mato02__00022",
                "mainmenu\\Mato02\\Mato02__00023",
                "mainmenu\\Mato02\\Mato02__00024",
                "mainmenu\\Mato02\\Mato02__00025",
                "mainmenu\\Mato02\\Mato02__00026",
                "mainmenu\\Mato02\\Mato02__00027",
                "mainmenu\\Mato02\\Mato02__00028",
                "mainmenu\\Mato02\\Mato02__00029",
                "mainmenu\\Mato02\\Mato02__00030",
                "mainmenu\\Mato02\\Mato02__00031",
                "mainmenu\\Mato02\\Mato02__00032",
                "mainmenu\\Mato02\\Mato02__00033",
                "mainmenu\\Mato02\\Mato02__00034",
                "mainmenu\\Mato02\\Mato02__00035",
            }, 1, 223, 111, 800 - 223, 600 - 111);

            mBackgroundImage.addPart(new String[36] {
                "mainmenu\\Mato03\\Mato03_00000",
                "mainmenu\\Mato03\\Mato03_00001",
                "mainmenu\\Mato03\\Mato03_00002",
                "mainmenu\\Mato03\\Mato03_00003",
                "mainmenu\\Mato03\\Mato03_00004",
                "mainmenu\\Mato03\\Mato03_00005",
                "mainmenu\\Mato03\\Mato03_00006",
                "mainmenu\\Mato03\\Mato03_00007",
                "mainmenu\\Mato03\\Mato03_00008",
                "mainmenu\\Mato03\\Mato03_00009",
                "mainmenu\\Mato03\\Mato03_00010",
                "mainmenu\\Mato03\\Mato03_00011",
                "mainmenu\\Mato03\\Mato03_00012",
                "mainmenu\\Mato03\\Mato03_00013",
                "mainmenu\\Mato03\\Mato03_00014",
                "mainmenu\\Mato03\\Mato03_00015",
                "mainmenu\\Mato03\\Mato03_00016",
                "mainmenu\\Mato03\\Mato03_00017",
                "mainmenu\\Mato03\\Mato03_00018",
                "mainmenu\\Mato03\\Mato03_00019",
                "mainmenu\\Mato03\\Mato03_00020",
                "mainmenu\\Mato03\\Mato03_00021",
                "mainmenu\\Mato03\\Mato03_00022",
                "mainmenu\\Mato03\\Mato03_00023",
                "mainmenu\\Mato03\\Mato03_00024",
                "mainmenu\\Mato03\\Mato03_00025",
                "mainmenu\\Mato03\\Mato03_00026",
                "mainmenu\\Mato03\\Mato03_00027",
                "mainmenu\\Mato03\\Mato03_00028",
                "mainmenu\\Mato03\\Mato03_00029",
                "mainmenu\\Mato03\\Mato03_00030",
                "mainmenu\\Mato03\\Mato03_00031",
                "mainmenu\\Mato03\\Mato03_00032",
                "mainmenu\\Mato03\\Mato03_00033",
                "mainmenu\\Mato03\\Mato03_00034",
                "mainmenu\\Mato03\\Mato03_00035",
            }, 1, 406, 144, 50, 0);

            //mBackgroundImage.addPart(new String[1] { "mainmenu\\MainMenu_mato01" }, 1, 232, 111, 0, 600 - 111);
            //mBackgroundImage.addPart(new String[1] { "mainmenu\\MainMenu_mato02" }, 1, 345, 135, 800 - 340, 600 - 135);
            mBackgroundImage.loadContent(Game1.getInstance().getScreenManager().getContent());

            //SPLASH
            //mGamelogo = Game1.getInstance().getScreenManager().getContent().Load<Texture2D>("mainmenu\\logo");
            //mTextureClickToStart = Game1.getInstance().getScreenManager().getContent().Load<Texture2D>("mainmenu\\clicktostart");

            mList.Add(mBackgroundImage);

            mCurrentBackground = mList.ElementAt(0);

            mCursor = new Cursor();
            mCursor.loadContent(Game1.getInstance().getScreenManager().getContent());

            mButtonContinue = new Button("mainmenu\\buttons\\adventure_continue", "mainmenu\\buttons\\adventure_continue_select", "mainmenu\\buttons\\adventure_continue_selected", new Rectangle(282, 145, 286, 113));
            mButtonNewGame  = new Button("mainmenu\\buttons\\adventure_new", "mainmenu\\buttons\\adventure_new_select", "mainmenu\\buttons\\adventure_new_selected", new Rectangle(282, 250, 286, 113));

            mButtonContinue.loadContent(Game1.getInstance().getScreenManager().getContent());
            mButtonNewGame.loadContent(Game1.getInstance().getScreenManager().getContent());


            mButtonPlay    = new Button("mainmenu\\buttons\\mainmenu_play", "mainmenu\\buttons\\mainmenu_play_select", "mainmenu\\buttons\\mainmenu_play_selected", new Rectangle(275, 155, 286, 103));
            mButtonHelp    = new Button("mainmenu\\buttons\\mainmenu_help", "mainmenu\\buttons\\mainmenu_help_select", "mainmenu\\buttons\\mainmenu_help_selected", new Rectangle(304, 255, 225, 93));
            mButtonCredits = new Button("mainmenu\\buttons\\mainmenu_credits", "mainmenu\\buttons\\mainmenu_credits_select", "mainmenu\\buttons\\mainmenu_credits_selected", new Rectangle(/*800-45*/ 10, 550, 38, 39));
            mButtonExit    = new Button("mainmenu\\buttons\\exit", "mainmenu\\buttons\\exit_select", "mainmenu\\buttons\\exit_selected", new Rectangle(304, 355, 225, 93));

            mButtonFullscreen = new Button("mainmenu\\buttons\\full", "mainmenu\\buttons\\full_select", "mainmenu\\buttons\\full_selected", new Rectangle(650, 530, 64, 47));

            mGroupButtons = new GameObjectsGroup <Button>();
            //mGroupButtons.addGameObject(mButtonContinue);
            mGroupButtons.addGameObject(mButtonPlay);
            mGroupButtons.addGameObject(mButtonHelp);
            mGroupButtons.addGameObject(mButtonCredits);
            mGroupButtons.addGameObject(mButtonExit);
            mGroupButtons.addGameObject(mButtonFullscreen);

            mGroupButtons.addGameObject(mButtonContinue);
            mGroupButtons.addGameObject(mButtonNewGame);

            mGroupButtons.loadContent(Game1.getInstance().getScreenManager().getContent());

            mSoundIcon = new SoundIcon(new Vector2(710, 514));
            mSoundIcon.loadContent(Game1.getInstance().getScreenManager().getContent());


            mFade = new Fade(this, "fades\\blackfade", Fade.SPEED.FAST);

            executeFade(mFade, Fade.sFADE_IN_EFFECT_GRADATIVE);

            //mButtonPlay.loadContent(Game1.getInstance().getScreenManager().getContent());
            //mButtonHelp.loadContent(Game1.getInstance().getScreenManager().getContent());
            //mButtonCredits.loadContent(Game1.getInstance().getScreenManager().getContent());

            //Game1.print("LOC: "  + mGroupButtons.getGameObject(2).getLocation());

            mCursor.backToMenuCursor();

            SoundManager.LoadSound(cSOUND_HIGHLIGHT);
        }