private void FixedUpdate() { if (soundLevel > 0) { annoyance += soundLevel * Time.fixedDeltaTime * annoyanceSpeed; } else { annoyance = Math.Max(annoyance - 4 * Time.fixedDeltaTime * annoyanceSpeed, 0); } if (annoyance <= 2f) { windowRenderer.sprite = null; } else if (annoyance >= 10f) { cm.AddComplaint(new ComplaintManager.Complaint() { plaintiff = this, reason = ComplaintManager.Reasons.Noise }); annoyance = 0f; } else if (annoyance >= 8f) { windowRenderer.sprite = sprites[3]; } else if (annoyance >= 6f) { windowRenderer.sprite = sprites[2]; } else if (annoyance >= 4f) { windowRenderer.sprite = sprites[1]; } else if (annoyance >= 2f) { windowRenderer.sprite = sprites[0]; } }
public IActionResult AddComplaint(AddComplaintModel model) { return(manager.AddComplaint(model, UserId).Result); }
public int AddComplaint(ComplaintEntity complaintEntity) { return(complaintMgr.AddComplaint(complaintEntity)); }