private void OnGUI() { if (MyInfoManager.Instance.isGuiOn) { VerifyBndMatch(); GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); GUI.depth = (int)guiDepth; GUI.enabled = !DialogManager.Instance.IsModal; Rect position = new Rect((float)((Screen.width - scoreBg.width) / 2), (!bndMatch.AmIUsingBuildGun) ? 0f : paletteOffset, (float)scoreBg.width, (float)scoreBg.height); GUI.BeginGroup(position); TextureUtil.DrawTexture(rcBndMatchScoreBg, scoreBg, ScaleMode.StretchToFill); if (MyInfoManager.Instance.IsRedTeam()) { flickerRed.Draw(); } else { flickerBlue.Draw(); } redScoreFont.Print(crdRed, redTeamScore); blueScoreFont.Print(crdBlue, blueTeamScore); goalFont.Print(crdGoal, RoomManager.Instance.KillCount); GUI.EndGroup(); GUI.enabled = true; GUI.skin = skin; } }
private void OnGUI() { if (MyInfoManager.Instance.isGuiOn) { GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); GUI.depth = (int)guiDepth; GUI.enabled = !DialogManager.Instance.IsModal; GUI.BeginGroup(new Rect(((float)Screen.width - size.x) / 2f, 0f, size.x, size.y)); TextureUtil.DrawTexture(new Rect(0f, 0f, size.x, size.y), scoreBg, ScaleMode.StretchToFill); if (MyInfoManager.Instance.IsRedTeam()) { flickerRed.Draw(); } else { flickerBlue.Draw(); } redScoreFont.Print(crdRed, redTeamScore); blueScoreFont.Print(crdBlue, blueTeamScore); goalFont.Print(crdGoal, RoomManager.Instance.KillCount); GUI.EndGroup(); GUI.enabled = true; GUI.skin = skin; } }
private void DrawRounding() { GUI.BeginGroup(new Rect(((float)Screen.width - size.x) / 2f, 0f, size.x, size.y)); TextureUtil.DrawTexture(new Rect(0f, 0f, size.x, size.y), scoreBg, ScaleMode.StretchToFill); curFont.Print(crdCurrent, cur); totalFont.Print(crdTotal, total); GUI.EndGroup(); }
protected void DrawAmmo() { if (MyInfoManager.Instance.isGuiOn && null != ammoBg && null != icon) { Rect position = new Rect((float)(Screen.width - ammoBg.width - 1), (float)(Screen.height - ammoBg.height - 1), (float)ammoBg.width, (float)ammoBg.height); TextureUtil.DrawTexture(position, ammoBg); float num = 40f; float num2 = (float)icon.width * num / (float)icon.height; TextureUtil.DrawTexture(new Rect(position.x + (position.width - num2) / 2f, position.y + 10f, num2, num), icon, ScaleMode.StretchToFill); ammoFont.Print(new Vector2((float)(Screen.width - 10), (float)(Screen.height - 12)), NoCheat.Instance.UnhideVal(NoCheat.WATCH_DOG.MAIN_AMMO, curAmmo)); } }
protected void DrawAmmo() { if (MyInfoManager.Instance.isGuiOn) { Texture2D weaponBy = TItemManager.Instance.GetWeaponBy((int)base.weaponBy); if (null != ammoBg && null != weaponBy) { Rect position = new Rect((float)(Screen.width - ammoBg.width - 1), (float)(Screen.height - ammoBg.height - 1), (float)ammoBg.width, (float)ammoBg.height); TextureUtil.DrawTexture(position, ammoBg); float num = 40f; float num2 = (float)weaponBy.width * num / (float)weaponBy.height; TextureUtil.DrawTexture(new Rect(position.x + (position.width - num2) / 2f, position.y + 10f, num2, num), weaponBy, ScaleMode.StretchToFill); ammoFont.Print(new Vector2((float)(Screen.width - 10), (float)(Screen.height - 12)), NoCheat.Instance.UnhideVal(NoCheat.WATCH_DOG.SPECIAL_AMMO, curAmmo)); } } }
private void OnGUI() { if (MyInfoManager.Instance.isGuiOn && bLoaded) { GUI.skin = GUISkinFinder.Instance.GetGUISkin(); GUI.depth = (int)guiDepth; GUI.enabled = !DialogManager.Instance.IsModal; Rect position = new Rect((float)(Screen.width / 2 - defenseStateBg.width / 2), 0f, (float)defenseStateBg.width, (float)defenseStateBg.height); TextureUtil.DrawTexture(position, defenseStateBg, ScaleMode.StretchToFill, alphaBlend: true); if (MyInfoManager.Instance.IsRedTeam()) { flickerRed.ResetAddPosition(); flickerRed.AddPositionX((float)(Screen.width / 2)); flickerRed.Draw(); } else { flickerBlue.ResetAddPosition(); flickerBlue.AddPositionX((float)(Screen.width / 2)); flickerBlue.Draw(); } Vector2 pos = new Vector2((float)(Screen.width / 2) - redPt, 20f); Vector2 pos2 = new Vector2((float)(Screen.width / 2) + bluePt, 20f); hpFontPoint.Print(pos, DefenseManager.Instance.CoreLifeRed); hpFontPoint.Print(pos2, DefenseManager.Instance.CoreLifeBlue); Rect position2 = new Rect((float)(Screen.width / 2 - redBg.width - 10), 40f, (float)redBg.width, (float)redBg.height); TextureUtil.DrawTexture(position2, redBg, ScaleMode.StretchToFill, alphaBlend: true); Vector2 pos3 = new Vector2((float)(Screen.width / 2 - redBg.width + 6), 53f); LabelUtil.TextOut(pos3, DefenseManager.Instance.RedPoint.ToString(), "PointLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter); float gaugeValue = getGaugeValue(DefenseManager.Instance.RedPoint); if (gaugeValue > 0f) { float num = 150f - 150f * gaugeValue; GUI.BeginGroup(new Rect((float)(Screen.width / 2 - redBg.width + 27) + num, 53f, (float)redGauge.width * gaugeValue, (float)redGauge.height)); Rect position3 = new Rect(0f, 0f, (float)redGauge.width, (float)redGauge.height); TextureUtil.DrawTexture(position3, redGauge, ScaleMode.StretchToFill, alphaBlend: true); GUI.EndGroup(); } Rect position4 = new Rect((float)(Screen.width / 2 + 10), 40f, (float)blueBg.width, (float)blueBg.height); TextureUtil.DrawTexture(position4, blueBg, ScaleMode.StretchToFill, alphaBlend: true); Vector2 pos4 = new Vector2((float)(Screen.width / 2 + blueBg.width - 12), 53f); LabelUtil.TextOut(pos4, DefenseManager.Instance.BluePoint.ToString(), "PointLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter); float gaugeValue2 = getGaugeValue(DefenseManager.Instance.BluePoint); if (gaugeValue2 > 0f) { GUI.BeginGroup(new Rect((float)(Screen.width / 2 + 11), 53f, (float)blueGauge.width * gaugeValue2, (float)blueGauge.height)); Rect position5 = new Rect(0f, 0f, (float)blueGauge.width, (float)blueGauge.height); TextureUtil.DrawTexture(position5, blueGauge, ScaleMode.StretchToFill, alphaBlend: true); GUI.EndGroup(); } if (strQueue.Length > 0) { Rect position6 = new Rect((float)(Screen.width / 2 - 343), 100f, 686f, 65f); GUI.Box(position6, strQueue, "BoxMsgBg"); GUI.Box(new Rect((float)(Screen.width - 200), 0f, 200f, 104f), string.Empty, "BoxMoninfoBg"); TextureUtil.DrawTexture(new Rect((float)(Screen.width - 190), 3f, 80f, 98f), texQueue, ScaleMode.StretchToFill, alphaBlend: true); Color byteColor2FloatColor = GlobalVars.Instance.GetByteColor2FloatColor(242, 167, 25); LabelUtil.TextOut(new Vector2((float)(Screen.width - 110), 20f), StringMgr.Instance.Get("NAME"), "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleLeft); LabelUtil.TextOut(new Vector2((float)(Screen.width - 100), 40f), nameQueue, "MiniLabel", byteColor2FloatColor, GlobalVars.txtEmptyColor, TextAnchor.MiddleLeft); LabelUtil.TextOut(new Vector2((float)(Screen.width - 110), 60f), StringMgr.Instance.Get("NUCLEAR_DAMAGE"), "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleLeft); LabelUtil.TextOut(new Vector2((float)(Screen.width - 100), 80f), dmgQueue.ToString(), "MiniLabel", byteColor2FloatColor, GlobalVars.txtEmptyColor, TextAnchor.MiddleLeft); } if (MyInfoManager.Instance.CheckControllable() && !bDelayBattle && !MyInfoManager.Instance.BreakingInto) { float num2 = DefenseManager.Instance.GetWaveTable().interval - dtBattle; int num3 = (int)num2; Rect position7 = new Rect((float)(Screen.width / 2 - 343), 100f, 686f, 65f); GUI.Box(position7, StringMgr.Instance.Get("MON_GEN_WAIT") + " : " + num3.ToString(), "BoxMsgBg"); } if (statusMessage.Length > 0) { float a = 1f; float num4 = (statusDelta - (statusMessageLimit - 2f)) / 2f; if (num4 > 0f) { a = Mathf.Lerp(1f, 0f, num4); } LabelUtil.TextOut(new Vector2((float)(Screen.width / 2 + 2), (float)(Screen.height / 2 + 32)), statusMessage, "BigLabel", new Color(0f, 0f, 0f, a), GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter); LabelUtil.TextOut(new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2 + 30)), statusMessage, "BigLabel", new Color(0.91f, 0.6f, 0f, a), GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter); } GUI.enabled = true; } }
private void OnGUI() { if (MyInfoManager.Instance.isGuiOn) { GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); GUI.depth = (int)guiDepth; GUI.enabled = !DialogManager.Instance.IsModal; if (explosionMatch.Blastable) { TextureUtil.DrawTexture(new Rect((float)((Screen.width - bg.width) / 2), 55f, (float)bg.width, (float)bg.height), bg, ScaleMode.StretchToFill); if (deltaTime > 22f && beep) { TextureUtil.DrawTexture(new Rect((float)((Screen.width - flicker.width) / 2), 55f, (float)flicker.width, (float)flicker.height), flicker, ScaleMode.StretchToFill); } float remainTime = GetRemainTime(); int num = Mathf.FloorToInt(remainTime * 100f); int[] array = new int[4]; int num2 = 1000; for (int i = 0; i < 4; i++) { array[i] = num / num2; num %= num2; num2 /= 10; } d0.Print(new Vector2((float)(Screen.width / 2), 72f), array[0]); d1.Print(new Vector2((float)(Screen.width / 2 + 13), 72f), array[1]); d2.Print(new Vector2((float)(Screen.width / 2 + 23), 72f), array[2]); d3.Print(new Vector2((float)(Screen.width / 2 + 36), 72f), array[3]); TextureUtil.DrawTexture(new Rect((float)((Screen.width - colon.width) / 2 + 18), 72f, (float)colon.width, (float)colon.height), colon, ScaleMode.StretchToFill); } if (Application.loadedLevelName.Contains("Tutor")) { Camera camera = null; GameObject gameObject = GameObject.Find("Main Camera"); if (null == gameObject) { Debug.LogError("Fail to find mainCamera for tutor arrow"); } else { camera = gameObject.GetComponent <Camera>(); if (null == camera) { Debug.LogError("Fail to get mainCam for tutor arrow"); } } Vector3 position = camera.transform.position; float num3 = Vector3.Distance(position, base.transform.position); if (num3 < 2f) { int num4 = custom_inputs.Instance.KeyIndex("K_ACTION"); string text = string.Format(StringMgr.Instance.Get("STRING_BOMB_INSTALL"), custom_inputs.Instance.InputKey[num4].ToString()); Vector2 vector = LabelUtil.CalcLength("BoxResult", text); vector.x += 60f; GUI.Box(new Rect((float)(Screen.width / 2) - vector.x / 2f, (float)(Screen.height / 2 + 20), vector.x, 30f), text, "BoxResult"); } } GUI.enabled = true; GUI.skin = skin; } }