private void OnTriggerEnter2D(Collider2D other) { if (!WasGoal) { if (other.tag == "AIGoal") { ScoreScriptInstance.Increment(ScoreGame.Score.PlayerScore); WasGoal = true; audioManager.PlayGoal(); StartCoroutine(ResetPuck(false)); } else if (other.tag == "PlayerGoal") { ScoreScriptInstance.Increment(ScoreGame.Score.AiScore); WasGoal = true; audioManager.PlayGoal(); StartCoroutine(ResetPuck(true)); } } }