コード例 #1
0
    private void ConnectActionsWithCallbacks()
    {
        var interplanetaryMode = _controls.InterplanetaryMode;

        interplanetaryMode.Move.performed         += cameraController.Interplanetary.UpdateMoveAmounts;
        interplanetaryMode.Move.canceled          += cameraController.Interplanetary.UpdateMoveAmounts;
        interplanetaryMode.Zoom.performed         += cameraController.Interplanetary.Zoom;
        interplanetaryMode.ChoosePlanet.performed += planetChooser.Choose;

        var planetaryMode = _controls.PlanetaryMode;

        planetaryMode.Rotate.performed     += cameraController.Planetary.UpdateRotateAmounts;
        planetaryMode.Rotate.canceled      += cameraController.Planetary.UpdateRotateAmounts;
        planetaryMode.Zoom.performed       += cameraController.Planetary.Zoom;
        planetaryMode.ChooseMenu.performed += ctx => planetaryMenuChooser.Choose();

        _controls.Gameplay.CastRay.performed += ctx => raycast.Shoot();
    }