private void OpenMatchResult() { if (PauseScreen.Instance.IsPaused()) { PauseScreen.Instance.PauseTrigger(); } Cursor.visible = true; if (players.Count > 0) { Player[] playersOrderedList = players.ToArray(); System.Array.Sort(playersOrderedList, (y, x) => x.GetStatistic().KillCounter().CompareTo(y.GetStatistic().KillCounter())); if (!matchInterrupted) { playersOrderedList[0].Write(Command.ADDPOINT); } GameResultPanel result = FindObjectOfType <GameResultPanel>(); result.Show(playersOrderedList); } else { SceneLoader.LoadScene("Lobby"); } }
public ViewCooperativeGameForm(TestForm parent, string Coalition) { InitializeComponent(); G = Database.G.FindGame(Coalition); this.parent = parent; this.Coalition = Coalition; if (CGStudentProgress.CurrentSection == 6) { CreateArrays(0, 1); UI.ControlsAligner mpanel = new UI.ControlsAligner(MatrixesPanel); mpanel.AddElement(A); mpanel.AddElement(B, false); mpanel.Align(); RP_v1.Text += G.SingleGames[0].FirstPlayer + " = " + G.SingleGames[0].Ha.ToString("0.00"); RP_v2.Text += G.SingleGames[0].SecondPlayer + " = " + G.SingleGames[0].Hb.ToString("0.00");; RP_PriceLabel.Text += (G.SingleGames[0].Ha + G.SingleGames[0].Hb).ToString("0.00"); for (int i = 0; i < G.SingleGames[0].x.Count; i++) { RP_x.Text += G.SingleGames[0].x[i].ToString("0.00") + " "; } RP_x.Text += ")"; for (int i = 0; i < G.SingleGames[0].y.Count; i++) { RP_y.Text += G.SingleGames[0].y[i].ToString("0.00") + " "; } RP_y.Text += ")"; UI.ControlsAligner rpanel = new UI.ControlsAligner(GameResultPanel); rpanel.AddElement(RP_PriceLabel); rpanel.AddElement(RP_v1); rpanel.AddElement(RP_v2, false); rpanel.AddElement(RP_x); rpanel.AddElement(RP_y); rpanel.Align(); SkipBTN.Text = "Несущественная"; SkipBTN.Width = 200; FinishBTN.Text = "Существенная"; FinishBTN.Width = SkipBTN.Width; GameResultPanel.Show(); UI.ControlsAligner form = new UI.ControlsAligner(this); Task1Panel.Hide(); form.AddElement(NavigationPanel); form.AddElement(MatrixesPanel); form.AddElement(GameResultPanel); form.AddElement(SkipBTN, true, "Left"); form.AddElement(FinishBTN, false, "Right"); form.Align(); CreateNavigationPanel(); } else { this.ControlBox = false; SecondInterfaceSetup_Domination(); CGStudentProgress.NewSection(); A.ColumnHeaderMouseClick += new DataGridViewCellMouseEventHandler(ColumnHeadersMouseClick); A.RowHeaderMouseClick += new DataGridViewCellMouseEventHandler(RowHeaderMouseClick); B.ColumnHeaderMouseClick += new DataGridViewCellMouseEventHandler(ColumnHeadersMouseClick); B.RowHeaderMouseClick += new DataGridViewCellMouseEventHandler(RowHeaderMouseClick); } }