Example #1
0
        protected void Start()
        {
            InputManager inputManager = InputManager.Instance;
            GameSettings gs           = GameSettings.Instance;
            Rigidbody    rb           = GetComponent <Rigidbody>();

            _characterMover = new CharacterMover(inputManager.CharacterInputs, rb);
            _slingshotMover = new SlingshotMover(inputManager.SlingshotInputs, rb);

            _currentMover = _characterMover;
            OnUserSwitchedController.Listeners += BlockUserInteractions;
            OnCharacterReady.Listeners         += ActivateCharacterMovements;
            OnSlingshotReady.Listeners         += ActivateSlingshotMovements;
        }
Example #2
0
 private void ActivateSlingshotMovements(OnSlingshotReady _)
 {
     _currentMover = _slingshotMover;
     _canInteract  = true;
 }
Example #3
0
 private void ActivateCharacterMovements(OnCharacterReady _)
 {
     _currentMover = _characterMover;
     _canInteract  = true;
 }