public void OnTriggerStay2D(Collider2D other) { if (!attacking) { return; } if (other.tag == "Cop") { if (euphoriaController.IsEuphoric()) { Object.Destroy(other.gameObject); euphoriaController.IncrementEuphoria(40); scoreController.IncrementScore(Mathf.Round(10f + 0.4f * euphoriaController.getEuphoriaValue())); } } else if (other.tag == "Civilian") { Object.Destroy(other.gameObject); euphoriaController.IncrementEuphoria(20); scoreController.IncrementScore(Mathf.Round(5f + 0.2f * euphoriaController.getEuphoriaValue())); } }
public void LateUpdate() { this.euphoriaValue = euphoriaController.getEuphoriaValue(); RefreshEuphoriaBar(); }