Esempio n. 1
0
        //----------------------------------------------------------------------------
        //  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;

            }
        }
Esempio n. 2
0
 private void Start()
 {
     controlMapper = GetComponent <ControlMapper>();
     inputManager  = GameObject.Find("Rewired Input Manager").GetComponent <Rewired.InputManager>();
     controlMapper.rewiredInputManager = inputManager;
 }