public void add(ICameraInput <TCamera> input)
 {
     EventHorizonBlazorInterop.Func <CachedEntity>(
         new object[]
     {
         new string[] { this.___guid, "add" }, input
     }
         );
 }
 public void remove(ICameraInput <TCamera> inputToRemove)
 {
     EventHorizonBlazorInterop.Func <CachedEntity>(
         new object[]
     {
         new string[] { this.___guid, "remove" }, inputToRemove
     }
         );
 }
 private void InitValues()
 {
     m_Input = InputManager.Instance;
     m_CameraTargetRotation = cameraTransform.localRotation;
 }
    public PlayerInput(IStateProxyInput playerStates, IPhysicsEventInput playerEvent, ICameraInput playerCamera)
    {
        _InputDeviceLayout = new InputDeviceLayout();

        #region Initialize Input Functionality
        //Toggle inputs
        _EventSprint = new Input_SprintEvent(playerStates.ProxySprint());
        _EventCrouch = new Input_CrouchEvent(playerStates.ProxyCrouch());

        //Analog stick inputs
        _EventWalk = new Input_WalkeEvent(playerStates.ProxyWalk());
        _EventLook = new Input_LookEvent(playerCamera.ProxyLook());

        //Button release inputs
        _EventJump = new Input_JumpEvent(playerStates.ProxyJump());
        #endregion

        #region Set Up Observers
        _EventWalk.GetObservable().AddObserver(playerStates.ProxySprintObserver());
        _EventWalk.GetObservable().AddObserver(playerEvent.PhysicsPlayer());
        _EventLook.GetObservable().AddObserver(playerCamera);
        #endregion

        #region Input Device Callback Functions
        //Analog inputs callback functions
        _InputDeviceLayout.Player.Walk.started   += ctx => _EventWalk.AnalogStart(ctx.ReadValue <Vector2>());
        _InputDeviceLayout.Player.Walk.performed += ctx => _EventWalk.AnalogPerform(ctx.ReadValue <Vector2>());
        _InputDeviceLayout.Player.Walk.canceled  += ctx => _EventWalk.AnalogCancel();

        _InputDeviceLayout.Player.Look.started   += ctx => _EventLook.AnalogStart(ctx.ReadValue <Vector2>());
        _InputDeviceLayout.Player.Look.performed += ctx => _EventLook.AnalogPerform(ctx.ReadValue <Vector2>());
        _InputDeviceLayout.Player.Look.canceled  += ctx => _EventLook.AnalogCancel();

        //Button release inputs callback functions
        _InputDeviceLayout.Player.Jump.started += ctx => _EventJump.ButtonStart();

        //Button hold inputs callback functions

        //Toogle inputs callback functions
        _InputDeviceLayout.Player.Sprint.started += ctx => _EventSprint.TogglePressed();
        _InputDeviceLayout.Player.Crouch.started += ctx => _EventCrouch.TogglePressed();

        #endregion
    }