Пример #1
0
    //system handling
    private void AddToStaticArray()
    {
        if (InputX.timedInputArray == null)
        {
            InputX.timedInputArray = new TimedInput[] { this }
        }
        ;

        else
        {
            TimedInput[] newArray = new TimedInput[InputX.timedInputArray.Length + 1];
            for (int i = 0; i < InputX.timedInputArray.Length; i++)
            {
                newArray[i] = InputX.timedInputArray[i];
            }
            newArray[InputX.timedInputArray.Length] = this;
            InputX.timedInputArray = newArray;
        }
    }
Пример #2
0
 public static float Axis(TimedInput timedInput, bool firstFixedOnly = false)
 {
     return(Axis(timedInput.inputs, firstFixedOnly));
 }
Пример #3
0
 public static bool Up(TimedInput timedInput, bool firstFixedOnly = true)
 {
     return(Up(timedInput.inputs, firstFixedOnly));
 }
Пример #4
0
 public static bool Pressed(TimedInput timedInput, bool firstFixedOnly = false)
 {
     return(Pressed(timedInput.inputs, firstFixedOnly));
 }
Пример #5
0
 /// <summary>
 /// Determines whether two inputs are equal.
 /// </summary>
 /// <param name="timedInput">
 /// The input to compare.
 /// </param>
 /// <returns>
 /// A value indicating whether two inputs are equal.
 /// </returns>
 public bool Equals(TimedInput timedInput)
 {
     return this.inputValues == timedInput.inputValues && this.elapsedTime == timedInput.elapsedTime;
 }