コード例 #1
0
        /// <summary>
        /// If an axis with the requested name exists, and it is of type 'RemoteAxis', the axis' value will be changed.
        /// </summary>
        public static void SetRemoteAxisValue(string inputConfigName, string axisName, float value)
        {
            AxisConfiguration axisConfig = GetAxisConfiguration(inputConfigName, axisName);

            if (axisConfig == null)
            {
                throw new ArgumentException(string.Format("An axis named \'{0}\' does not exist in the input configuration named \'{1}\'", axisName, inputConfigName));
            }

            axisConfig.SetRemoteAxisValue(value);
        }
コード例 #2
0
ファイル: InputManager.cs プロジェクト: tammukul/InputManager
        /// <summary>
        /// If an axis with the requested name exists, and it is of type 'RemoteAxis', the axis' value will be changed.
        /// </summary>
        public static void SetRemoteAxisValue(string inputConfigName, string axisName, float value)
        {
            AxisConfiguration axisConfig = GetAxisConfiguration(inputConfigName, axisName);

            if (axisConfig != null)
            {
                axisConfig.SetRemoteAxisValue(value);
            }
            else
            {
                Debug.LogError(string.Format("An axis named \'{0}\' does not exist in the input configuration named \'{1}\'", axisName, inputConfigName));
            }
        }