//---------------------------------------------------------------------------- // Event triggers and Handlers //---------------------------------------------------------------------------- private void HandleOnInput(object sender, InputManager.InputEventArgs inputEventArgs) { switch (inputEventArgs.InputType) { case InputType.MovementAxisChanged: Move (inputEventArgs.MovementAxis); break; case InputType.ButtonDown: if (inputEventArgs.InputButtonType == InputButtonType.Fire) { Fire(); } break; } }
private void Start() { controlMapper = GetComponent <ControlMapper>(); inputManager = GameObject.Find("Rewired Input Manager").GetComponent <Rewired.InputManager>(); controlMapper.rewiredInputManager = inputManager; }