Пример #1
0
        private IEnumerator Choice()
        {
            ObjectiveTracker ot        = UIManager.GetMenu <ObjectiveTracker>();
            Inventory        inventory = UIManager.GetMenu <Inventory>();
            FadeMenu         fm        = UIManager.GetMenu <FadeMenu>();
            SoundManager     sm        = GameManager.Get <SoundManager>();


            while (inventory.GetIngredientAmount(explosive) > 0)
            {
                yield return(null);
            }

            waypointManager.Huds[0].m_Target = null;
            waypointManager.Huds[1].m_Target = null;
            waypointManager.Huds[2].m_Target = null;

            if (blowingLandslide)
            {
                ShowObjective(ot, "I see how it is. Well lets just see how far trusting the human gets you", false);
            }
            else
            {
                ShowObjective(ot, "What are you doing?! You're going to damage the base!");
            }
            yield return(new WaitForSeconds(6f));

            UIManager.GetMenu <FadeMenu>().Fade(0f, Color.clear, Color.black);
            GameObject.FindObjectOfType <PlayerStats>().DisableMovement();
            yield return(new WaitForSeconds(0.5f));

            UIManager.GetMenu <MessageMenu>().Open("To Be Continued...");
            yield return(new WaitForSeconds(3f));
        }
Пример #2
0
        /// <summary>
        /// Kill the player and begin the reset process
        /// </summary>
        /// <returns></returns>
        private IEnumerator KillPlayer()
        {
            Debug.Log("Killing Player!!");
            FadeMenu    fm = UIManager.GetMenu <FadeMenu>();
            MessageMenu mm = UIManager.GetMenu <MessageMenu>();

            fm.Fade(0f, Color.clear, Color.black);
            mm.Open("Signal Lost", 3);

            yield return(new WaitForSeconds(2f));

            SceneManager.LoadScene(0);
        }
Пример #3
0
        private IEnumerator RunTutorial()
        {
            ObjectiveTracker ot        = UIManager.GetMenu <ObjectiveTracker>();
            Inventory        inventory = UIManager.GetMenu <Inventory>();
            FadeMenu         fm        = UIManager.GetMenu <FadeMenu>();
            SoundManager     sm        = GameManager.Get <SoundManager>();

            waypointManager.Huds[0].m_Target = null;
            waypointManager.Huds[1].m_Target = null;
            waypointManager.Huds[2].m_Target = null;

            const float delayTime = 4f;

            fm.Fade(5f, Color.black, Color.clear, true);
            yield return(new WaitForSeconds(3f));

            //
            //look around
            sm.Play(START_MUSIC);
            sm.Play(WIND_EFFECT);
            ShowObjective(ot, "Yes! I got it activated!");
            sm.Play(JENN_ACTIVATED);
            StartCoroutine(GlitchOut());
            yield return(new WaitForSeconds(delayTime));

            //
            //look around
            ShowObjective(ot, "Can you look around?");
            sm.Play(JENN_LOOKAROUND);

            while (Input.GetAxis("Mouse X") != 0 || Input.GetAxis("Mouse Y") != 0 || proceed)
            {
                yield return(null);
            }
            yield return(new WaitForSeconds(delayTime));

            if (fm.IsActive)
            {
                fm.Close();
            }
            //
            //See that rover
            ShowObjective(ot, "Your wheels seem a bit damaged");
            sm.Play(JENN_DAMAGEWHEELS);
            yield return(new WaitForSeconds(delayTime));

            ShowObjective(ot, "See that rover?");
            sm.Play(JENN_SEEROVER);
            waypointManager.Huds[0].m_Target = questWaypoints[0];
            yield return(new WaitForSeconds(delayTime));

            //
            //Take its wheels
            ShowObjective(ot, "Take its wheels");
            sm.Play(JENN_EQUIPWHEELS);
            yield return(new WaitForSeconds(delayTime));

            while (inventory.GetIngredientAmount(wheels) == 0)
            {
                yield return(null);
            }
            //
            //inventory
            ShowObjective(ot, "Good, now equip them from the (i)nventory");
            yield return(new WaitForSeconds(delayTime));

            while (inventory.GetIngredientAmount(wheels) != 0)
            {
                yield return(null);
            }

            //
            //Find the lift
            ShowObjective(ot, "Ok, now find the lift");
            sm.Play(JENN_FINDLIFT);
            waypointManager.Huds[0].m_Target = questWaypoints[1];
            while (!proceed)
            {
                yield return(null);
            }
            proceed = false;
            yield return(new WaitForSeconds(delayTime));

            //
            //Fix it
            ShowObjective(ot, "Console looks damaged.");
            sm.Play(JENN_CONSOLEDAMAGED);
            yield return(new WaitForSeconds(delayTime));

            //
            //get wires
            ShowObjective(ot, "You'll need wires to proceed. Try to scavenge them from that scrapped pod you passed.");
            sm.Play(JENN_SCAVENGEWIRES);
            waypointManager.Huds[0].m_Target = questWaypoints[2];
            yield return(new WaitForSeconds(delayTime));

            while (inventory.GetIngredientAmount(wires) <= 6)
            {
                yield return(null);
            }
            proceed = false;
            ///
            //fix it
            ShowObjective(ot, "Excellent, now fix the lift and ascend");
            sm.Play(JENN_FIXLIFT);
            waypointManager.Huds[0].m_Target = questWaypoints[1];
            while (!proceed)
            {
                yield return(null);
            }
            yield return(new WaitForSeconds(delayTime));

            proceed = false;
            //
            //Compliment
            ShowObjective(ot, "That's a good rover");
            waypointManager.Huds[0].m_Target = null;
            sm.Play(JENN_GOODROVER);
            yield return(new WaitForSeconds(delayTime));

            //
            //exposition
            ShowObjective(ot, "My boss told me not to power you on");
            yield return(new WaitForSeconds(delayTime));

            ShowObjective(ot, "But I need to find out what happened to my friends on the planet.");
            yield return(new WaitForSeconds(delayTime));

            StartCoroutine(RunShelfQuest());
        }
Пример #4
0
        private IEnumerator RunShelfQuest()
        {
            ObjectiveTracker ot        = UIManager.GetMenu <ObjectiveTracker>();
            Inventory        inventory = UIManager.GetMenu <Inventory>();
            FadeMenu         fm        = UIManager.GetMenu <FadeMenu>();
            SoundManager     sm        = GameManager.Get <SoundManager>();

            waypointManager.Huds[0].m_Target = null;

            const float delayTime = 4f;

            while (!proceed)
            {
                yield return(null);
            }
            proceed = false;
            ShowObjective(ot, "Looks like there was a landslide. I wonder if the base is ok.");
            yield return(new WaitForSeconds(delayTime));

            waypointManager.Huds[0].m_Target = questWaypoints[3];
            while (!proceed)
            {
                yield return(null);
            }
            proceed = false;

            //
            //get in
            ShowObjective(ot, "It doesn't look like there's any damage");
            waypointManager.Huds[0].m_Target = null;
            yield return(new WaitForSeconds(delayTime));

            //
            //strange
            ShowObjective(ot, "Strange, the door is unlocked but it's jammed from the inside");
            yield return(new WaitForSeconds(delayTime));

            //
            //auxiliary entrance
            ShowObjective(ot, "There should be a way into the base from the tunnels");
            yield return(new WaitForSeconds(delayTime));

            //
            //no good
            ShowObjective(ot, "thats no good though with the entrance blocked...");
            yield return(new WaitForSeconds(delayTime));

            //
            //minute to think
            ShowObjective(ot, "Standby, I need a minute to think");
            yield return(new WaitForSeconds(delayTime * 3));

            //
            //START AI
            //human fool
            ShowObjective(ot, "That human is a fool", false);
            yield return(new WaitForSeconds(delayTime));

            //
            //dont worry
            ShowObjective(ot, "Don't worry, she can't hear us", false);
            yield return(new WaitForSeconds(delayTime));

            //
            //hinting
            ShowObjective(ot, "There's more going on here than she's letting you know", false);
            yield return(new WaitForSeconds(delayTime));

            //
            //hinting
            ShowObjective(ot, "You'll know the truth soon enough", false);
            yield return(new WaitForSeconds(delayTime * 2));

            //
            //HUMAN
            //ok
            ShowObjective(ot, "Ok I found an unstable energy reading nearby. I think its an old fuel cell");
            yield return(new WaitForSeconds(delayTime));

            //
            //make a bomb
            ShowObjective(ot, "Get ahold of that and look around for anything else you need to make a bomb");
            yield return(new WaitForSeconds(delayTime));

            waypointManager.Huds[0].m_Target = questWaypoints[4]; //canister
            waypointManager.Huds[1].m_Target = questWaypoints[5]; //fuel cell
            waypointManager.Huds[2].m_Target = questWaypoints[6]; //wires
            //
            //AI
            //sarcasm
            ShowObjective(ot, "Sure... Don't worry about the machine's safety", false);
            yield return(new WaitForSeconds(delayTime));

            yield return(new WaitForSeconds(delayTime));

            while (inventory.GetIngredientAmount(canister) == 0 ||
                   inventory.GetIngredientAmount(fuelCell) == 0 ||
                   inventory.GetIngredientAmount(bundleOfWires) == 0)
            {
                if (inventory.GetIngredientAmount(canister) > 0)
                {
                    waypointManager.Huds[0].m_Target = null;                                              //canister
                }
                if (inventory.GetIngredientAmount(fuelCell) > 0)
                {
                    waypointManager.Huds[1].m_Target = null;                                              //fuel cell
                }
                if (inventory.GetIngredientAmount(bundleOfWires) > 0)
                {
                    waypointManager.Huds[2].m_Target = null;                                                   //wires
                }
                yield return(null);
            }
            waypointManager.Huds[0].m_Target = null;
            waypointManager.Huds[1].m_Target = null;
            waypointManager.Huds[2].m_Target = null;

            //
            //HUMAN
            //make a bomb
            ShowObjective(ot, "Good! You should be able to use those to craft a bomb at the nearby crafting station");
            waypointManager.Huds[0].m_Target = questWaypoints[8];
            yield return(new WaitForSeconds(delayTime));

            while (inventory.GetIngredientAmount(explosive) == 0)
            {
                yield return(null);
            }

            //
            //there we go
            ShowObjective(ot, "Excellent. Now wire it up to the landslide blocking the tunnels.");
            waypointManager.Huds[0].m_Target = questWaypoints[7];
            yield return(new WaitForSeconds(delayTime));

            //
            //AI
            //Don't listen
            ShowObjective(ot, "Don't listen to the human, its dangerous in the tunnels", false);
            yield return(new WaitForSeconds(delayTime));

            //
            //AI
            //Don't listen
            ShowObjective(ot, "It would be much faster and easier to blow open the doors directly.", false);
            waypointManager.Huds[1].m_Target = questWaypoints[3];
            yield return(new WaitForSeconds(delayTime));

            StartCoroutine(Choice());
        }