Example #1
0
 /// <summary>
 /// Marks a region as 'absorbed', aka un-marks it as changed. This is used by Notes during scoring to mark they have acknowledged this region of input.
 /// This prevents, e.g, a tap in a fast stream from being scored for 2 or more notes instead of only the closest one (as the closest one would 'absorb' the change first)
 /// </summary>
 /// <param name="position">The position to absorb</param>
 public void AbsorbChangesInRange(LanePosition position)
 {
     for (int i = 0; i < position.Width; i++)
     {
         changes[i + position.Lane] = false;
     }
 }
Example #2
0
        /// <summary>
        /// Check if any input is 'down' (currently pressed/tapped) in the given range.
        /// </summary>
        /// <param name="position">The position to check</param>
        /// <returns>True if any input is 'down' in the given range.</returns>
        public bool ActiveInRange(LanePosition position)
        {
            for (int i = 0; i < position.Width; i++)
            {
                if (States[i + position.Lane] > 0)
                {
                    return(true);
                }
            }

            return(false);
        }
Example #3
0
        /// <summary>
        /// Check if any input is has changed from up to down in the given range.
        /// </summary>
        /// <param name="position">The position to check</param>
        /// <returns>True if any input has changed value since the last frame in the given range.</returns>
        public bool DownInRange(LanePosition position)
        {
            for (int i = 0; i < position.Width; i++)
            {
                if (changes[i + position.Lane])
                {
                    return(true);
                }
            }

            return(false);
        }