コード例 #1
0
ファイル: HandScreen.cs プロジェクト: jaehwan-jung/RPS-Arcade
        private MatchResult GetMatchResult(bool didUserWin)
        {
            var matchResult = new MatchResult ();

            if (didUserWin)
                matchResult.Result = ResultType.Victory;
            else
                matchResult.Result = ResultType.Defeat;

            return matchResult;
        }
コード例 #2
0
		private async void HandleMatchResult (MatchResult result)
		{
			switch (result.Result) {
			case ResultType.Victory:
				DisplayTiming (result.TapTiming);
				UpdateScore (result.TapTiming);
				break;
			case ResultType.Draw:
			case ResultType.Defeat:
			case ResultType.WrongTiming:					
				PauseWhileShowingScores ();
				loadingOn = true;				
				await PublishScore ();			
				await ShowLeaderboard ();
				ShowFullAd ();
				RefreshAd ();
				loadingOn = false;
				break;
			default:
				throw new ArgumentException (string.Format ("Unrecognized MatchResult type: {0}", result.Result));
			}
		}
コード例 #3
0
 private void HandleMatchResult(MatchResult result)
 {
     switch (result) {
     case MatchResult.Victory:
         HandScreen.ChangeCollisionAreaColor (Color.Green);
         break;
     case MatchResult.Draw:
         HandScreen.ChangeCollisionAreaColor (Color.Yellow);
         break;
     case MatchResult.Defeat:
         HandScreen.ChangeCollisionAreaColor (Color.Red);
         break;
     case MatchResult.WrongTiming:
         HandScreen.ChangeCollisionAreaColor (Color.Blue);
         break;
     default:
         throw new ArgumentException ("Unrecognized MatchResult type");
         break;
     }
 }