コード例 #1
0
 // Add object's score value to the total score earned.
 public void AddScore()
 {
     if (scoreManager != null)
     {
         scoreManager.UpdateScore(scorePoints);
     }
 }
コード例 #2
0
 /// <summary>
 /// Drops off the tourists and indicates success to the player
 /// </summary>
 private void DropOffSuccess()
 {
     dropOffSuccessAudio.Play();
     Deselect();
     //Remove Tourist from Inventory
     playerCharacter.Inventory.RemoveItem(InventoryLocation);
     scoreManager.UpdateScore(TOURIST_DROP_OFF_SCORE);
     uiManager.CursorOverUI = false;
     inventoryPopUpUI.DisplayPopUp("Exactly where I wanted to go!", false);
 }
コード例 #3
0
 public ActionResult EditScore(ScoreModel model)
 {
     if (ModelState.IsValid)
     {
         model.ModifiedBy = User.Identity.GetUserId();
         var result = _scoreMgr.UpdateScore(model);
         if (result.Succeeded == true)
         {
             TempData["message"] = $"Score{model.ScoreId} was successfully added!";
             ModelState.AddModelError(string.Empty, "Update was successfully ");
             return(RedirectToAction("Index"));
         }
         ModelState.AddModelError(string.Empty, result.Message);
         ViewBag.Error = $"Error occured : {result.Message}";
         return(View(model));
     }
     else
     {
         return(View(model));
     }
 }