gold_sprint_lpr/Assets/Scripts/GameScene/RAWTachometer.cs
2018-03-15 23:28:44 +01:00

16 lines
325 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Linq;
public class RAWTachometer : Tachometer {
public float delta = 1f;
public override float GetSpeed() {
int c = impulses.Count(i => i > Time.time - delta);
return c * distancePerTick / delta;
}
}