var waitForMuch : float = 1;
var playAudio : boolean = false;
var stopGame : boolean = false;
var loadLevel : boolean = false;
var soundToPlay : AudioClip;
var levelToLoad : int;
function Start () {
if(playAudio == true) {
yield WaitForSeconds(waitForMuch);
audio.PlayOneShot(soundToPlay);
}
if(stopGame == true) {
yield WaitForSeconds(waitForMuch);
Application.Quit();
}
if(loadLevel == true) {
yield WaitForSeconds(waitForMuch);
Application.LoadLevel(levelToLoad);
}
}
Under the WaitForSeconds stuff i get this error:
Assets/Scrips/WaitForSeconds.js(20,37): BCE0024: The type ‘WaitForSeconds’ does not have a visible constructor that matches the argument list ‘(float)’.
(Yes, i have tried a int.)
Thanks for any help!
~ PhysicalBeef