private void GameFinished(string WinnerID, string MyScore, string OpponentScore, string OpponentAttack, string AttackComment) { AllUtils.OpponentAttack = (AttackType)Convert.ToUInt16(OpponentAttack); InvokeUI(() => { pbOpponentAttack.Image = AllUtils.GetAttackImageFromCode((ushort)AllUtils.OpponentAttack); lblAttackInfo.Width = 438; lblAttackInfo.Text = AllUtils.GetAttackCommentaryFromCode(AttackComment); SyncScores(Convert.ToInt32(MyScore), Convert.ToInt32(OpponentScore)); if (WinnerID == string.Empty) { GameEndAnimation(Color.Gray); lblGameInfo.Text = "BERABERE!"; } else if (WinnerID == AllUtils.MyID) { GameEndAnimation(Color.FromArgb(92, 184, 17)); lblGameInfo.Text = "KAZANDINIZ!"; } else { GameEndAnimation(Color.FromArgb(254, 26, 0)); lblGameInfo.Text = "KAYBETTİNİZ..."; } }); }
private void MyAttackAccepted(string Attack) { AllUtils.MyAttack = (AttackType)Convert.ToUInt16(Attack); InvokeUI(() => { pbMyAttack.Image = AllUtils.GetAttackImageFromCode((ushort)AllUtils.MyAttack); lblAttackInfo.Text = string.Format("{0}\nseçildi...", AllUtils.GetAttackNameFromCode((ushort)AllUtils.MyAttack)); lblGameInfo.Text = "RAKİBİN SEÇİMİ BEKLENİYOR..."; pnlChooseAttack.Visible = false; pnlBattleArea.Visible = true; lblAttackInfo.Width = 142; }); }