December 2013
Beginner
320 pages
8h 22m
English
A single script attached to our objects in space will warn the player as the objects approach.
Alarm.public float warningDist = 100f;
Update function. It starts by checking for an Audio Source component and exiting the function early if there isn't one. The audio variable holds the reference to the attached Audio Source component.public void Update() {
if(audio == null) return;Read now
Unlock full access