void OnTriggerEnter(Collider collider) { Goal theGoal = collider.gameObject.GetComponent <Goal>(); if (theGoal != null) { sceneManager.goalReached(theGoal); sound.playGoalReached(); manager.distributeOnAlarm(); } }
void OnTriggerEnter(Collider collider) { Goal theGoal = collider.gameObject.GetComponent <Goal>(); if (theGoal != null) { sceneManager.goalReached(theGoal); sound.playGoalReached(); manager.distributeOnAlarm(); } }