Пример #1
0
 public void ChangeRoom(room target)
 {
     if (abandonment)
     {
         int rand = Random.Range(0, 2);
         if (rand == 0)
         {
             this.transform.position = target.getWatcherSpawn().transform.position;
             Debug.Log("Moving Watcher to Location");
             currentRoom = target;
             Candles     = currentRoom.getRoomObject().GetComponentsInChildren <CandleScript>();
         }
         else
         {
             Mask.transform.position = target.getWatcherSpawn().transform.position;
             Debug.Log("Moving Mask to Location");
             this.transform.position = maskStartPosition.transform.position;
             currentRoom             = target;
             Candles = null;
         }
     }
     else
     {
         this.transform.position = target.getWatcherSpawn().transform.position;
         currentRoom             = target;
         Candles = currentRoom.getRoomObject().GetComponentsInChildren <CandleScript>();
     }
 }
Пример #2
0
    // Start is called before the first frame update
    void Start()
    {
        Rooms   = floor1Rooms;
        Candles = currentRoom.getRoomObject().GetComponentsInChildren <CandleScript>();

        circleAnim.gameObject.SetActive(false);
        ovTimer       = coolDownTimer;;
        sanityManager = player.GetComponent <SanityManager>();
        playerRoom    = player.GetComponent <PlayerMovement>().myRoom;
        manager       = FindObjectOfType <AudioManager>();

        Debug.Log("Watcher Current Room: " + currentRoom.name + ", Floor: " + currentRoom.floorNum);
    }