コード例 #1
0
		public static async Task PublishScore (int score)
		{
			UserScore userscore = await AzureDB.GetUserScoreAsync ();
			if (userscore == null)
				await AzureDB.InsertScoreAsync (new UserScore () { UserName = UserAccount.Id, Score = score });
			else if (userscore.Score < score) {
				var entry = new UserScore () { Id = userscore.Id, UserName = UserAccount.Id, Score = score };
				await AzureDB.UpdateScoreAsync (entry);
			} else
				UserAccount.Score = userscore.Score;
		}
コード例 #2
0
ファイル: AzureDB.cs プロジェクト: jaehwan-jung/RPS-Arcade
		public static async Task InsertScoreAsync (UserScore score)
		{
			await scoreTable.InsertAsync (score);
		}
コード例 #3
0
ファイル: AzureDB.cs プロジェクト: jaehwan-jung/RPS-Arcade
		public static async Task UpdateScoreAsync (UserScore score)
		{
			await scoreTable.UpdateAsync (score);
		}