示例#1
0
    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);
    }
示例#2
0
    public void LoadData()
    {
        HeroCostume heroCostume = CostumeConverter.FromLocalData(currentSlot);

        if (heroCostume != null)
        {
            copyCostume(heroCostume, setup.myCostume);
            setup.DeleteCharacterComponent();
            setup.CreateCharacterComponent();
        }
        CostumeDataToMyID();
        freshLabel();
    }
示例#3
0
    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();
    }
示例#4
0
 public void SaveData()
 {
     CostumeConverter.HeroCostumeToLocalData(this.setup.myCostume, this.currentSlot);
 }
示例#5
0
 public void SaveData()
 {
     CostumeConverter.ToLocalData(setup.myCostume, currentSlot);
 }