public static void Draw() { if (!ChooseTeam.show) { return; } ChooseTeam.mpos = new Vector2(Input.mousePosition.x, (float)Screen.height - Input.mousePosition.y); if (ChooseTeam.rLineTeam0.Contains(ChooseTeam.mpos)) { GUI.color = new Color(1f, 0.2f, 0f, 1f); } else { GUI.color = new Color(1f, 0.2f, 0f, 0.5f); } GUI.DrawTexture(ChooseTeam.rLineTeam0, ChooseTeam.tWhite); GUI.DrawTexture(ChooseTeam.rAnlgeTeam0, ChooseTeam.tAngle0); if (ChooseTeam.rLineTeam1.Contains(ChooseTeam.mpos)) { GUI.color = new Color(0f, 0.5f, 1f, 1f); } else { Color color = new Color(0f, 0.5f, 1f, 0.5f); GUI.color = color; GUI.color = color; } GUI.DrawTexture(ChooseTeam.rLineTeam1, ChooseTeam.tWhite); GUI.DrawTexture(ChooseTeam.rAnlgeTeam1, ChooseTeam.tAngle1); GUI.color = new Color(1f, 1f, 1f, 0.5f); GUI.DrawTexture(ChooseTeam.rBox0, ChooseTeam.tBlack); GUI.DrawTexture(ChooseTeam.rBox1, ChooseTeam.tBlack); GUI.DrawTexture(ChooseTeam.rMsgTeam, ChooseTeam.tBlack); GUI.color = Color.white; GUI2.DrawTextRes(ChooseTeam.rTextTeam0, "MERCS", TextAnchor.MiddleLeft, _Color.White, 0, 24, true); GUI2.DrawTextRes(ChooseTeam.rBox0, "1", TextAnchor.MiddleCenter, _Color.White, 0, 24, true); GUI2.DrawTextRes(ChooseTeam.rTextTeam1, "WARCORPS", TextAnchor.MiddleLeft, _Color.White, 0, 24, true); GUI2.DrawTextRes(ChooseTeam.rBox1, "2", TextAnchor.MiddleCenter, _Color.White, 0, 24, true); GUI2.DrawTextRes(ChooseTeam.rMsgTeam, Lang.Get("_CHOOSE_TEAM"), TextAnchor.MiddleCenter, _Color.White, 0, 18, true); if (GUI2.HideButton(ChooseTeam.rLineTeam0)) { ChooseTeam.Choose(0); } if (GUI2.HideButton(ChooseTeam.rLineTeam1)) { ChooseTeam.Choose(1); } }
private void Update() { if (ScoreBoard.gamemode == 3 && ChooseTeam.chooseTeamDelay) { ChooseTeam.chooseTeamDelay = false; base.StartCoroutine(this.ChooseTeamDelay()); } if (!ChooseTeam.show) { return; } if (Input.GetKeyUp(KeyCode.Alpha1)) { ChooseTeam.Choose(0); } else if (Input.GetKeyUp(KeyCode.Alpha2)) { ChooseTeam.Choose(1); } else if (Input.GetKeyUp(KeyCode.Escape)) { ChooseTeam.SetActive(false); } }