Exemple #1
0
        override public void Skip()
        {
            MainCamera mainCam = KickStarter.mainCamera;

            if (mainCam)
            {
                _Camera cam = linkedCamera;

                if (returnToLast)
                {
                    cam = mainCam.GetLastGameplayCamera();
                }

                if (cam)
                {
                    if (cam is GameCameraThirdPerson)
                    {
                        GameCameraThirdPerson tpCam = (GameCameraThirdPerson)cam;
                        tpCam.ResetRotation();
                    }

                    cam.MoveCameraInstant();
                    mainCam.SetGameCamera(cam);
                }
            }
        }
Exemple #2
0
        override public void Skip()
        {
            MainCamera mainCam = KickStarter.mainCamera;

            if (mainCam)
            {
                _Camera cam = linkedCamera;

                if (returnToLast && mainCam.lastNavCamera)
                {
                    if (mainCam.lastNavCamera != null && mainCam.attachedCamera == mainCam.lastNavCamera)
                    {
                        cam = (_Camera)mainCam.lastNavCamera2;
                    }
                    else
                    {
                        cam = (_Camera)mainCam.lastNavCamera;
                    }
                }

                if (cam)
                {
                    if (cam is GameCameraThirdPerson)
                    {
                        GameCameraThirdPerson tpCam = (GameCameraThirdPerson)cam;
                        tpCam.ResetRotation();
                    }

                    mainCam.SetGameCamera(cam);

                    cam.MoveCameraInstant();
                    mainCam.SnapToAttached();
                }
            }
        }
Exemple #3
0
        public override void Skip()
        {
            MainCamera mainCam = KickStarter.mainCamera;

            if (runtimeLinkedCamera && mainCam.attachedCamera != runtimeLinkedCamera)
            {
                if (runtimeLinkedCamera is GameCameraThirdPerson)
                {
                    GameCameraThirdPerson tpCam = (GameCameraThirdPerson)runtimeLinkedCamera;
                    tpCam.ResetRotation();
                }
                else if (runtimeLinkedCamera is GameCameraAnimated)
                {
                    GameCameraAnimated animCam = (GameCameraAnimated)runtimeLinkedCamera;
                    animCam.PlayClip();
                }

                runtimeLinkedCamera.MoveCameraInstant();
                mainCam.SetGameCamera(runtimeLinkedCamera);
            }
        }
        override public void Skip()
        {
            MainCamera mainCam = KickStarter.mainCamera;

            if (linkedCamera != null && mainCam.attachedCamera != linkedCamera)
            {
                if (linkedCamera is GameCameraThirdPerson)
                {
                    GameCameraThirdPerson tpCam = (GameCameraThirdPerson)linkedCamera;
                    tpCam.ResetRotation();
                }
                else if (linkedCamera is GameCameraAnimated)
                {
                    GameCameraAnimated animCam = (GameCameraAnimated)linkedCamera;
                    animCam.PlayClip();
                }

                linkedCamera.MoveCameraInstant();
                mainCam.SetGameCamera(linkedCamera);
            }
        }
Exemple #5
0
        override public float Run()
        {
            if (!isRunning)
            {
                isRunning = true;

                MainCamera mainCam = KickStarter.mainCamera;

                if (mainCam)
                {
                    _Camera cam = linkedCamera;

                    if (returnToLast)
                    {
                        cam = mainCam.GetLastGameplayCamera();
                    }

                    if (cam)
                    {
                        if (mainCam.attachedCamera != cam)
                        {
                            if (cam is GameCameraThirdPerson)
                            {
                                GameCameraThirdPerson tpCam = (GameCameraThirdPerson)cam;
                                tpCam.ResetRotation();
                            }
                            else if (cam is GameCameraAnimated)
                            {
                                GameCameraAnimated animCam = (GameCameraAnimated)cam;
                                animCam.PlayClip();
                            }

                            if (transitionTime > 0f && linkedCamera is GameCamera25D)
                            {
                                mainCam.SetGameCamera(cam, 0f);
                                ACDebug.LogWarning("Switching to a 2.5D camera (" + linkedCamera.name + ") must be instantaneous.", linkedCamera);
                            }
                            else
                            {
                                mainCam.SetGameCamera(cam, transitionTime, moveMethod, timeCurve, retainPreviousSpeed);

                                if (willWait)
                                {
                                    if (transitionTime > 0f)
                                    {
                                        return(transitionTime);
                                    }
                                    else if (linkedCamera is GameCameraAnimated)
                                    {
                                        return(defaultPauseTime);
                                    }
                                }
                            }
                        }
                    }
                }
            }
            else
            {
                if (linkedCamera is GameCameraAnimated && willWait)
                {
                    GameCameraAnimated animatedCamera = (GameCameraAnimated)linkedCamera;
                    if (animatedCamera.isPlaying())
                    {
                        return(defaultPauseTime);
                    }
                    else
                    {
                        isRunning = false;
                        return(0f);
                    }
                }
                else
                {
                    isRunning = false;
                    return(0f);
                }
            }

            return(0f);
        }
Exemple #6
0
        override public float Run()
        {
            if (!isRunning)
            {
                isRunning = true;

                MainCamera mainCam = KickStarter.mainCamera;

                if (mainCam)
                {
                    _Camera cam = linkedCamera;

                    if (returnToLast && mainCam.lastNavCamera)
                    {
                        if (mainCam.lastNavCamera != null && mainCam.attachedCamera == mainCam.lastNavCamera)
                        {
                            cam = (_Camera)mainCam.lastNavCamera2;
                        }
                        else
                        {
                            cam = (_Camera)mainCam.lastNavCamera;
                        }
                    }

                    if (cam)
                    {
                        if (mainCam.attachedCamera != cam)
                        {
                            if (cam is GameCameraThirdPerson)
                            {
                                GameCameraThirdPerson tpCam = (GameCameraThirdPerson)cam;
                                tpCam.ResetRotation();
                            }
                            else if (cam is GameCameraAnimated)
                            {
                                GameCameraAnimated animCam = (GameCameraAnimated)cam;
                                animCam.PlayClip();
                            }

                            mainCam.SetGameCamera(cam);
                            if (transitionTime > 0f)
                            {
                                if (linkedCamera is GameCamera25D)
                                {
                                    mainCam.SnapToAttached();
                                    Debug.LogWarning("Switching to a 2.5D camera (" + linkedCamera.name + ") must be instantaneous.");
                                }
                                else
                                {
                                    mainCam.SmoothChange(transitionTime, moveMethod, timeCurve);

                                    if (willWait)
                                    {
                                        return(transitionTime);
                                    }
                                }
                            }
                            else
                            {
                                cam.MoveCameraInstant();
                                mainCam.SnapToAttached();

                                if (linkedCamera is GameCameraAnimated && willWait)
                                {
                                    return(defaultPauseTime);
                                }
                            }
                        }
                    }
                }
            }
            else
            {
                if (linkedCamera is GameCameraAnimated && willWait)
                {
                    GameCameraAnimated animatedCamera = (GameCameraAnimated)linkedCamera;
                    if (animatedCamera.isPlaying())
                    {
                        return(defaultPauseTime);
                    }
                    else
                    {
                        isRunning = false;
                        return(0f);
                    }
                }
                else
                {
                    isRunning = false;
                    return(0f);
                }
            }

            return(0f);
        }