Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var beep : AudioClip;
- function exitGame(){
- if (Input.GetKey ("Esc")){
- OpenLevel("Menu");
- }
- }
- function OpenLevel(level : String){
- audio.PlayOneShot(beep);
- yield new WaitForSeconds(0.35);
- Application.LoadLevel(level);
- }
- @script RequireComponent(AudioSource)
Add Comment
Please, Sign In to add comment