// Use this for initialization
    void Start()
    {
        mInstance = this;

        int           i = 0;
        SongAttribute songAttr;
        IIterator     songsIter = SingletonGameData.GetInstance().CreateSongIterator();

        mCurrentSong_chorus           = new AudioClip[songsIter.Count];
        mArrayTextureSongChooseImages = new Texture[songsIter.Count];
        mArrayTextureSongWords        = new Texture[songsIter.Count];
        mStrSongName = new string[songsIter.Count];
        //加载音乐副歌、歌曲提示图片、歌曲文字图片
        for (i = 0; i < songsIter.Count; i++)
        {
            songAttr = songsIter.Next() as SongAttribute;
            mCurrentSong_chorus[i] = Resources.Load("Songs/" + songAttr.ProgName + "_chorus",
                                                    typeof(AudioClip)) as AudioClip;
            mArrayTextureSongChooseImages[i] = Resources.Load("Songs Image/" + songAttr.ProgName,
                                                              typeof(Texture)) as Texture;
            mArrayTextureSongWords[i] = Resources.Load("Songs Word/" + songAttr.ProgName,
                                                       typeof(Texture)) as Texture;
            mStrSongName[i] = songAttr.ProgName;
        }
    }
Exemplo n.º 2
0
 void IObserver.ObserverUpdate(ISubject subject, System.Object arg)
 {
     if ((EnumWaveHand)arg == EnumWaveHand.WaveRightHandIn)
     {
         SingletonStateController.CurrrentState = SingletonStateController.State_Type.ChooseFinish;
         DataBetweenScene.SongName = SingletonLoadGameStartResources.GetInstance().StrSongName[mSongNum];
     }
 }
Exemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     SingletonWaveHand.GetInstance().AddObserver(this);
     SongsPictures = SingletonLoadGameStartResources.GetInstance().ArrayTextureSongChooseImages;
     SongsWords    = SingletonLoadGameStartResources.GetInstance().ArrayTextureSongWords;
     mSong_chorus  = SingletonLoadGameStartResources.GetInstance().CurrentSong_chorus;
     mChooseRect   = new Rect(0, 0, Screen.width / 3.6f, mGapHeight * (SongsWords.Length - 1) + Screen.height / 5.45f);             // 总大小,这个要计算正确
     mItemRect     = new Rect(Screen.width / 2 + Screen.width / 65, Screen.height / 6, Screen.width / 3.2f, Screen.height / 1.55f); // 位置
     mIndex        = 0;
 }