// Add object's score value to the total score earned. public void AddScore() { if (scoreManager != null) { scoreManager.UpdateScore(scorePoints); } }
/// <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); }
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)); } }