Пример #1
0
 void initalCategories()
 {
     Cate[] cateList = ReadHandler.readCategories();
     for (int i = 0; i < 9; i++)
     {
         CategoryButton cateBtn  = categoryContainer.transform.GetChild(i).GetComponent <CategoryButton>();
         Cate           cate     = cateList[i];
         Song[]         songList = ReadHandler.readSongs(cate.ID);
         cateBtn.initial(cate.ID, cate.name, songList);
     }
 }
Пример #2
0
    public void readSongs(string cateID, string cateName)
    {
        changeToSongTab();
        songContainer.name = cateID;
        cateTitle.text     = cateName;
        Song[] songList = ReadHandler.readSongs(cateID);
        for (int i = 0; i < 9; i++)
        {
            SongManager songMng = songContainer.transform.GetChild(i).GetComponent <SongManager>();
            Song        song    = songList[i];

            songMng.setName(song.name);
            songMng.setFileName(song.file);
            songMng.setToggle(song.enabled);
        }
    }