1. svn -> git

This commit is contained in:
2017-04-12 01:23:07 +09:00
commit daaaf2997b
406 changed files with 68990 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
using UnityEngine;
[AddComponentMenu("Destructible 2D/D2D FPS Counter")]
public class D2D_FpsCounter : MonoBehaviour
{
public GUIText Text;
private float counter;
private int frames;
private float fps;
protected virtual void Update()
{
counter += Time.deltaTime;
frames += 1;
if (counter >= 1.0f)
{
fps = (float)frames / counter;
counter = 0.0f;
frames = 0;
}
if (Text != null)
{
Text.text = "FPS: " + fps.ToString("0");
}
}
}