private float GridOut(ResultUnit ru, float y) { ResultUnitEx resultUnitEx = ru as ResultUnitEx; if (resultUnitEx == null) { return(y); } int rank = -1; int mark = -1; BrickManDesc desc = BrickManManager.Instance.GetDesc(ru.seq); if (desc != null) { mark = desc.ClanMark; rank = desc.Rank; } else if (ru.seq == MyInfoManager.Instance.Seq) { mark = MyInfoManager.Instance.ClanMark; rank = MyInfoManager.Instance.Rank; } if (MyInfoManager.Instance.Seq == ru.seq) { GUI.Box(new Rect(myRowX, y - myRowSize.y / 2f, myRowSize.x, myRowSize.y), string.Empty, "BoxMyInfo"); } DrawClanMark(new Rect(markX - crdClanMarkSize.x / 2f, y - crdClanMarkSize.y / 2f, crdClanMarkSize.x, crdClanMarkSize.y), mark); int level = XpManager.Instance.GetLevel(ru.nextXp); Texture2D badge = XpManager.Instance.GetBadge(level, rank); if (null != badge) { TextureUtil.DrawTexture(new Rect(badgeX - crdBadgeSize.x / 2f, y - crdBadgeSize.y / 2f - 1f, crdBadgeSize.x, crdBadgeSize.y), badge); } LabelUtil.TextOut(new Vector2(nickX, y), ru.nickname, "Label", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter); LabelUtil.TextOut(new Vector2(scoreX, y), ru.score.ToString(), "Label", new Color(0.83f, 0.49f, 0.29f), GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter); LabelUtil.TextOut(new Vector2(killX, y), resultUnitEx.param.ToString(), "Label", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter); LabelUtil.TextOut(new Vector2(deathX, y), ru.death.ToString(), "Label", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter); LabelUtil.TextOut(new Vector2(xpX, y), ru.xp.ToString(), "Label", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter); LabelUtil.TextOut(new Vector2(pointX, y), ru.point.ToString(), "Label", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter); Vector2 vector = new Vector2(buffX, y); BuffDesc[] array = BuffManager.Instance.ToWhyArray(ru.buff); for (int i = 0; i < array.Length; i++) { GUI.Button(new Rect(vector.x, vector.y - crdBuffSize.y / 2f, crdBuffSize.x, crdBuffSize.y), new GUIContent(array[i].icon, StringMgr.Instance.Get(array[i].tooltip)), "InvisibleButton"); vector.x += crdBuffSize.x + 2f; } if (dicLeveler.ContainsKey(ru.seq)) { TextureUtil.DrawTexture(new Rect(vector.x, vector.y - crdLevelupSize.y / 2f, crdLevelupSize.x, crdLevelupSize.y), levelUpIcon, ScaleMode.StretchToFill); } return(y + offset); }
public int Compare(ResultUnitEx ru) { if (score == ru.score) { if (kill == ru.kill) { return(death.CompareTo(ru.death)); } return(-kill.CompareTo(ru.kill)); } return(-score.CompareTo(ru.score)); }