Exemple #1
0
        /// <summary>
        /// Returns state of the specified axis on the InputFrom
        /// </summary>
        /// <param name="form">Input form to check against</param>
        /// <param name="axsID">ID of what axis to check</param>
        /// <returns></returns>
        private static float GetAxisState(InputForm form, GenericAxisID axsID)
        {
            float rtrnVal = 0f;

            if (form.m_axis.Length > 0 && (int)axsID <= form.m_axis.Length && axsID != GenericAxisID.NONE)
            {
                rtrnVal = form.m_axis[(int)axsID - 1];
            }

            return(rtrnVal);
        }
Exemple #2
0
        /// <summary>
        /// Returns state of the specified axis on the InputFrom
        /// </summary>
        /// <param name="form">Input form to check against</param>
        /// <param name="axsID">ID of what axis to check</param>
        /// <returns></returns>
        private static float GetAxisState(InputForm form, GenericAxisID axsID) {
            float rtrnVal = 0f;

            if (form.m_axis.Length > 0 && (int)axsID <= form.m_axis.Length && axsID != GenericAxisID.NONE) {
                rtrnVal = form.m_axis[(int)axsID - 1];
            }

            return rtrnVal;
        }