diff options
Diffstat (limited to 'marching/Assets/Scripts/Utils/FPSScript.cs')
-rw-r--r-- | marching/Assets/Scripts/Utils/FPSScript.cs | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/marching/Assets/Scripts/Utils/FPSScript.cs b/marching/Assets/Scripts/Utils/FPSScript.cs deleted file mode 100644 index 9c9a444..0000000 --- a/marching/Assets/Scripts/Utils/FPSScript.cs +++ /dev/null @@ -1,33 +0,0 @@ -using UnityEngine; -using UnityEngine.UI; -using System.Collections; - -namespace FBCapture -{ - public class FPSScript : MonoBehaviour - { - /// <summary> - /// Delta time - /// </summary> - float deltaTime = 0.0f; - - /// <summary> - /// It will be used for printing out fps text on screen - /// </summary> - Text text; - - void Start() - { - text = GetComponent<Text>(); - } - - void Update() - { - deltaTime += (Time.deltaTime - deltaTime) * 0.1f; - float msec = deltaTime * 1000.0f; - float fps = 1.0f / deltaTime; - text.text = string.Format("{0:0.0} ms ({1:0.} fps)", msec, fps); - } - } - -} |