16 lines
325 B
C#
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;
|
|
}
|
|
|
|
}
|