public void SwitchNextCamera()
    {
        Debug.Log("Camera Switch");

        switch (CurrentCamState)
        {
        case CameraState.AutoOrbital:

            // Change cam state
            CurrentCamState = CameraState.Orbital;

            // Update camera position from previous mode, fluid transition
            orbitalCamRef.XRot         = autoOrbitalCamRef.XRot;
            orbitalCamRef.YRot         = autoOrbitalCamRef.YRot;
            orbitalCamRef.RadiusVector = autoOrbitalCamRef.RadiusVector;

            // Change used current camera
            currentCam = orbitalCamRef;
            break;

        case CameraState.Orbital:

            // Change cam state
            CurrentCamState = CameraState.AutoOrbital;

            // Update camera position from previous mode, fluid transition
            autoOrbitalCamRef.XRot         = orbitalCamRef.XRot;
            autoOrbitalCamRef.YRot         = orbitalCamRef.YRot;
            autoOrbitalCamRef.RadiusVector = orbitalCamRef.RadiusVector;

            // Change used current camera
            currentCam = autoOrbitalCamRef;
            break;
        }
    }
Example #2
0
    void Start()
    {
        _controlServices = GetComponent <ControlServices>();
        _cam             = _controlServices.ControlledCamera;

        _lastOrbitDistance = (_minimumFollowingDistance + _maximumFollowingDistance) * 0.5f;
        GameState.Instance.OnPauseLevelChanged += new PauseLevelChanged(Instance_OnPauseLevelChanged);

        OnAcquiredControl();
    }
Example #3
0
    void Awake()
    {
        _layerMask          = new LayerMask();
        _layerMask          = 1 << LayerMask.NameToLayer("GrabbableObject");
        _controlServices    = GetComponent <ControlServices>();
        _cameraController   = _controlServices.ControlledCamera;
        _holdObjectFunction = GetComponent <HoldObjectFunction>();

        _state = ImpulseGunState.Idle;

        GameContext.Instance.Player.ImpulseBeamTool = this;
    }
Example #4
0
    public void SwitchNextCamera()
    {
        Debug.Log("Camera Switch");

        switch (CurrentCamState)
        {
        case CameraState.Behind:
            CurrentCamState = CameraState.Inside;
            currentCam      = insideCamRef;
            break;

        case CameraState.Inside:
            CurrentCamState = CameraState.OrbitalMouseClick;
            currentCam      = orbitalCamRef;
            break;

        case CameraState.OrbitalMouseClick:
            CurrentCamState = CameraState.Behind;
            currentCam      = behindCamRef;
            break;
        }
    }
 // Use this for initialization
 void Start()
 {
     Debug.Log("Starting " + this.GetType());
     CurrentCamState = CameraState.Orbital;
     currentCam      = orbitalCamRef;
 }
    public void SwitchNextCamera()
    {
        Debug.Log ("Camera Switch");

        switch (CurrentCamState) {

        case CameraState.AutoOrbital:

            // Change cam state
            CurrentCamState = CameraState.Orbital;

            // Update camera position from previous mode, fluid transition
            orbitalCamRef.XRot = autoOrbitalCamRef.XRot;
            orbitalCamRef.YRot = autoOrbitalCamRef.YRot;
            orbitalCamRef.RadiusVector = autoOrbitalCamRef.RadiusVector;

            // Change used current camera
            currentCam = orbitalCamRef;
            break;

        case CameraState.Orbital:

            // Change cam state
            CurrentCamState = CameraState.AutoOrbital;

            // Update camera position from previous mode, fluid transition
            autoOrbitalCamRef.XRot = orbitalCamRef.XRot;
            autoOrbitalCamRef.YRot = orbitalCamRef.YRot;
            autoOrbitalCamRef.RadiusVector = orbitalCamRef.RadiusVector;

            // Change used current camera
            currentCam = autoOrbitalCamRef;
            break;

        }
    }
 // Use this for initialization
 void Start()
 {
     Debug.Log ("Starting " + this.GetType ());
     CurrentCamState = CameraState.Orbital;
     currentCam = orbitalCamRef;
 }
Example #8
0
 // Use this for initialization
 void Start()
 {
     CurrentCamState = CameraState.Behind;
     currentCam      = behindCamRef;
 }
Example #9
0
 void Awake()
 {
     _controlServices  = GetComponent <ControlServices>();
     _cameraController = _controlServices.ControlledCamera;
 }