示例#1
0
 private void UpdateDebugInformationUI()
 {
     fpsCounter.text    = string.Format("Framerate: {0:00.0} FPS", dbgInfo.GetFramerateSec());
     frameCounter.text  = string.Format("Frametime: {0:00.0} ms / {1:00.0} ms", dbgInfo.GetFrametime(), dbgInfo.GetPhysicsFrametime()); //Not optimal, since Update time is slower than FixedUpdate. For now it works, but it would be best to separate Update and Physics time.
     discInfo.text      = string.Format("Current Pos: {0}\nPredict Pos: {1}\nVelocity: {2}\nHeading: {3}\n", disc.transform.position, disc.GetComponentInChildren <Transform>().position, disc.GetComponent <Rigidbody>().velocity, disc.transform.eulerAngles.y);
     recordingInfo.text = string.Format("Recording:\t{0}\nIsReplaying:\t\t{1}\nCurrent Frame:\t{2}\nRecorded Frames:\t{3}", replayController.IsRecording(), replayController.IsReplaying(), replayController.CurrentFrame(), replayController.StoredFrame());
     scoreInfo.text     = string.Format("Game Mode:\t{0}\nScore:\t[{1}|{2}]\nIsAI:\t[{3}:{4}]\nAI Proficiency:\t[{5}|{6}]\nGame Paused:\t{7}", gameMode, players[0].GetPlayerScore(), players[1].GetPlayerScore(), players[0].aI, players[1].aI, players[0].aiResponse, players[1].aiResponse, isPaused);
 }