Beispiel #1
0
    public static CameraFollowZone SortCameraZones()
    {
        CameraFollowZone oldCamera = s_currentCamera;

        s_occupiedCameraZones.Sort(new CompareCameraPriority());

        if (debug_messages)
        {
            print("list cameras");
            for (int i = 0; i < s_occupiedCameraZones.Count; i++)
            {
                print(s_occupiedCameraZones[i].m_priority);
            }
            print("list over");
        }
        if (s_occupiedCameraZones.Count == 0)
        {
            s_currentCamera = null;
        }
        else if (oldCamera != s_occupiedCameraZones[0])
        {
            s_occupiedCameraZones[0].ActivateCamera();
        }

        if (oldCamera != null && oldCamera != s_currentCamera)
        {
            oldCamera.m_activated = false;
        }

        return(s_currentCamera);
    }
Beispiel #2
0
    //█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█

    public void ActivateCamera()
    {
        s_currentCamera = this;
        m_activated     = true;

        if (m_zoneMusic != null)
        {
            if (s_zoneMusic == null)
            {
                s_zoneMusic = m_zoneMusic;
            }
            else
            {
                StartCoroutine(TransitionMusic(m_zoneMusic));
            }
        }
    }