/* * @brief : load all the old datas of the player */ private void LoadData(int itemCount) { /* * for (int i = 0; i < itemCount; i++) * { * Debug.Log(SaveLoad.savedPlayers[i].getEthnieString()); * }*/ List <object> data = new List <object>(); for (int i = 0; i < itemCount; i++) { //string[] datas = (linesFile[i].Trim()).Split(","[0]); // get all the datas of the line //if (datas.Length == 5) { // if there are enough data in one raw Texture2D tex = new Texture2D(100, 100); //tex.LoadImage(SaveLoad.savedImages[0]); data.Add(new Data() { itemEthnieString = SaveLoad.savedPlayers[i].getEthnieString(), //datas[0], itemBodyString = SaveLoad.savedPlayers[i].getBodyString(), //datas[1], itemHandicapString = SaveLoad.savedPlayers[i].getHandicapString(), //datas[2], itemGenderString = SaveLoad.savedPlayers[i].getGenderString(), // datas[3], itemSexualityString = SaveLoad.savedPlayers[i].getSexualityString(), //datas[4] itemEthnie = SaveLoad.savedPlayers[i].getEthnie(), //datas[0], itemBody = SaveLoad.savedPlayers[i].getBody(), //datas[1], itemHandicap = SaveLoad.savedPlayers[i].getHandicap(), //datas[2], itemGender = SaveLoad.savedPlayers[i].getGender(), // datas[3], itemSexuality = SaveLoad.savedPlayers[i].getSexuality(), //datas[4] }); } horizontalScroller.Reload(data, 120f); }