public void gachaRen(int money) { List <string> resultList = new List <string>(); int totalProbability2 = 0; if (money < value) { return; } for (int i = 0; i < maxIndex; i++) { totalProbability2 += gachatable[i].probability; } for (int i = 0; i < countPerPack; i++) { GameObject itemObj = getGazo(totalProbability2); generatedItem.Add(itemObj); resultList.Add(itemObj.name); GachaTes1.SaveList <string>("ListSaveKey1", resultList); } }
// Use this for initialization void Start() { soukoList = GachaTes1.LoadList <string>("ListSaveKey2"); kurabe = GachaTes1.LoadList <string>("ListSaveKey1"); array2 = kurabe.ToArray(); array = loadList.ToArray(); //Debug.Log(array.Length); //Debug.Log(soukoList.Count); //for (int k = 0; k < soukoList.Count; k++){ Debug.Log(soukoList[k]); } if (array.Length == 0) { //Debug.Log("true2"); loadList = GachaTes1.LoadList <string>("ListSaveKey1"); } for (int i = 0; i < array.Length; i++) { if (array2[i] == array[i] && soukoList.Count != 0) { //Debug.Log("true"); } else { loadList = GachaTes1.LoadList <string>("ListSaveKey1"); //Debug.Log(loadList.Count); array = loadList.ToArray(); for (int j = 0; j < array.Length; j++) { soukoList.Add(array[j]); } GachaTes1.SaveList <string>("ListSaveKey2", soukoList); Debug.Log(soukoList.Count); //for (int k = 0; k < soukoList.Count; k++) { Debug.Log(soukoList[k]); } } } }