コード例 #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();
    }