5 protected TextWidget m_Text;
8 protected void OnReceive(
int fps,
int memoryKB,
int tickCount)
10 int memoryMB = memoryKB / 1024;
13 m_Text.SetTextFormat(
"FPS: %1<br />Uptime: %2<br />Memory: %3 MB", fps, uptime, memoryMB);
17 override void HandlerAttached(Widget w)
19 m_Text = TextWidget.Cast(w);
20 m_Text.SetText(
string.Empty);
23 if (m_ServerInfoManager)
24 m_ServerInfoManager.GetOnReceive().Insert(OnReceive);
28 override void HandlerDeattached(Widget w)
30 if (m_ServerInfoManager)
31 m_ServerInfoManager.GetOnReceive().Remove(OnReceive);