Example #1
0
    void OnTriggerEnter(Collider collider)
    {
        Goal theGoal = collider.gameObject.GetComponent <Goal>();

        if (theGoal != null)
        {
            sceneManager.goalReached(theGoal);
            sound.playGoalReached();
            manager.distributeOnAlarm();
        }
    }