Ejemplo n.º 1
0
    // Opens door, Wendigo moves to center of room and shouts
    IEnumerator EnterThroughDoor(float stoppingDistance)
    {
        barricade.BreakBarricade();
        frontDoor.OpenDoor();

        // make sure monster is facing the correct way
        this.transform.LookAt(location2.transform.position);

        while (Vector3.Distance(transform.position, location2.transform.position) > stoppingDistance)
        {
            _walking = true;
            MoveTowardsTarget(location2);
            yield return(null);
        }

        _walking = false;
        Shout();

        yield break;
    }
Ejemplo n.º 2
0
    /// <summary>
    /// Handles win by calling police
    /// </summary>
    IEnumerator DoPoliceWinCR()
    {
        yield return(new WaitForSeconds(3));

        // Disable Game UI
        DisableGameUI();

        // Set Camera
        mainCam.SetActive(false);
        policeCam.SetActive(true);

        copWalk.ApproachHouseAndDrawGun();

        yield return(new WaitForSeconds(2.5f));

        cultist.DoAction();

        yield return(new WaitForSeconds(4));

        WomanCine.GetComponent <CopWalk>().WalkForwardThenStop(2.5f);
        frontDoorCopWin.OpenDoor();

        yield return(new WaitForSeconds(1));

        copWalk.HolsterGun();

        yield return(new WaitForSeconds(2));

        winText.GetComponent <Text>().text = "After calling 911, the police finally arrived to the house and escorted the survivors to a safe location. ";
        winText.SetActive(true);

        yield return(new WaitForSeconds(4));

        winText2.GetComponent <Text>().text = "You have survived";
        winText2.SetActive(true);

        GameManager.Instance.HandleAfterWin(); // Tell gamemanager to handle after game stuff
    }
 public void TransitionToGame()
 {
     door.OpenDoor();
 }
 public void TransitionToGame()
 {
     PlayerPrefs.SetInt("hasPlayed", 0);
     door.OpenDoor();
 }