private void onCharacterChange() { string selection = GetComponent <UIPopupList>().selection; HeroStat heroStat; switch (selection) { case "Set 1": case "Set 2": case "Set 3": { HeroCostume heroCostume = CostumeConverter.FromLocalData(selection.ToUpper()); heroStat = ((heroCostume != null) ? heroCostume.stat : new HeroStat()); break; } default: heroStat = HeroStat.getInfo(GetComponent <UIPopupList>().selection); break; } SPD.transform.localScale = new Vector3(heroStat.SPD, 20f, 0f); GAS.transform.localScale = new Vector3(heroStat.GAS, 20f, 0f); BLA.transform.localScale = new Vector3(heroStat.BLA, 20f, 0f); ACL.transform.localScale = new Vector3(heroStat.ACL, 20f, 0f); }
public void LoadData() { HeroCostume heroCostume = CostumeConverter.FromLocalData(currentSlot); if (heroCostume != null) { copyCostume(heroCostume, setup.myCostume); setup.DeleteCharacterComponent(); setup.CreateCharacterComponent(); } CostumeDataToMyID(); freshLabel(); }
public void LoadData() { HeroCostume from = CostumeConverter.LocalDataToHeroCostume(this.currentSlot); if (from != null) { this.copyCostume(from, this.setup.myCostume, false); this.setup.deleteCharacterComponent2(); this.setup.setCharacterComponent(); } this.CostumeDataToMyID(); this.freshLabel(); }
public void SaveData() { CostumeConverter.HeroCostumeToLocalData(this.setup.myCostume, this.currentSlot); }
public void SaveData() { CostumeConverter.ToLocalData(setup.myCostume, currentSlot); }