Ejemplo n.º 1
0
    public static void DeactivateCamera(string cameraName, float delay = 0.0f)
    {
        ICameraBinder desireCamera = instance.cameras[cameraName];

        if (desireCamera == null)
        {
            return;
        }
        CoroutineHandler.AfterWait(desireCamera.Deactivate, delay);
    }
Ejemplo n.º 2
0
    public static void ActiveCamera(string cameraName)
    {
        ICameraBinder instanceCamera = instance.cameras[cameraName];

        if (instanceCamera == null)
        {
            return;
        }
        if (instance.currentCamera != null)
        {
            instance.previousCamera = instance.currentCamera;
            instance.previousCamera.Deactivate();
        }

        instance.currentCamera = instanceCamera;
        instanceCamera.Activate();
    }