// Update is called once per frame void Update() { DebugPrint(); if (m_BaseGoal != null) { m_BaseGoal.Update(); } m_hunger.Modify(Time.deltaTime * UnityEngine.Random.value * m_fHungerRate); m_thirst.Modify(Time.deltaTime * UnityEngine.Random.value * m_fThirstRate); }
public IActionResult EditNeeds([FromServices] DataContext dataContext, EditNeedsPost data) { SimpleNotifier noty = notifier(); if (!ModelState.IsValid) { List <Supplier> suppliers = dataContext.Suppliers.ToList(); noty.AddMessage(MsgTypes.Warning, "Problems saving, please try again"); return(View("EditNeeds", EditNeedsViewModel.FromPostData(data, suppliers))); } else { Need existingNeed = dataContext.Needs.Include(p => p.NeedPpeTypes).Single(n => n.Id == data.Request.Id); existingNeed.Modify(data, currentUserId); dataContext.SaveChanges(currentUserName); noty.AddMessage(MsgTypes.Success, "Successfully updated the Request"); return(Redirect("/requests")); } }