示例#1
0
 public InterplanetaryCameraController(CameraManipulator cameraManipulator,
                                       ControllerManipulator controllerManipulator, Transform controllerTransform, Transform cameraTransform)
 {
     _cameraManipulator         = cameraManipulator;
     _controllerManipulator     = controllerManipulator;
     _controllerTransform       = controllerTransform;
     _cameraTransform           = cameraTransform;
     GameState.Get.ModeChanged += HandleModeChange;
 }
示例#2
0
    private void Start()
    {
        var cameraTransform     = GetComponentInChildren <Camera>().transform;
        var controllerTransform = transform;

        _cameraManipulator     = new CameraManipulator(cameraTransform);
        _controllerManipulator = new ControllerManipulator(controllerTransform);

        Planetary = new PlanetaryCameraController(_cameraManipulator, _controllerManipulator, cameraTransform, controllerTransform);
        UpdatePlanetaryParameters();

        Interplanetary = new InterplanetaryCameraController(_cameraManipulator, _controllerManipulator, controllerTransform, cameraTransform);
        UpdateInterplanetaryParameters();
    }