Exemple #1
0
 private void OnCollisionStay(Collision collision)
 {
     print(gameObject.name);
     if (collision.gameObject.name == "ColDetector")
     {
         print("it workz");
         sidequests.AddBN(1);
     }
 }
Exemple #2
0
    void OnTriggerStay(Collider col)
    {
        if (col.name == "PunchZone" && Input.GetMouseButtonDown(1) && sidequests.ACounterStrikeDone == 1)
        {
            theTextBox.ReloadScript(AngryBuster);
            theTextBox.currentLine = 1;
            theTextBox.endAtLine   = 7;
            theTextBox.EnableTextBox();
            RasmusZone.SetActive(false);
        }

        if (col.name == "PhoneZone" && Input.GetMouseButtonDown(1))
        {
            sidequests.AddBN(1);
        }

        if (col.name == "HampusZone" && Input.GetMouseButtonDown(1) && sidequests.AngryBetaTesterDone == 1)
        {
            /*
             * theTextBox.ReloadScript(AngryHampus);
             * theTextBox.currentLine = 1;
             * theTextBox.endAtLine = 9;
             * theTextBox.EnableTextBox();
             * HildeZone.SetActive(false);
             */
        }

        if (col.name == "DittSkåp" && Input.GetMouseButtonDown(0))
        {
            open.SetActive(false);
            pauseMenu.click.SetActive(false);
            Screen.lockCursor             = false;
            FirstPersonController.canMove = false;
            Panel.SetActive(true);
            Cam.GetComponent <FirstPersonController>().enabled = false;

            if (PlayerPrefs.GetInt("HasJumpyBoots") == 1)
            {
                Pants.SetActive(true);
            }

            if (PlayerPrefs.GetInt("FoxMedallion") == 1)
            {
                FoxMedallion.SetActive(true);
            }

            if (PlayerPrefs.GetInt("Milk") == 1)
            {
                Milk.SetActive(true);
            }

            if (PlayerPrefs.GetInt("BasementKey") == 1)
            {
                BasementKey.SetActive(true);
            }

            if (PlayerPrefs.GetInt("Cookie") == 1)
            {
                Cookie.SetActive(true);
            }
        }
    }