Пример #1
0
    void Start()
    {
        electroPanel = FindObjectOfType <ElectroPanel>();
        door         = FindObjectOfType <SpawnRoomDoor>();

        isColliding = false;
    }
    void Start()
    {
        audioPlayer       = GetComponent <AudioSource>();
        doorCollider      = FindObjectOfType <OpenDoorCollider>();
        openDoorAnimation = GetComponent <Animation>();
        electroPanel      = FindObjectOfType <ElectroPanel>();
        lampsToTurnOn     = GameObject.FindGameObjectsWithTag("TurnOn");
        sink = GameObject.FindGameObjectWithTag("Sink");

        foreach (GameObject light in lampsToTurnOn)
        {
            light.SetActive(false);
        }

        isFirstTry = true;
        isDoorOpen = false;
        isActive   = false;
    }