void InfoSession(PanelScore cs) { kills = 0; death = 0; total = 0; max_dmg = 0; killed_titan = 0; killed_human = 0; currentScore = cs; if (currentScore.titam_list.Count > 0) { foreach (PanelScore.Stats stats in currentScore.titam_list) { if (stats.death) { death = death + 1; } else { killed_titan = killed_titan + 1; kills = kills + 1; total = total + stats.damage; if (stats.damage > max_dmg) { max_dmg = stats.damage; } } } } }
private Game() { Score.Initialize(); PanelScore.Initialize(); Medal.Initialize(); }
void bo_righrt(bool flag) { if (flag) { if (!isOpen) { if (GUI.Button(new Rect(Screen.width - 250, Screen.height - 25f, 250f, 25f), INC.la("open_session"))) { isOpen = true; } } else { GUILayout.BeginArea(new Rect(Screen.width - 250, Screen.height - 250f, 250f, 250f), GUI.skin.box); if (GUILayout.Button(INC.la("my_session"))) { isOpen = false; } scrPos = GUILayout.BeginScrollView(scrPos); if (PanelScore.list != null && PanelScore.list.Count > 0) { for (int s = 0; s < PanelScore.list.Count; s++) { GUILayout.BeginVertical(GUI.skin.box); PanelScore myS = PanelScore.list[s]; string str = ""; str = str + "[" + myS.time + "]" + myS.nickname.toHex() + "\n"; str = str + "Time:" + ((int)myS.timeSession).ToString() + "\n"; str = str + "LVL:" + myS.levelinfo.name + "\n"; str = str + "DIFF:" + myS.difficulty + "\n"; GUILayout.Label(str); if (GUILayout.Button(INC.la("session_full"))) { is_Conecting = 2; InfoSession(myS); } GUILayout.EndVertical(); } } else { GUILayout.Label(INC.la("no_session")); } GUILayout.EndScrollView(); GUILayout.EndArea(); } } else { GUILayout.BeginArea(new Rect(50, 50, Screen.width - 100f, Screen.height - 100f), GUI.skin.box); GUILayout.BeginHorizontal(); GUILayout.BeginVertical(GUILayout.Width(200f)); GUILayout.Label(INC.la("session_list")); vector[0] = GUILayout.BeginScrollView(vector[0]); if (PanelScore.list != null && PanelScore.list.Count > 0) { for (int s = 0; s < PanelScore.list.Count; s++) { PanelScore myS = PanelScore.list[s]; if (GUILayout.Button("[" + myS.time + "]" + ((int)myS.timeSession).ToString())) { InfoSession(myS); } } } else { GUILayout.Label(INC.la("no_session")); } GUILayout.EndScrollView(); GUILayout.EndVertical(); GUILayout.BeginVertical(); GUILayout.BeginHorizontal(); GUILayout.Label(INC.la("sessionPlayer")); if (GUILayout.Button("<color=red>X</color>", GUILayout.Width(30f))) { is_Conecting = 0; } GUILayout.EndHorizontal(); vector[1] = GUILayout.BeginScrollView(vector[1]); if (currentScore != null) { GUILayout.Label("Time:" + currentScore.time + " Time Session:" + currentScore.timeSession.ToString("F") + "sc. Player name:" + currentScore.nickname.toHex() + "\n" + "Map name:" + currentScore.levelinfo.name + " Difficulty:" + currentScore.difficulty + "\n" + "Kills:" + kills + " Death:" + death + " Max Damage:" + max_dmg + " Total Damage:" + total); foreach (PanelScore.Stats stats in currentScore.titam_list) { string time = "[" + stats.time + "]" + "{" + stats.sessiontime.ToString("F") + "sc.}"; if (stats.death) { GUILayout.Label(time + " DEATH."); } else { if (stats.size > 0) { GUILayout.Label(time + " Damage:" + stats.damage + " Tian name:" + stats.titan_name.toHex() + " Size:" + stats.size.ToString("F")); } else { GUILayout.Label(time + " Player name:" + stats.titan_name.toHex()); } } } } else { GUILayout.Label(INC.la("no_curren_session")); } GUILayout.EndScrollView(); GUILayout.EndVertical(); GUILayout.EndHorizontal(); GUILayout.EndArea(); } }
private void Start() { m_panelScore = GameObject.Find("ScoreText").GetComponent <PanelScore>(); m_panelCombo = GameObject.Find("Combo").GetComponent <PanelCombo>(); }