예제 #1
0
        public void GameOver()
        {
            Services.ScrollText("Game Over", 1000);
            Services.ScrollText("You made it through " + (CurrentLevel - 1) + " levels.", 1000);

            Services.PlayAgain();
        }
예제 #2
0
        public void Timer()
        {
            _timer--;
            switch (_timer)
            {
            case 40:
                Services.ScrollText("There are 4 minutes until he makes it to that stage; you must eliminate the target soon!", 500);
                break;

            case 30:
                Services.ScrollText("There are 3 minutes until he makes it to that stage; you must eliminate the target soon!", 500);
                break;

            case 20:
                Services.ScrollText("There are 2 minutes until he makes it to that stage; you must eliminate the target soon!", 500);
                break;

            case 10:
                Services.ScrollText("There is 1 minute until he makes it to that stage; you must eliminate the target soon!", 500);
                break;

            case 0:
                Services.ScrollText("You're too late! The speech is starting. Mission failed.", 500);
                Services.PlayAgain();
                break;
            }
        }
예제 #3
0
        public void Guard()
        {
            Console.WriteLine();
            foreach (string option in guard)
            {
                Services.ScrollText((Array.IndexOf(guard, option) + 1) + " - " + option);
            }

            int    input;
            string decision = Console.ReadLine();

            Console.WriteLine();

            if (Int32.TryParse(decision, out input))
            {
                switch (input)
                {
                case 1:
                    Services.ScrollText("\"" + guard[input - 1] + "\"\n", 1000);
                    Services.ScrollText("Code red! Code red!", 1000);
                    Services.ScrollText(". . .", 250);
                    Services.ScrollText("Within seconds you're surrounded and outnumbered. It's hard to complete your mission from a prison cell.", 1000);
                    Services.ScrollText("Game Over", 1000);
                    Services.PlayAgain();
                    break;

                case 2:
                    Services.ScrollText("\"" + guard[input - 1] + "\"\n", 1000);
                    Services.ScrollText("Oh. Well, umm... fine. Make it fast.", 1000);
                    _talkToGuard = true;
                    StageBack();
                    break;

                case 3:
                    Services.ScrollText("\"" + guard[input - 1] + "\"\n", 1000);
                    Services.ScrollText("Yeah, scram.", 1000);
                    Stage();
                    break;

                default:
                    Console.WriteLine("Invalid input. Please try again.");
                    Guard();
                    break;
                }
            }
            else
            {
                ExamineCommand(decision);
                Guard();
            }
        }
예제 #4
0
 public void Winner()
 {
     Services.ScrollText("You win!");
     Services.PlayAgain();
 }
예제 #5
0
        public void StageBack()
        {
            Location = "the back of the stage";

            EnterArea(stageBack, stageBackDesc, stageBackTarget);

            int    input;
            string decision = Console.ReadLine();

            if (Int32.TryParse(decision, out input))
            {
                switch (input)
                {
                case 1:
                    Services.ScrollText("You take a closer look at the pile of tarps, looks like it's just a bunch of dirty tarps.", 500);
                    Timer();
                    StageBack();
                    break;

                case 2:
                    Services.ScrollText("You take a closer look at the stack of crates, they're full of fireworks!", 500);
                    Timer();
                    StageBack();
                    break;

                case 3:
                    Services.ScrollText("You walk back to the front of the stage", 500);
                    Timer();
                    Stage();
                    break;

                default:
                    Console.WriteLine("Invalid input. Please try again.");
                    StageBack();
                    break;
                }
            }
            else
            {
                ExamineCommand(decision);
                if (Item != null && Target != null)
                {
                    if (Target == "Guard")
                    {
                        if (Item.Name != "Gun")
                        {
                            Services.ScrollText("WHAT DO YOU THINK YOU'RE DOING?", 500);
                            Services.ScrollText("Code red! Code red!", 1000);
                            Services.ScrollText(". . .", 250);
                            Services.ScrollText("Within seconds you're surrounded and outnumbered. It's hard to complete your mission from a prison cell.", 1000);
                            Services.ScrollText("Game Over", 1000);
                            Services.PlayAgain();
                        }
                        else
                        {
                            Services.ScrollText("You shoot the guard in the back!", 500);
                            Services.ScrollText("He slumps to the ground.", 500);
                            Services.ScrollText(". . .", 250);
                            Services.ScrollText("Within seconds you're surrounded and outnumbered. It's hard to complete your mission from a prison cell.", 1000);
                            Services.ScrollText("Game Over", 1000);
                            Services.PlayAgain();
                        }
                    }
                    else if (Target == "Crates")
                    {
                        if (Item.Name == "Gun")
                        {
                            Services.ScrollText("You take a few steps back and fire your gun at the crates", 500);
                            Services.ScrollText("BOOOOOOM. . .", 1000);
                            Services.ScrollText("What a huge explosion!", 500);
                            Services.ScrollText("It looks like it knocked the guard on his head, he's really passed out!");
                            Services.ScrollText("You take your opportunity to get out of there before someone realizes you caused the explosion.");
                            Item   = null;
                            Target = null;
                            _state++;
                            Timer();
                            Stage();
                        }
                        else
                        {
                            Services.ScrollText("It's not very effective.", 500);
                            Item   = null;
                            Target = null;
                            Timer();
                            StageBack();
                        }
                    }
                    else
                    {
                        Services.ScrollText("It's not very effective.", 500);
                        Item   = null;
                        Target = null;
                        Timer();
                        StageBack();
                    }
                }
                else
                {
                    StageBack();
                }
            }
        }