private int initPicture() { int createdButtonCount = 0; PictureObject pictureTable = LobbyManager.Instance.DT.Picture; int count = pictureTable.Count; for (int id = 0; id < count; ++id) { if (AlbumId != pictureTable[id].albumId) { continue; } string key = PlayerPrefsKey.GetKey(PlayerPrefsKey.ISLOCKED_PICTURE, id); int value = CustomPlayerPrefs.GetInt(key, PlayerPrefsKey.TRUE_INTEGER); bool isLocked = PlayerPrefsKey.GetIntToBool(value); CGThumbnailButton btn = create(); btn.Set(pictureTable[id].sprite, AlbumType, isLocked); ++createdButtonCount; } return(createdButtonCount); }
// private CGThumbnailButton create() { CGThumbnailButton btn = Instantiate(PrefCGThumbnailButton); btn.transform.SetParent(_content, false); return(btn); }
private int initNurtureEnding() { int createdButtonCount = 0; NurtureEndingObject nurtureEndingTable = LobbyManager.Instance.DT.NurtureEnding; int count = nurtureEndingTable.Count; for (int id = 0; id < count; ++id) { string key = PlayerPrefsKey.GetKey(PlayerPrefsKey.ISLOCKED_NURTURE_ENDING, id); int value = CustomPlayerPrefs.GetInt(key, PlayerPrefsKey.TRUE_INTEGER); bool isLocked = PlayerPrefsKey.GetIntToBool(value); CGThumbnailButton btn = create(); btn.Set(nurtureEndingTable[id].image, AlbumType, isLocked); ++createdButtonCount; } return(createdButtonCount); }
private int initVacation() { int createdButtonCount = 0; VacationObject vacationTable = LobbyManager.Instance.DT.Vacation; int count = vacationTable.Count; // child for (int id = 0; id < count; ++id) { string key = PlayerPrefsKey.GetKey(PlayerPrefsKey.ISLOCKED_VACATION_CHILD, id); int value = CustomPlayerPrefs.GetInt(key, PlayerPrefsKey.TRUE_INTEGER); bool isLocked = PlayerPrefsKey.GetIntToBool(value); CGThumbnailButton btn = create(); btn.Set(vacationTable[id].childHood, AlbumType, isLocked); ++createdButtonCount; } // adult for (int id = 0; id < count; ++id) { string key = PlayerPrefsKey.GetKey(PlayerPrefsKey.ISLOCKED_VACATION_ADULT, id); int value = CustomPlayerPrefs.GetInt(key, PlayerPrefsKey.TRUE_INTEGER); bool isLocked = PlayerPrefsKey.GetIntToBool(value); CGThumbnailButton btn = create(); btn.Set(vacationTable[id].adultHood, AlbumType, isLocked); ++createdButtonCount; } return(createdButtonCount); }