Ejemplo n.º 1
0
    void Update()
    {
        deltaTime += (Time.unscaledDeltaTime - deltaTime) * 0.1f;
        float  msec      = deltaTime * 1000.0f;
        float  fps       = 1.0f / deltaTime;
        string msString  = string.Format("Ms: {0:0.0}", msec);
        string fpsString = string.Format("Fps: {0:0.}", fps);

        msPerFrameHook.UpdateValue(msString);
        fpsHook.UpdateValue(fpsString);
    }
 void Update()
 {
     if (generator.IsComplete())
     {
         GameObject.Destroy(gameObject);
         hook.Dispose();
     }
     else
     {
         hook.UpdateValue("Mapgeneration: " + generator.GetProgress() * 100 + "%");
     }
 }