internal void ByPassRestrictions() { NewGame(); for (int i = 0; i < 5; i++) { equip.completedLevels[i] = 16; } equip.shards = 999999; for (int i = 0; i < equip.torsoAvailability.Length; i++) { ItemPart item = listOfTorso[i].GetComponent <ItemPart>(); item.owned = true; } foreach (GameObject item in listofHeads) { ItemPart mod = item.GetComponent <ItemPart>(); mod.owned = true; } foreach (GameObject item in listofLeftArms) { ItemPart mod = item.GetComponent <ItemPart>(); mod.owned = true; } foreach (GameObject item in listofRightArms) { ItemPart mod = item.GetComponent <ItemPart>(); mod.owned = true; } foreach (GameObject item in listofLeftLegs) { ItemPart mod = item.GetComponent <ItemPart>(); mod.owned = true; } foreach (GameObject item in listofRightLegs) { ItemPart mod = item.GetComponent <ItemPart>(); mod.owned = true; } }
//Build the arrays for the equipmentlists, and set everything to false/0/null. void NewGame() { equip.StarsAcquired = new int[75]; PlayerPrefs.SetInt("Transitions", 1); equip.shards = 0; equip.tutorialComplete = false; equip.completedLevels = new int[5]; equip.equippedParts = new int[6]; for (int i = 0; i < 5; i++) { equip.completedLevels[i] = 0; if (i < 4) { equip.equippedParts[i] = -2; } } equip.torsoAvailability = new bool[listOfTorso.Capacity]; equip.headAvailability = new bool[listofHeads.Capacity]; equip.leftArmAvailability = new bool[listofLeftArms.Capacity]; equip.rightArmAvailability = new bool[listofRightArms.Capacity]; equip.leftLegAvailability = new bool[listofLeftLegs.Capacity]; equip.rightLegAvailability = new bool[listofRightLegs.Capacity]; for (int i = 0; i < equip.torsoAvailability.Length; i++) { ItemPart item = listOfTorso[i].GetComponent <ItemPart>(); item.owned = false; } foreach (GameObject item in listOfTorso) { ItemPart mod = item.GetComponent <ItemPart>(); mod.owned = false; } foreach (GameObject item in listofHeads) { ItemPart mod = item.GetComponent <ItemPart>(); mod.owned = false; } foreach (GameObject item in listofLeftArms) { ItemPart mod = item.GetComponent <ItemPart>(); mod.owned = false; } foreach (GameObject item in listofRightArms) { ItemPart mod = item.GetComponent <ItemPart>(); mod.owned = false; } foreach (GameObject item in listofLeftLegs) { ItemPart mod = item.GetComponent <ItemPart>(); mod.owned = false; } foreach (GameObject item in listofRightLegs) { ItemPart mod = item.GetComponent <ItemPart>(); mod.owned = false; } EquipDefault(); Save(); }