Beispiel #1
0
        /// <inheritdoc />
        /// <summary>
        /// </summary>
        /// <param name="gameTime"></param>
        public override void Update(GameTime gameTime)
        {
            Time += gameTime.ElapsedGameTime.TotalMilliseconds;

            CalculateKeysPerSecond();
            Value = Kps.ToString();
            X     = -TotalWidth + SkinManager.Skin.Keys[MapManager.Selected.Value.Mode].KpsDisplayPosX;

            base.Update(gameTime);
        }
Beispiel #2
0
 /// <summary>
 ///     Calculates the keys per second every frame.
 /// </summary>
 private void CalculateKeysPerSecond()
 {
     for (var i = 0; i < Clicks.Count; i++)
     {
         if (Clicks[i] <= Time - 1000)
         {
             Clicks.RemoveAt(i);
             Value = Kps.ToString();
         }
     }
 }
 /// <summary>
 ///     Adds a click to the KPS times.
 /// </summary>
 public void AddClick()
 {
     Clicks.Add(Time);
     Value = Kps.ToString();
 }