コード例 #1
0
        private void RegisterInputHandlers()
        {
            _inputBinder = Info.Owner.GetComponent <IInputBinderInterface>();

            if (_inputBinder != null)
            {
                _menuInputHandler = new InGameMenuInputHandler();
                _inputBinder.RegisterInputHandler(_menuInputHandler);

                _virtualMouseInputHandler = new VirtualMouseInputHandler(VirtualMouseInstance.CurrentVirtualMouse);
                _inputBinder.RegisterInputHandler(_virtualMouseInputHandler);
            }
        }
コード例 #2
0
        protected override void OnStart()
        {
            _inputBinderInterface = Info.Owner.GetComponent <IInputBinderInterface>();

            _virtualMouseInputHandler = new VirtualMouseInputHandler(VirtualMouseInstance.CurrentVirtualMouse);

            _inputBinderInterface.RegisterInputHandler(_virtualMouseInputHandler);
        }
コード例 #3
0
        private void RegisterForInput(CharacterComponent inCharacter)
        {
            _locomotionInputHandler  = new LocomotionInputHandler(Info.Owner.GetComponent <IMovementInterface>(), inCharacter.ActiveController.GetComponent <IPlayerCameraInterface>(), Info.Owner.GetComponent <IHeldItemInterface>());
            _interactionInputHandler = new InteractionInputHandler(Info.Owner.GetComponent <IInteractionInterface>());
            _pauseInputHandler       = new PauseInputHandler(GameServiceProvider.CurrentInstance.GetService <ITimeServiceInterface>());
            _companionInputHandler   = new CompanionInputHandler(Info.Owner.GetComponent <ICompanionSetInterface>());
            _gadgetInputHandler      = new GadgetInputHandler(Info.Owner.GetComponent <IGadgetSetInterface>());

            _inputBinderInterface = Info.Owner.GetComponent <IInputBinderInterface>();

            if (_inputBinderInterface != null)
            {
                _inputBinderInterface.RegisterInputHandler(_gadgetInputHandler);
                _inputBinderInterface.RegisterInputHandler(_companionInputHandler);
                _inputBinderInterface.RegisterInputHandler(_pauseInputHandler);
                _inputBinderInterface.RegisterInputHandler(_interactionInputHandler);
                _inputBinderInterface.RegisterInputHandler(_locomotionInputHandler);
            }
        }
コード例 #4
0
 public override void Start()
 {
     if (_inputBinderInterface != null)
     {
         _inputBinderInterface.RegisterInputHandler(_boundHandler);
     }
     else
     {
         Debug.LogError("Failed to register Custom handler on InputReceivedActionStateCondition!");
     }
 }