Esempio n. 1
0
    public virtual void Update()
    {
        if (Application.isPlaying && GameManager.deadPlayers != null)
        {
            if (IsZoneActivated())
            {
                if (GetPlayersInside().Count *(1 + GameManager.deadPlayers.Count) < minPlayersRequired)
                {
                    DesactivateZone();
                    if (desactivateCameraOnZoneExit)
                    {
                        linkedCameraBehaviour.DesactivateCamera();
                    }
                }
            }
            else
            {
                if (GetPlayersInside() != null && GetPlayersInside().Count *(1 + GameManager.deadPlayers.Count) >= minPlayersRequired)
                {
                    ActivateZone();
                    linkedCameraBehaviour.ActivateCamera();
                }
            }
        }
        switch (type)
        {
        case CameraCustomType.Combat:
            UpdateCombatZone();
            break;

        case CameraCustomType.Circle:
            UpdateCircleZone();
            break;
        }
    }
Esempio n. 2
0
    private void OnTriggerEnter(Collider other)
    {
        switch (transitionCondition)
        {
        case TransitionRequirement.MiddlePoint:
            if (!linkedCamera.activated && other.tag == "MiddlePoint")
            {
                linkedCamera.ActivateCamera();
            }
            break;

        case TransitionRequirement.OnePlayer:
            if (!linkedCamera.activated && other.tag == "Player")
            {
                linkedCamera.ActivateCamera();
            }
            break;
        }
    }