public static void Initialize()
        {
            titleScreen            = TextureManager.GetTexure("title_screen");
            titleScreenChracterOn  = TextureManager.GetTexure("title_screenCharOn");
            titleScreenChracterOff = TextureManager.GetTexure("title_screenCharOff");
            singlePixel            = TextureManager.GetTexure("singlePixel");

            CreateMenuItems();
        }
Example #2
0
        public static void CreateLevels()
        {
            Levels.Clear();   // Removes all items from level, reset
            CurrentLevel = 0; // Reset GameManager's CurrentLevel to start a new game

            Level level;

            #region Level 01 - Outside of Jail

            level = new Level();

            Texture2D stage1BgBack     = TextureManager.GetTexure("Level01-bg");
            Texture2D stage1BgBackB    = TextureManager.GetTexure("Level01-bg2");
            Texture2D stage1BgMain     = TextureManager.GetTexure("Level01");
            Texture2D stage1BgMainB    = TextureManager.GetTexure("Level01-b");
            Texture2D stage1FgTreeBlur = TextureManager.GetTexure("TreeBlur");

            // Level 1 Backgrounds
            level.AddBackgroundItem(stage1BgBack, Vector2.Zero, 0.1f, 0.95f);
            level.AddBackgroundItem(stage1BgBackB, new Vector2(stage1BgBack.Width, 0), 0.1f, 0.95f);
            level.AddBackgroundItem(stage1BgMain, Vector2.Zero, 1f, 0.90f);
            level.AddBackgroundItem(stage1BgMainB, new Vector2(stage1BgMain.Width, 0), 1f, 0.90f);
            level.AddBackgroundItem(stage1FgTreeBlur, new Vector2(-274, 0), 1f, 0.1f);
            level.AddBackgroundItem(stage1FgTreeBlur, new Vector2(1476, 0), 1f, 0.1f);

            // Define Level 1 starting PlayBounds
            level.PlayBounds = new Rectangle(0, 480, Game1.SCREEN_WIDTH, 120);

            // Level 1 Actors
            level.Actors.Add(new Player(new Vector2(-150, 550),
                                        level, PlayerIndex.One));

            level.Player1           = level.Actors[level.Actors.Count - 1] as Player;
            level.Player1.FacingDir = DirectionTarget.Right;
            level.Player1.SetIntro01TargetPosition(new Vector2(270, 520));

            // Enemy
            AdonEnemy enemy_Adon;
            enemy_Adon = new AdonEnemy(new Vector2(650, 535), level);
            enemy_Adon.SetToWait(DirectionTarget.Left);
            level.Actors.Add(enemy_Adon);

            DeejayEnemy enemy;
            enemy = new DeejayEnemy(new Vector2(530, 500), level); // Laying Down Radio
            enemy.SetToLayingDown(DirectionTarget.Left);
            level.Actors.Add(enemy);

            enemy = new DeejayEnemy(new Vector2(710, 500), level); // Top
            enemy.SetToWait(DirectionTarget.Left);
            level.Actors.Add(enemy);

            enemy = new DeejayEnemy(new Vector2(710, 570), level); // Bottom
            enemy.SetToWait(DirectionTarget.Left);
            level.Actors.Add(enemy);

            /////////////////////////////////////////////////////////////////

            TrashCan tc = new TrashCan(level, new Vector2(30, 500),
                                       new PickUpStone(level, Vector2.Zero));
            level.GameItems.Add(tc);
            tc = new TrashCan(level, new Vector2(90, 500),
                              new PickUpHealthPack(level, Vector2.Zero, 40));
            level.GameItems.Add(tc);
            tc = new TrashCan(level, new Vector2(670, 500),
                              new PickUpHealthPack(level, Vector2.Zero, 40));
            level.GameItems.Add(tc);
            tc = new TrashCan(level, new Vector2(710, 500),
                              new PickUpHealthPack(level, Vector2.Zero, 40));
            level.GameItems.Add(tc);

            // Section 2
            tc = new TrashCan(level, new Vector2(1000, 485),
                              new PickUpHealthPack(level, Vector2.Zero, 40));
            level.GameItems.Add(tc);
            tc = new TrashCan(level, new Vector2(1060, 485),
                              new PickUpHealthPack(level, Vector2.Zero, 20));
            level.GameItems.Add(tc);
            tc = new TrashCan(level, new Vector2(1450, 490),
                              new PickUpHealthPack(level, Vector2.Zero, 30));
            level.GameItems.Add(tc);

            // Section 3
            tc = new TrashCan(level, new Vector2(1940, 540),
                              new PickUpHealthPack(level, Vector2.Zero, 60));
            level.GameItems.Add(tc);
            tc = new TrashCan(level, new Vector2(2460, 515),
                              new PickUpHealthPack(level, Vector2.Zero, 40));
            level.GameItems.Add(tc);
            tc = new TrashCan(level, new Vector2(2500, 515),
                              new PickUpHealthPack(level, Vector2.Zero, 10));
            level.GameItems.Add(tc);

            CreateLevel1CutScenes(level);

            Levels.Add(level);
            HUDManager.setLevel(level);

            Camera.Position = new Vector2(Game1.SCREEN_WIDTH / 2, Game1.SCREEN_HEIGHT / 2);

            #endregion

            #region Level 02 - Train Stattion

            level = new Level();

            Texture2D stage2BgBack = TextureManager.GetTexure("Level02-bg");
            Texture2D stage2BgMain = TextureManager.GetTexure("Level02");

            // Level 2 Backgrounds
            level.AddBackgroundItem(stage2BgBack, Vector2.Zero, 0.1f, 0.95f);
            level.AddBackgroundItem(stage2BgMain, Vector2.Zero, 1f, 0.90f);

            // Define Level 2 starting PlayBounds
            level.PlayBounds = new Rectangle(0, 480, Game1.SCREEN_WIDTH, 120);

            // Create 2 enemies to the waiting for the players

            enemy = new DeejayEnemy(new Vector2(550, 480), level);
            enemy.SetToWait(DirectionTarget.Left);
            level.Actors.Add(enemy);

            enemy = new DeejayEnemy(new Vector2(660, 570), level);
            enemy.SetToWait(DirectionTarget.Left);
            level.Actors.Add(enemy);

            enemy = new DeejayEnemy(new Vector2(150, 490), level);
            enemy.SetToWait(DirectionTarget.Right);
            level.Actors.Add(enemy);

            enemy = new DeejayEnemy(new Vector2(170, 580), level);
            enemy.SetToWait(DirectionTarget.Right);
            level.Actors.Add(enemy);

            // Trash Can
            TrashCan tc_Level02 = new TrashCan(level, new Vector2(640, 480),
                                               new PickUpStone(level, Vector2.Zero));
            level.GameItems.Add(tc_Level02);
            TrashCan tc2_Level02 = new TrashCan(level, new Vector2(580, 475),
                                                new PickUpHealthPack(level, Vector2.Zero, 40));
            level.GameItems.Add(tc2_Level02);

            CreateLevel2CutScenes(level);

            Levels.Add(level);

            #endregion
        }
Example #3
0
        static private void CreateLevel2CutScenes(Level level)
        {
            // CutScene Information
            CutScene scene;
            string   line;
            //string voiceActingSound;
            Texture2D portrait;
            float     timer;

            // SceneEvent Information
            SceneEvent sceneEvent;
            Trigger    trigger;

            #region Level 2 Introduction

            #region CutScene
            scene = new CutScene();

            // Line 1
            line     = "Move or I'll crush you!";
            portrait = TextureManager.GetTexure("cody01");
            timer    = 5f;
            scene.AddLine(line, portrait, timer);

            // Line 2
            line     = "Time to take you out of your misery";
            portrait = TextureManager.GetTexure("deejay02");
            timer    = 5f;
            scene.AddLine(line, portrait, timer);

            // Line 3
            line     = "There is still time to run, I mean... if your interested!";
            portrait = TextureManager.GetTexure("cody01");
            timer    = 7f;
            scene.AddLine(line, portrait, timer);

            // Line 4
            line     = "Enough talk, AHHHHH!!!";
            portrait = TextureManager.GetTexure("deejay01");
            timer    = 5f;
            scene.AddLine(line, portrait, timer);

            level.CutScenes.Add(scene);
            #endregion

            #region Post Intro SceneEvent

            sceneEvent = new SceneEventActivateEnemies();
            // Trigger to takes us to the Next Level
            trigger = new TriggerNoEnemiesNoCS();
            sceneEvent.AddTrigger(trigger);
            level.SceneEvents.Add(sceneEvent);

            #endregion

            #endregion

            #region Level 2 - 2nd Event: After you defeate the intro enemies (6) BG pans a bit more.
            // Hitbox created

            sceneEvent = new SceneEvent();
            trigger    = new TriggerHitBoxNoCS(new Rectangle(700, 450, 100, 148));
            sceneEvent.AddPlayBounds(70);
            sceneEvent.AddTrigger(trigger);
            level.SceneEvents.Add(sceneEvent);

            #endregion

            #region Level 2 - 3rd Event: Spawn 4 enemies 1 range
            // Hitbox created

            sceneEvent = new SceneEvent();
            trigger    = new TriggerNoEnemies();
            sceneEvent.AddTrigger(trigger);

            sceneEvent.AddEnemy(new DeejayEnemy(DirectionTarget.Left, level));
            sceneEvent.AddEnemy(new DeejayEnemy(DirectionTarget.Right, level));
            sceneEvent.AddEnemy(new RolentoEnemy(DirectionTarget.Right, level));

            level.SceneEvents.Add(sceneEvent);

            #endregion

            #region Level 2 After the 4 close combat and 1 range enemies are defeated
            // Spawn ADON and CODY TALK SCENE - before fight

            #region CutScene
            scene = new CutScene();

            // Line 1
            line     = "Why all the running?!";
            portrait = TextureManager.GetTexure("cody01");
            timer    = 2f;
            scene.AddLine(line, portrait, timer);

            // Line 2
            line     = "I'm going to tear your throat and feed it to the pigs!";
            portrait = TextureManager.GetTexure("adon02");
            timer    = 5f;
            scene.AddLine(line, portrait, timer);

            // Line 3
            line     = "Come and get me!!!!";
            portrait = TextureManager.GetTexure("cody01");
            timer    = 7f;
            scene.AddLine(line, portrait, timer);

            level.CutScenes.Add(scene);
            #endregion

            #region Post SceneEvent

            sceneEvent = new SceneEvent();
            // Trigger to takes us to the Next Level
            trigger = new TriggerNoEnemiesNoCS();
            sceneEvent.AddTrigger(trigger);
            level.SceneEvents.Add(sceneEvent);

            #endregion

            #endregion

            #region Level 2 - 4th Event: Spawn Final Boss for Level 2 - ADON
            // Hitbox created

            sceneEvent = new SceneEvent();
            trigger    = new TriggerNoEnemies();
            sceneEvent.AddTrigger(trigger);

            sceneEvent.AddEnemy(new AdonEnemy(DirectionTarget.Neither, level));

            level.SceneEvents.Add(sceneEvent);

            #endregion

            #region Level 2 Final Event

            #region CutScene
            scene = new CutScene();

            // Line 1
            line     = "Where is she?!!";
            portrait = TextureManager.GetTexure("cody01");
            timer    = 3f;
            scene.AddLine(line, portrait, timer);

            // Line 2
            line     = "...";
            portrait = TextureManager.GetTexure("cody02");
            timer    = 3f;
            scene.AddLine(line, portrait, timer);

            // Line 3
            line     = "Tell me or I will finish you off right now!";
            portrait = TextureManager.GetTexure("cody01");
            timer    = 5f;
            scene.AddLine(line, portrait, timer);

            // Line 4
            line     = "We put her on a plane this morning...";
            portrait = TextureManager.GetTexure("adon01");
            timer    = 4f;
            scene.AddLine(line, portrait, timer);

            // Line 5
            line     = "Lies!";
            portrait = TextureManager.GetTexure("cody01");
            timer    = 3f;
            scene.AddLine(line, portrait, timer);

            // Line 6
            line     = "The organizing principal for any society is war, its our way of life. You see fear is control, fear is money!";
            portrait = TextureManager.GetTexure("adon01");
            timer    = 6f;
            scene.AddLine(line, portrait, timer);

            // Line 8
            line     = "I don't give shit! Where is she?!";
            portrait = TextureManager.GetTexure("cody02");
            timer    = 3f;
            scene.AddLine(line, portrait, timer);

            // Line 9
            line     = "The young men from your estate, so vicious, poor Elena wouldn't stand a...";
            portrait = TextureManager.GetTexure("adon01");
            timer    = 6f;
            scene.AddLine(line, portrait, timer);

            level.CutScenes.Add(scene);
            #endregion

            #region Post SceneEvent

            sceneEvent = new SceneEvent();
            // Trigger to takes us to the Next Level
            trigger = new TriggerNextLevel();
            sceneEvent.AddTrigger(trigger);
            level.SceneEvents.Add(sceneEvent);

            #endregion

            #endregion
        }
Example #4
0
        public static void Initialize()
        {
            howToPlayScreen = TextureManager.GetTexure("HowToPlay");

            HUDManager.Initialize();
        }
Example #5
0
        static private void CreateLevel1CutScenes(Level level)
        {
            // CutScene Information
            CutScene scene;
            string   line;
            //string voiceActingSound;
            Texture2D portrait;
            float     timer;

            // SceneEvent Information
            SceneEvent sceneEvent;
            Trigger    trigger;

            #region Level Introduction - Cody talks to Adon, seeks revenge
            // Creates TriggerHitBox close to the 2 enemies (Deejays)

            #region CutScene
            scene = new CutScene();

            // Line 1
            line     = "I'm coming for you!!";
            portrait = TextureManager.GetTexure("cody01");
            timer    = 5f;
            scene.AddLine(line, portrait, timer);

            // Line 2
            line     = "You will all die for what you have done!!!";
            portrait = TextureManager.GetTexure("cody01");
            timer    = 5f;
            scene.AddLine(line, portrait, timer);

            // Line 3
            line     = "Hey blondie, how delightful! Maybe this time you will stay quite";
            portrait = TextureManager.GetTexure("adon01");
            timer    = 7f;
            scene.AddLine(line, portrait, timer);

            // Line 4
            line     = "Just pray that I don't find you!";
            portrait = TextureManager.GetTexure("cody02");
            timer    = 5f;
            scene.AddLine(line, portrait, timer);

            // Line 5
            line     = "Get him!!!!!";
            portrait = TextureManager.GetTexure("adon02");
            timer    = 5f;
            scene.AddLine(line, portrait, timer);

            level.CutScenes.Add(scene);
            #endregion

            #region Post Intro SceneEvent

            sceneEvent = new SceneEvent();
            trigger    = new TriggerHitBox(new Rectangle(500, 400, 300, 200));
            sceneEvent.AddTrigger(trigger);
            level.SceneEvents.Add(sceneEvent);

            #endregion

            #endregion

            #region First Cutscene - Cody talks to Adon, player can move,
            // creates hitBox close to the 2 enemies on the right

            #region CutScene
            scene = new CutScene();

            // Line 1
            line = "I'm gonna squash you!!";
            //voiceCueName
            portrait = TextureManager.GetTexure("cody02");
            timer    = 5f;
            scene.AddLine(line, portrait, timer);

            // Line 2
            line = "You all are going down!";
            //voiceCueName
            portrait = TextureManager.GetTexure("cody01");
            timer    = 5f;
            scene.AddLine(line, portrait, timer);

            // Line 3
            line = "Hehe, this is going to be a BAD day for you!";
            //voiceCueName
            portrait = TextureManager.GetTexure("deejay02");
            timer    = 7f;
            scene.AddLine(line, portrait, timer);

            // Line 4
            line = "COME ON!!!!";
            //voiceCueName
            portrait = TextureManager.GetTexure("cody02");
            timer    = 5f;
            scene.AddLine(line, portrait, timer);

            level.CutScenes.Add(scene);

            #endregion

            #region Post Cutscene SceneEvent

            sceneEvent = new SceneEventActivateEnemies();
            trigger    = new TriggerNoEnemies();
            sceneEvent.AddTrigger(trigger);
            level.SceneEvents.Add(sceneEvent);

            #endregion

            #endregion

            #region Second After you defeat the 2 enemies, the enemies talk to you for a bit
            // HitBox Area trigger: Defeated the 2 enemies outside the jail breakout area, camera pans

            #region CutScene
            scene = new CutScene();

            // Line 1
            line = "I'll take on all of you!!!";
            //voiceCueName
            portrait = TextureManager.GetTexure("cody02");
            timer    = 5f;
            scene.AddLine(line, portrait, timer);

            // Line 2
            line = "Punks, so big but no brains...";
            //voiceCueName
            portrait = TextureManager.GetTexure("deejay03");
            timer    = 5f;
            scene.AddLine(line, portrait, timer);

            level.CutScenes.Add(scene);

            #endregion

            #region Post Cutscene SceneEvent

            sceneEvent = new SceneEvent();
            trigger    = new TriggerHitBoxNoCS(new Rectangle(960, 400, 200, 200));
            sceneEvent.AddTrigger(trigger);
            sceneEvent.AddPlayBounds(500);
            level.SceneEvents.Add(sceneEvent);

            #endregion

            #endregion

            #region Third - After you tell the 2 enemies you beatup, a few things about fighting

            #region Post SceneEvent

            sceneEvent = new SceneEvent();
            trigger    = new TriggerHitBoxNoCS(new Rectangle(1600, 400, 200, 200));
            sceneEvent.AddTrigger(trigger);
            sceneEvent.AddPlayBounds(500);
            sceneEvent.AddSpawner(new DoorEnemySpawner(new Vector2(1141, 472), level, new RolentoEnemy(new Vector2(1135, 472), level)));
            sceneEvent.AddEnemy(new RolentoEnemy(DirectionTarget.Right, level));
            sceneEvent.AddEnemy(new DeejayEnemy(DirectionTarget.Left, level));
            sceneEvent.AddEnemy(new DeejayEnemy(DirectionTarget.Right, level));
            level.SceneEvents.Add(sceneEvent);

            #endregion

            #endregion

            #region Fourth - After you beat 3 Close Range, 1 Far Range

            #region Post SceneEvent

            sceneEvent = new SceneEvent();
            trigger    = new TriggerNoEnemies();
            sceneEvent.AddTrigger(trigger);
            sceneEvent.AddSpawner(new DoorEnemySpawner(new Vector2(1141, 472), level, new RolentoEnemy(new Vector2(1135, 472), level)));
            sceneEvent.AddEnemy(new RolentoEnemy(DirectionTarget.Left, level));
            sceneEvent.AddEnemy(new DeejayEnemy(DirectionTarget.Left, level));
            sceneEvent.AddEnemy(new DeejayEnemy(DirectionTarget.Right, level));
            level.SceneEvents.Add(sceneEvent);

            #endregion

            #endregion

            #region Fifth - After the first enemy comes out of the door, with 2 more close and 1 far range
            // If player goes further to the hitbox, spawn 3 close and 1 far range!!!

            #region CutScene
            scene = new CutScene();

            // Line 1
            line = "Where are you!!!!";
            //voiceCueName
            portrait = TextureManager.GetTexure("cody01");
            timer    = 3f;
            scene.AddLine(line, portrait, timer);

            // Line 2
            line = "Come out and fight!!";
            //voiceCueName
            portrait = TextureManager.GetTexure("cody02");
            timer    = 4f;
            scene.AddLine(line, portrait, timer);

            // Line 3
            line = "Over here BLONDIE!! Hahahahaa!!!";
            //voiceCueName
            portrait = TextureManager.GetTexure("adon01");
            timer    = 3f;
            scene.AddLine(line, portrait, timer);

            // Line 4
            line = "HA!! Let's FINISH THIS COMEDY";
            //voiceCueName
            portrait = TextureManager.GetTexure("adon02");
            timer    = 6f;
            scene.AddLine(line, portrait, timer);

            level.CutScenes.Add(scene);

            #endregion

            #region Post SceneEvent

            sceneEvent = new SceneEvent();
            trigger    = new TriggerHitBoxNoCS(new Rectangle(2500, 400, 200, 200));
            sceneEvent.AddTrigger(trigger);
            sceneEvent.AddPlayBounds(1000);
            level.SceneEvents.Add(sceneEvent);

            #endregion

            #endregion

            #region Six - After cutscene, spawn 4 more close and 1 range

            #region Post SceneEvent

            sceneEvent = new SceneEvent();
            trigger    = new TriggerNoEnemies();
            sceneEvent.AddTrigger(trigger);
            sceneEvent.AddEnemy(new RolentoEnemy(DirectionTarget.Left, level));
            sceneEvent.AddEnemy(new DeejayEnemy(DirectionTarget.Left, level));
            sceneEvent.AddEnemy(new DeejayEnemy(DirectionTarget.Left, level));

            level.SceneEvents.Add(sceneEvent);

            #endregion

            #endregion

            #region Seven - After defeating all 5 enemies, Cutscene to next level

            #region CutScene
            scene = new CutScene();

            // Line 1
            line = "Why are you running!!!";
            //voiceCueName
            portrait = TextureManager.GetTexure("cody02");
            timer    = 3f;
            scene.AddLine(line, portrait, timer);

            // Line 2
            line = "You can't hide from me!!!";
            //voiceCueName
            portrait = TextureManager.GetTexure("cody01");
            timer    = 4f;
            scene.AddLine(line, portrait, timer);

            level.CutScenes.Add(scene);

            #endregion

            #region Post SceneEvent

            sceneEvent = new SceneEvent();
            // Trigger to takes us to the Next Level
            trigger = new TriggerNextLevel();
            sceneEvent.AddTrigger(trigger);
            level.SceneEvents.Add(sceneEvent);

            #endregion

            #endregion
        }
 public static void Initialize()
 {
     playerHud   = TextureManager.GetTexure("PlayerBar");
     itemRocks   = TextureManager.GetTexure("Rocks");
     singlePixel = TextureManager.GetTexure("singlePixel");
 }