Example #1
0
        public override float GetAxisRaw(string axisName)
        {
            float     axisVal = 0;
            InputAxis axis    = FindAxis(axisName);

            if (axis != null)
            {
                if (CanExecute() || axis.allowedStateOverride != 0)
                {
                    axisVal = axis.GetAxisRaw(PlayerId);
                }
            }

            return(axisVal);
        }
Example #2
0
        public override float GetAxis(string axisName)
        {
            float     axisVal = 0;
            InputAxis axis    = FindAxis(axisName);

            if (axis != null && IsEnabled && HaveControl)
            {
                //IF AXIS HAS A EXECUTION GAMESTATE OVERRIDE I WILL CHECK FOR THAT STATE
                if ((axis.allowedStateOverride != 0))
                {
                    axisVal = axis.GetAxis(PlayerId);
                }
                //ELSE I CHECK IF CAN BE EXECUTED BY THIS CLASS (MEANS THAT IT WILL CHECK GAMESTATES ALLOWED FROM THIS CLASS)
                else if (CanExecute())
                {
                    axisVal = axis.GetAxis(PlayerId);
                }
            }
            return(axisVal);
        }
Example #3
0
 protected virtual void GainControl(InputAxis inputAxis)
 {
     inputAxis.GainControl();
 }
Example #4
0
 protected virtual void ReleaseControl(InputAxis inputAxis)
 {
     inputAxis.ReleaseControl();
 }