예제 #1
0
        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...";
                }
            });
        }