示例#1
0
文件: playvideo.cs 项目: lhz516/ideon
    // 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;
    }
示例#2
0
    void Awake()
    {
        if (instance != null && instance != this)
        {
            Destroy(this.gameObject);
            return;
        }
        else
        {
            instance = this;
        }

        DontDestroyOnLoad(this.gameObject);
    }
示例#3
0
 void Awake()
 {
     bgAudio  = GetComponent <AudioSource>();
     instance = this;
 }