void PlayerGone() { if (!isCought) { return; } isCought = false; lightSource.DOKill(); lightSource.color = Color.white; lightSource.spotAngle = noSpotAngle; rotator.Rotate(); }
public void OnGUI() { float num = 0f; GUI.Box(crdLeftBg, string.Empty, "BoxBase"); GUI.Box(crdNickBg, string.Empty, "BoxNickBg"); GUI.BeginGroup(new Rect(crdselfviewBound.x, crdselfviewBound.y - num, crdselfviewBound.width, crdselfviewBound.height)); TextureUtil.DrawTexture(crdSelfView, selfView); GUI.EndGroup(); Color byteColor2FloatColor = GlobalVars.Instance.GetByteColor2FloatColor(244, 151, 25); Color byteColor2FloatColor2 = GlobalVars.Instance.GetByteColor2FloatColor(50, 191, 17); if (MyInfoManager.Instance.Seq == RoomManager.Instance.Master) { TextureUtil.DrawTexture(crdMaster, masterIcon, ScaleMode.StretchToFill); } if (MyInfoManager.Instance.ClanMark >= 0) { Texture2D bg = ClanMarkManager.Instance.GetBg(MyInfoManager.Instance.ClanMark); Color colorValue = ClanMarkManager.Instance.GetColorValue(MyInfoManager.Instance.ClanMark); Texture2D amblum = ClanMarkManager.Instance.GetAmblum(MyInfoManager.Instance.ClanMark); if (null != bg) { TextureUtil.DrawTexture(crdClanMark, bg); } Color color = GUI.color; GUI.color = colorValue; if (null != amblum) { TextureUtil.DrawTexture(crdClanMark, amblum); } GUI.color = color; } LabelUtil.TextOut(crdClanName, (MyInfoManager.Instance.ClanSeq < 0) ? StringMgr.Instance.Get("NO_CLAN") : MyInfoManager.Instance.ClanName, "Label", byteColor2FloatColor2, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft); LabelUtil.TextOut(crdNickname, MyInfoManager.Instance.Nickname, "Label", byteColor2FloatColor, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft); int level = XpManager.Instance.GetLevel(MyInfoManager.Instance.Xp); Texture2D badge = XpManager.Instance.GetBadge(level, MyInfoManager.Instance.Rank); if (null != badge) { TextureUtil.DrawTexture(new Rect(crdBadge.x, crdBadge.y, (float)badge.width, (float)badge.height), badge); } DoBriefingRoom(); float num2 = 0f; if (DoBuff(num)) { num2 += 20f; } if (DoChannelBuff(num, num2)) { num2 += 20f; } if (DoPCBangBuff(num, num2)) { num2 += 20f; } if (!DialogManager.Instance.IsModal && GlobalVars.Instance.MyButton(crdDetailBtn, new GUIContent(string.Empty, StringMgr.Instance.Get("DETAIL_USER_INFO")), "BtnDetail")) { CSNetManager.Instance.Sock.SendCS_PLAYER_DETAIL_REQ(MyInfoManager.Instance.Seq); } AutoRotator.ROTATE rot = AutoRotator.ROTATE.STOP; Rect position = new Rect(crdRotateL.x, crdRotateL.y - num, crdRotateL.width, crdRotateL.height); if (GUI.RepeatButton(position, string.Empty, "RotateL")) { rot = AutoRotator.ROTATE.RIGHT; } Rect position2 = new Rect(crdRotateR.x, crdRotateR.y - num, crdRotateR.width, crdRotateR.height); if (GUI.RepeatButton(position2, string.Empty, "RotateR")) { rot = AutoRotator.ROTATE.LEFT; } rotator.Rotate(rot); Rect position3 = new Rect(crdLine); position3.y -= num; Rect position4 = new Rect(crdLine2); position4.y -= num; Rect position5 = new Rect(crdShopPoint); position5.y -= num; Vector2 pos = new Vector2(crdGeneralPoint.x, crdGeneralPoint.y - num); GUI.Box(position3, string.Empty, "DivideLine"); GUI.Box(position5, new GUIContent(string.Empty, StringMgr.Instance.Get("GENERAL_POINT")), "ShopPoint"); LabelUtil.TextOut(pos, MyInfoManager.Instance.Point.ToString("n0"), "MiniLabel", byteColor2FloatColor2, GlobalVars.txtEmptyColor, TextAnchor.MiddleRight); position5.y += 20f; pos.y += 20f; if (BuildOption.Instance.Props.useBrickPoint) { GUI.Box(position5, new GUIContent(string.Empty, StringMgr.Instance.Get("BRICK_POINT")), "ShopBrick"); LabelUtil.TextOut(pos, MyInfoManager.Instance.BrickPoint.ToString("n0"), "MiniLabel", byteColor2FloatColor2, GlobalVars.txtEmptyColor, TextAnchor.MiddleRight); position5.y += 20f; pos.y += 20f; } GUI.Box(position5, new GUIContent(string.Empty, TokenManager.Instance.GetTokenString()), TokenManager.Instance.currentToken.skin); LabelUtil.TextOut(pos, MyInfoManager.Instance.Cash.ToString("n0"), "MiniLabel", byteColor2FloatColor2, GlobalVars.txtEmptyColor, TextAnchor.MiddleRight); position5.y += 20f; pos.y += 20f; GUI.Box(position5, new GUIContent(string.Empty, StringMgr.Instance.Get("FREE")), "ShopCoin"); LabelUtil.TextOut(pos, MyInfoManager.Instance.FreeCoin.ToString("n0"), "MiniLabel", byteColor2FloatColor2, GlobalVars.txtEmptyColor, TextAnchor.MiddleRight); GUI.Box(position4, string.Empty, "DivideLine"); if (mirrorType == MIRROR_TYPE.BASE) { int levelMixLank = XpManager.Instance.GetLevelMixLank(MyInfoManager.Instance.Xp, MyInfoManager.Instance.Rank); string text = StringMgr.Instance.Get("XP") + " ( " + XpManager.Instance.GetRank(levelMixLank) + " )"; LabelUtil.TextOut(crdXpLbl, text, "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleLeft); LabelUtil.TextOut(crdXpLbl2, XpManager.Instance.GetXpCountString(MyInfoManager.Instance.Xp), "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleRight); float ratio = XpManager.Instance.GetRatio(MyInfoManager.Instance.Xp); TextureUtil.DrawTexture(new Rect(crdXpGauge.x, crdXpGauge.y, xpGaugeSize.x, xpGaugeSize.y), scrollbarBg, ScaleMode.StretchToFill); TextureUtil.DrawTexture(new Rect(crdXpGauge.x, crdXpGauge.y, xpGaugeSize.x * ratio, xpGaugeSize.y), scrollbar, ScaleMode.StretchToFill); float num3 = Mathf.Floor(ratio * 10000f) / 100f; LabelUtil.TextOut(crdXp, num3.ToString("0.##") + "%", "MiniLabel", Color.white, Color.black, TextAnchor.MiddleCenter); GUI.Box(crdLine3, string.Empty, "DivideLine"); } if (!DialogManager.Instance.IsModal && Event.current.type == EventType.Repaint && GUI.tooltip.Length > 0) { if (GUI.tooltip == "item") { Vector2 pos2 = new Vector2(160f, 20f); DoBuffRows(ref pos2, calcHeight: true); Vector2 vector = GlobalVars.Instance.ToGUIPoint(Event.current.mousePosition); GUI.Window(1103, new Rect(vector.x, vector.y, pos2.x, pos2.y), ShowTooltip, string.Empty, "LineWindow"); GUI.tooltip = string.Empty; } else if (GUI.tooltip == "channel") { Vector2 pos3 = new Vector2(160f, 20f); DoChannelBuffRows(ref pos3, calcHeight: true); Vector2 vector2 = GlobalVars.Instance.ToGUIPoint(Event.current.mousePosition); GUI.Window(1104, new Rect(vector2.x, vector2.y, pos3.x, pos3.y), ShowTooltip, string.Empty, "LineWindow"); GUI.tooltip = string.Empty; } else if (GUI.tooltip == "pcbang") { Vector2 pos4 = new Vector2(160f, 20f); DoPCBangBuffRows(ref pos4, calcHeight: true); Vector2 vector3 = GlobalVars.Instance.ToGUIPoint(Event.current.mousePosition); GUI.Window(1105, new Rect(vector3.x, vector3.y, pos4.x, pos4.y), ShowTooltip, string.Empty, "LineWindow"); GUI.tooltip = string.Empty; } } }