Beispiel #1
0
 public void Interaction()
 {
     if (_inventory.HasItem(MustardWater, 1))
     {
         if (GameObject.Find("WaterPointer") != null)
         {
             GameObject.Find("WaterPointer").GetComponent <FlatFollow>().disappear();
         }
         if (GameObject.Find("FrankAlert") != null)
         {
             GameObject.Find("FrankAlert").GetComponent <FlatFollow>().appear();
         }
         if (GameObject.Find("ZeldaAlert") != null)
         {
             GameObject.Find("ZeldaAlert").GetComponent <FlatFollow>().appear();
         }
         hint.GetComponent <HintController>().AllTaskCompleted(GameObject.Find("AfterWaterTalk"));
         SceneManager.LoadScene(MiniGameSceneName, LoadSceneMode.Additive);
         SceneManager.sceneLoaded += StartMinigame;
         _interact.enabled         = false;
     }
     else
     {
         _interact.SetInteractText("Go talk to Frank about water");
     }
 }
Beispiel #2
0
 public void Interaction()
 {
     Systems.Status.AffectWarmth(50);
     _firstInteraction = false;
     _interact.SetInteractText("Press 'E' to Rest in Bed");
     _interact.DeleteItems();
     _interact = null;
 }
Beispiel #3
0
 public void Interaction()
 {
     Systems.Status.AffectRelief(100);
     _firstInteraction = false;
     _interact.SetInteractText("Press 'E' to Use Toilet");
     _interact.DeleteItems();
     _interact = null;
 }
Beispiel #4
0
    public void UpdateState()
    {
        if (isFalling)
        {
            return;
        }

        if (secure && HasEverything())
        {
            Destroy(TriggerCollider);
            QuakeManager.Instance.TriggerQuake();
        }

        if (count < KillCount)
        {
            if (secure)
            {
                _interact.BlinkWhenPlayerNear = false;
                _interact.SetInteractText("");
            }
            else if (PlayerHasItem || _inventory.HasItem(CheckItem, 1))
            {
                _interact.BlinkWhenPlayerNear = true;
                _interact.SetInteractText(HAS_TOOLS);
                PlayerHasItem = true;
            }
            else
            {
                _interact.BlinkWhenPlayerNear = false;
                _interact.SetInteractText(NO_TOOLS);
            }

            count++;
            Debug.Log(count);
        }
        else if (!secure)
        {
            Destroy(TriggerCollider);
            QuakeManager.Instance.TriggerQuake();
        }
    }
 public void Interaction()
 {
     if ((Conditions ^ 0xF) == 0)
     {
         SceneManager.LoadScene(MiniGameSceneName, LoadSceneMode.Additive);
         SceneManager.sceneLoaded += StartMinigame;
     }
     else
     {
         _interact.SetInteractText("You need to gather more items");
     }
 }
Beispiel #6
0
 public void OnEnter()
 {
     _interact.SetInteractText(_satisfied ? SATISFIED : NOT_SATISFIED);
     //_interact.BlinkWhenPlayerNear = _satisfied;
     if (_satisfied)
     {
         Systems.Status.Pause();
         UIManager.Instance.SetAsActive(winCanvas); //changed from winCanvas
         levelMusic.SetActive(false);
         winMusic.SetActive(true);
         win.SetActive(true);
     }
 }
Beispiel #7
0
 public void Interaction()
 {
     if (Systems.Objectives.Check("CompostInstructions"))
     {
         master.AddCarbon();
         master.BuildBox();
         GameObject.Find("LocationsOfInterest").GetComponent <HintController>().AllTaskCompleted(GameObject.Find("Compost"));
     }
     else
     {
         _interact.SetInteractText("Go talk to Bruce");
     }
 }
 public void Interaction()
 {
     if (!_firstInteraction)
     {
         Systems.Status.AffectHydration(50);
     }
     else
     {
         _firstInteraction = false;
         _interact.SetInteractText("Press 'E' to Drink from Sink");
         _interact.DeleteItems();
         _interact = null;
     }
 }
Beispiel #9
0
 public void Interaction()
 {
     if (!_firstInteraction)
     {
         Systems.Status.AffectHydration(100);
         GameObject.Find("MeterDing").GetComponent <AudioSource>().Play();
     }
     else
     {
         GameObject.Find("InventoryZip").GetComponent <AudioSource>().Play();
         _firstInteraction = false;
         _interact.SetInteractText("Press 'E' to drink from the sink");
         _interact.DeleteItems();
         //_interact = null;
     }
 }
Beispiel #10
0
    public void Interaction()
    {
        string[]      occupiedToiletResponses    = new string[] { " 'I shouldn't have drunk that dirty water' ", " 'This will take a while.. Can you pass me the sports section??' ", " 'Esta ocupada!!' ", " 'Can't a person get any privacy??' " };
        System.Random randomResponses            = new System.Random();
        int           useOccupiedToiletResponses = randomResponses.Next(occupiedToiletResponses.Length);
        string        pickResponse = occupiedToiletResponses[useOccupiedToiletResponses];

        if (_inventory.HasItem(MustardWater, 1))
        {
            _interact.enabled = false;
        }
        else
        {
            _interact.SetInteractText(pickResponse);
        }
    }
Beispiel #11
0
 public void Interaction()
 {
     if ((Conditions ^ 0x1) == 0)
     {
         logger.sendToLog("Started gas mini game", "MINIGAME");
         countdown.GetComponent <CountdownBoom>().StopGasCount();
         SceneManager.LoadScene(MiniGameSceneName, LoadSceneMode.Additive);
         SceneManager.sceneLoaded += StartMinigame;
         _interact.enabled         = false;
     }
     else
     {
         _interact.SetInteractText("You need to get the wrench!");
         Debug.Log("Opened Gas Minigame without wrench");
         logger.sendToLog("Opened gas minigame without a wrench", "MINIGAME");
     }
 }
Beispiel #12
0
 public void Interaction()
 {
     if ((Conditions ^ 0x1F) == 0)
     {
         if (GameObject.Find("AhmadAlert") != null)
         {
             GameObject.Find("AhmadAlert").GetComponent <FlatFollow>().appear();
         }
         hint.GetComponent <HintController>().NextTask();
         hint.GetComponent <HintController>().AllTaskCompleted(GameObject.Find("Post EQ"));
         SceneManager.LoadScene(MiniGameSceneName, LoadSceneMode.Additive);
         SceneManager.sceneLoaded += StartMinigame;
         _interact.enabled         = false;
     }
     else
     {
         _interact.SetInteractText("You need to gather more items");
     }
 }
Beispiel #13
0
 public void Interaction()
 {
     if (_inventory.HasItem(Pot, 1) && _inventory.HasItem(Wood, 1))
     {
         _interact.enabled = false;
         BoilWater.SetActive(true);
         //BarrelWithWater.GetComponent<InteractWithObject>().disabled;
         GameObject.Find("BarrelWithWater").GetComponent <InteractWithObject>().OnTriggerExit(GameObject.FindGameObjectWithTag("Player").GetComponent <Collider>());
         GameObject.Find("BarrelWithWater").GetComponent <InteractWithObject>().enabled = false;
         GameObject.Find("BarrelWithWater").GetComponent <SphereCollider>().enabled     = false;
         Systems.Inventory.AddItem(PotWithWater, 1);
         GameObject.Find("BoilWaterMaster").GetComponent <BoilWaterMaster>().FillPotWithWater();
     }
     else
     {
         _interact.SetInteractText("Go talk to Ahmad about water");
         //BoilWater.SetActive(false);
     }
 }
Beispiel #14
0
 public void Interaction()
 {
     if (_inventory.HasItem(Shovel, 1) && _inventory.HasItem(Rope, 1))
     {
         if (GameObject.Find("LatrineLowPointer") != null)
         {
             GameObject.Find("LatrineLowPointer").GetComponent <FlatFollow>().disappear();
         }
         if (SituationNumber == 2)
         {
             if (GameObject.Find("LatrineHighPointer") != null)
             {
                 GameObject.Find("LatrineHighPointer").GetComponent <FlatFollow>().disappear();
             }
             if (GameObject.Find("FrankAlert") != null)
             {
                 GameObject.Find("FrankAlert").GetComponent <FlatFollow>().appear();
             }
             if (GameObject.Find("ZeldaAlert") != null)
             {
                 GameObject.Find("ZeldaAlert").GetComponent <FlatFollow>().appear();
             }
             hint.GetComponent <HintController>().AllTaskCompleted(GameObject.Find("AfterLatrineTalk"));
             hint.GetComponent <HintController>().StartThisTask("Toilet");
         }
         SceneManager.LoadScene(MiniGameSceneName, LoadSceneMode.Additive);
         SceneManager.sceneLoaded += StartMinigame;
         _interact.enabled         = false;
         House.SetActive(false);
         Player.SetActive(false);
     }
     else
     {
         _interact.SetInteractText("Go talk to Frank about sanitation, get a rope and a shovel");
     }
 }
 public void Interaction()
 {
     _interact.SetInteractText("Press 'E' to dig");
 }
Beispiel #16
0
 public void Interaction()
 {
     _interact.SetInteractText("Press 'E' to Build Sanitation System");
 }
Beispiel #17
0
 public void OnEnter()
 {
     _interact.SetInteractText(_satisfied? SATISFIED:NOT_SATISFIED);
     _interact.BlinkWhenPlayerNear = _satisfied;
 }
 public void Interaction()
 {
     _interact.SetInteractText("Press 'E' to move the barrel.");
 }
 public void Interaction()
 {
     _interact.SetInteractText("Press 'E' to Shut Off Gas Valve.");
 }
 public void Interaction()
 {
     _interact.SetInteractText("Press 'E' to use pit latrine");
 }
 public void Interaction()
 {
     _interact.SetInteractText("Press 'E' to build sanitation system");
 }
 public void Interaction()
 {
     _interact.SetInteractText("Press 'E' to fill the pot with water");
 }
Beispiel #23
0
 public void Interaction()
 {
     _interact.SetInteractText("Press 'E' to get water from water heater");
 }
 // Update is called once per frame
 public void Interaction()
 {
     _interact.SetInteractText("Press 'E' to save Tsu");
 }