コード例 #1
0
    public void onGripSelect()
    {
        Grip selectedGrip = Grip.FindByName(GripDD.options[GripDD.value].text);

        //Debug.Log(selectedGrip);
        if (selectedGrip.GemSlots > 0)
        {
            Gem1DD.enabled = true;
            Gem1DD.ClearOptions();
            Gem1DD.AddOptions(Gem.slist);
        }
        if (selectedGrip.GemSlots > 1)
        {
            Gem2DD.enabled = true;
            Gem2DD.ClearOptions();
            Gem2DD.AddOptions(Gem.slist);
        }
        if (selectedGrip.GemSlots > 2)
        {
            Gem3DD.enabled = true;
            Gem3DD.ClearOptions();
            Gem3DD.AddOptions(Gem.slist);
        }
        actualiseCAT();
    }
コード例 #2
0
    private void actualiseCAT()
    {
        if (WEPID > 0)
        {
            catCompo.RAZ();
            if (WeaponTypeDD.value == 11)
            {
                /*
                 * Debug.Log("Shield ID = "+WEPID);
                 * Debug.Log("Shield.list.Count : "+Shield.list.Count);
                 * Debug.Log("Shield = " + Shield.GetShield(WEPID).ToString());
                 */
                catCompo.STR = Shield.GetShieldByWEP((byte)WEPID).STR;
                catCompo.INT = Shield.GetShieldByWEP((byte)WEPID).INT;
                catCompo.AGI = Shield.GetShieldByWEP((byte)WEPID).AGI;
            }
            else
            {
                //Debug.Log(Blade.list[WEPID]);
                catCompo.Range = Blade.list[WEPID].Range;
                catCompo.Risk  = Blade.list[WEPID].RISK;
                catCompo.STR   = Blade.list[WEPID].STR;
                catCompo.INT   = Blade.list[WEPID].INT;
                catCompo.AGI   = Blade.list[WEPID].AGI;

                Grip grp = Grip.FindByName(GripDD.options[GripDD.value].text);
                catCompo.STR      = grp.STR;
                catCompo.INT      = grp.INT;
                catCompo.AGI      = grp.AGI;
                catCompo.Blunt    = grp.Blunt;
                catCompo.Edged    = grp.Edged;
                catCompo.Piercing = grp.Piercing;
            }
            //catCompo += SmithMaterial.list[MaterialDD.value];

            SmithMaterial[] mats = new SmithMaterial[] {
                SmithMaterial.Wood,
                SmithMaterial.Leather,
                SmithMaterial.Bronze,
                SmithMaterial.Iron,
                SmithMaterial.Hagane,
                SmithMaterial.Silver,
                SmithMaterial.Damascus
            };

            catCompo += mats[MaterialDD.value];

            if (Gem1DD.enabled)
            {
                catCompo += Gem.list[Gem1DD.value];
            }

            if (Gem2DD.enabled)
            {
                catCompo += Gem.list[Gem2DD.value];
            }

            if (Gem3DD.enabled)
            {
                catCompo += Gem.list[Gem3DD.value];
            }
        }
    }