Time delay trigger for Unity3d

When player enters a collision area for a few seconds, a warning popup will appear. We create a timer called elapsedTime, using OnTriggerStay to start timer and OntriggerExit to reset the timer.