Example #1
0
    // Update is called once per frame.
    void Update()
    {
        int prevFloor = floor;

        floor = GetFloor(gameObject);
        if (floor != prevFloor)
        {
            audioController.ChangeFloor();
        }
        CheckTargetFloor();
        floorText.text = targetFloor != -1 ? floor + " -> " + targetFloor : "No spots.";
    }