// initialization void Start() { backgroundAudio = BgAudio.Instance; //backgroundAudio.Play(); movieAudio = GetComponent <AudioSource>(); //movieAudio.PlayOneShot(bgAudio, 1.0F); //BgAudio bgAudio = new BgAudio(); //bgAudio.PlayBG(); sp.Open(); // hide mouse cursor //Cursor.visible = false; branchList = ""; branchIndex = 0; branch = new char[6]; ResetCounts(); playMovie(endBlack); timerOn = false; timeNoUser = 0; timeForAUser = 0; //audio_bgm.Play(); whichMoviePlaying = 12; if (videoInfo != null) { //videoInfo.GetComponent<GUIText>().text = "Lean left, right to change the slides."; } // get the gestures listener gestureListener = IdeonGestureListener.Instance; }
void Awake() { if (instance != null && instance != this) { Destroy(this.gameObject); return; } else { instance = this; } DontDestroyOnLoad(this.gameObject); }
void Awake() { bgAudio = GetComponent <AudioSource>(); instance = this; }