Пример #1
0
    void Update()
    {
        //this is rose quest 1 (the quest to go to the runic circle)
        Quest thisQuest = QuestManager.ListOfQuests[2];

        if (playerNear == true && /* Input.GetKeyDown("q") && */ thisQuest.Completed == true /*&& isIndoors == false*/ && timestamp < Time.time)
        {
            timestamp = Time.time + 1f;
            if (outdoors)
            {
                outdoors = false;
                player.transform.position = indoorsSpawn.transform.position;
                float vol = Random.Range(volLowRange, volHighRange);
                //note readd the source play for music
                //source.PlayOneShot(doorOpening, vol);
                //camera.transform.position = new Vector3(indoorsSpawn.transform.position.x, this.transform.position.y, indoorsSpawn.transform.position.z);
                camera.transform.position = camera.GetComponent <CameraControls>().GetCameraPosFromPlayer();
                UpdateQuestTargets();
                MinimapIndicatorManager.Disable();
            }
            else
            {
                outdoors = true;
                player.transform.position = outdoorsSpawn.transform.position;
                float vol = Random.Range(volLowRange, volHighRange);
                //note readd the source play for music
                //source.PlayOneShot(doorOpening, vol);
                //outdoors = true;
                camera.transform.position = camera.GetComponent <CameraControls>().GetCameraPosFromPlayer();
                MinimapIndicatorManager.Enable();
            }
        }
    }
Пример #2
0
    void Update()
    {
        //this is the dragon boss quest
        Quest thisQuest = QuestManager.ListOfQuests[3];

        if (playerNear == true && /* Input.GetKeyDown("q") && */ thisQuest.Accepted == true && timestamp < Time.time)
        {
            timestamp = Time.time + 1f;
            if (outdoors)
            {
                outdoors = false;
                player.transform.position = indoorsSpawn.transform.position;
                //camera.transform.position = new Vector3(indoorsSpawn.transform.position.x, this.transform.position.y, indoorsSpawn.transform.position.z);
                camera.transform.position = camera.GetComponent <CameraControls>().GetCameraPosFromPlayer();
                DisableQuestCaveLoc();
                MinimapIndicatorManager.Disable();
            }
            else
            {
                outdoors = true;
                player.transform.position = outdoorsSpawn.transform.position;
                //outdoors = true;
                camera.transform.position = camera.GetComponent <CameraControls>().GetCameraPosFromPlayer();
                MinimapIndicatorManager.Enable();
            }
        }
    }