Beispiel #1
0
    void SetBabyData(Baby ba)
    {
        BabyData bdata = BabyData.GetData(ba.GetIprop(PropertyType.PT_TableId));

        gongjiLable.text    = ba.GetIprop(PropertyType.PT_Attack).ToString();
        fangyuLable.text    = ba.GetIprop(PropertyType.PT_Defense).ToString();
        minjieLable.text    = ba.GetIprop(PropertyType.PT_Agile).ToString();
        jingshenLable.text  = ba.GetIprop(PropertyType.PT_Spirit).ToString();
        huifuLable.text     = ba.GetIprop(PropertyType.PT_Reply).ToString();
        bishaLable.text     = ba.GetIprop(PropertyType.PT_Crit).ToString();
        mingzhongLable.text = ba.GetIprop(PropertyType.PT_Hit).ToString();
        fanjiLable.text     = ba.GetIprop(PropertyType.PT_counterpunch).ToString();
        shanduoLable.text   = ba.GetIprop(PropertyType.PT_Dodge).ToString();
        jinengLable.text    = bdata._SkillNum.ToString();
        babysuo.SetActive(ba.GetInst().isLock_);
        instId = ba.InstId;
        HeadIconLoader.Instance.LoadIcon(EntityAssetsData.GetData(BabyData.GetData(ba.GetIprop(PropertyType.PT_TableId))._AssetsID).assetsIocn_, babyIcon);
        //iconkuang.spriteName = BabyData.GetPetQuality(bdata._PetQuality);

        int Magic    = bdata._BIG_Magic - ba.gear_[(int)BabyInitGear.BIG_Magic];
        int Stama    = bdata._BIG_Stama - ba.gear_[(int)BabyInitGear.BIG_Stama];
        int Speed    = bdata._BIG_Speed - ba.gear_[(int)BabyInitGear.BIG_Speed];
        int Power    = bdata._BIG_Power - ba.gear_[(int)BabyInitGear.BIG_Power];
        int Strength = bdata._BIG_Strength - ba.gear_[(int)BabyInitGear.BIG_Strength];
        int num      = Magic + Stama + Speed + Power + Strength;

        pinjiSp.spriteName = BabyData.GetBabyLeveSp(num);
    }
Beispiel #2
0
    void OnEnable()
    {
        if (GamePlayer.Instance.babies_list_.Count == 0)
        {
            ClearText();
        }
        else
        {
            Uid  = MainbabyProperty.idss[0];
            Inst = GamePlayer.Instance.GetBabyInst(Uid);
            BabyData bdata = BabyData.GetData(Inst.GetIprop(PropertyType.PT_TableId));
            type = bdata._Tpye;



            int Magic    = bdata._BIG_Magic - Inst.gear_[(int)BabyInitGear.BIG_Magic];
            int Stama    = bdata._BIG_Stama - Inst.gear_[(int)BabyInitGear.BIG_Stama];
            int Speed    = bdata._BIG_Speed - Inst.gear_[(int)BabyInitGear.BIG_Speed];
            int Power    = bdata._BIG_Power - Inst.gear_[(int)BabyInitGear.BIG_Power];
            int Strength = bdata._BIG_Strength - Inst.gear_[(int)BabyInitGear.BIG_Strength];
            int num      = Magic + Stama + Speed + Power + Strength;
            onesp.spriteName = BabyData.GetBabyLeveSp(num) + "_big";
            oldBdata         = bdata;

            mofaLabel.text    = "[-][666666]" + Inst.gear_[(int)BabyInitGear.BIG_Magic].ToString() + "/" + bdata._BIG_Magic;
            tiliLabel.text    = "[-][666666]" + Inst.gear_[(int)BabyInitGear.BIG_Stama].ToString() + "/" + bdata._BIG_Stama;
            suduLabel.text    = "[-][666666]" + Inst.gear_[(int)BabyInitGear.BIG_Speed].ToString() + "/" + bdata._BIG_Speed;
            qiangduLabel.text = "[-][666666]" + Inst.gear_[(int)BabyInitGear.BIG_Power].ToString() + "/" + bdata._BIG_Power;
            liLiangLabel.text = "[-][666666]" + Inst.gear_[(int)BabyInitGear.BIG_Strength].ToString() + "/" + bdata._BIG_Strength;

            tiliSlider.value    = (Inst.gear_[(int)BabyInitGear.BIG_Stama] * 1f) / (bdata._BIG_Stama * 1f);
            liliangSlider.value = (Inst.gear_[(int)BabyInitGear.BIG_Strength] * 1f) / (bdata._BIG_Strength * 1f);
            qiangduSlider.value = (Inst.gear_[(int)BabyInitGear.BIG_Power] * 1f) / (bdata._BIG_Power * 1f);
            suduSlider.value    = (Inst.gear_[(int)BabyInitGear.BIG_Speed] * 1f) / (bdata._BIG_Speed * 1f);
            mofaSlider.value    = (Inst.gear_[(int)BabyInitGear.BIG_Magic] * 1f) / (bdata._BIG_Magic * 1f);
            int dd = Inst.gear_[(int)BabyInitGear.BIG_Magic] + Inst.gear_[(int)BabyInitGear.BIG_Stama] + Inst.gear_[(int)BabyInitGear.BIG_Speed] + Inst.gear_[(int)BabyInitGear.BIG_Power] + Inst.gear_[(int)BabyInitGear.BIG_Strength];
            dangshuLable.text = dd.ToString();
        }
        if (GlobalValue.isBattleScene(StageMgr.Scene_name))
        {
            enterBtn.gameObject.SetActive(false);
        }
    }
Beispiel #3
0
    bool IsbabyS()
    {
        if (Inst == null)
        {
            return(false);
        }
        BabyData bdata    = BabyData.GetData(Inst.GetIprop(PropertyType.PT_TableId));
        int      Magic    = bdata._BIG_Magic - Inst.gear_[(int)BabyInitGear.BIG_Magic];
        int      Stama    = bdata._BIG_Stama - Inst.gear_[(int)BabyInitGear.BIG_Stama];
        int      Speed    = bdata._BIG_Speed - Inst.gear_[(int)BabyInitGear.BIG_Speed];
        int      Power    = bdata._BIG_Power - Inst.gear_[(int)BabyInitGear.BIG_Power];
        int      Strength = bdata._BIG_Strength - Inst.gear_[(int)BabyInitGear.BIG_Strength];
        int      num      = Magic + Stama + Speed + Power + Strength;
        string   l        = BabyData.GetBabyLeveSp(num);

        if (l.Equals("S"))
        {
            return(true);
        }
        return(false);
    }
Beispiel #4
0
    void Refresh(int uid)
    {
        if (GamePlayer.Instance.babies_list_.Count == 0)
        {
            ClearText();
        }
        else
        {
            if (uid != Uid)
            {
                return;
            }
            enterBtn.isEnabled = true;
            Uid  = MainbabyProperty.idss[0];
            Inst = GamePlayer.Instance.GetBabyInst(Uid);
            BabyData bdata = BabyData.GetData(Inst.GetIprop(PropertyType.PT_TableId));
            type = bdata._Tpye;
            int Magic    = bdata._BIG_Magic - Inst.gear_[(int)BabyInitGear.BIG_Magic];
            int Stama    = bdata._BIG_Stama - Inst.gear_[(int)BabyInitGear.BIG_Stama];
            int Speed    = bdata._BIG_Speed - Inst.gear_[(int)BabyInitGear.BIG_Speed];
            int Power    = bdata._BIG_Power - Inst.gear_[(int)BabyInitGear.BIG_Power];
            int Strength = bdata._BIG_Strength - Inst.gear_[(int)BabyInitGear.BIG_Strength];
            int num      = Magic + Stama + Speed + Power + Strength;
            twoSp.spriteName = BabyData.GetBabyLeveSp(num) + "_big";

            mofaLabel.text    = "[-][666666]" + Inst.gear_[(int)BabyInitGear.BIG_Magic].ToString() + "/" + bdata._BIG_Magic;
            tiliLabel.text    = "[-][666666]" + Inst.gear_[(int)BabyInitGear.BIG_Stama].ToString() + "/" + bdata._BIG_Stama;
            suduLabel.text    = "[-][666666]" + Inst.gear_[(int)BabyInitGear.BIG_Speed].ToString() + "/" + bdata._BIG_Speed;
            qiangduLabel.text = "[-][666666]" + Inst.gear_[(int)BabyInitGear.BIG_Power].ToString() + "/" + bdata._BIG_Power;
            liLiangLabel.text = "[-][666666]" + Inst.gear_[(int)BabyInitGear.BIG_Strength].ToString() + "/" + bdata._BIG_Strength;

            tiliSlider.value    = (Inst.gear_[(int)BabyInitGear.BIG_Stama] * 1f) / (bdata._BIG_Stama * 1f);
            liliangSlider.value = (Inst.gear_[(int)BabyInitGear.BIG_Strength] * 1f) / (bdata._BIG_Strength * 1f);
            qiangduSlider.value = (Inst.gear_[(int)BabyInitGear.BIG_Power] * 1f) / (bdata._BIG_Power * 1f);
            suduSlider.value    = (Inst.gear_[(int)BabyInitGear.BIG_Speed] * 1f) / (bdata._BIG_Speed * 1f);
            mofaSlider.value    = (Inst.gear_[(int)BabyInitGear.BIG_Magic] * 1f) / (bdata._BIG_Magic * 1f);

            int dd = Inst.gear_[(int)BabyInitGear.BIG_Magic] + Inst.gear_[(int)BabyInitGear.BIG_Stama] + Inst.gear_[(int)BabyInitGear.BIG_Speed] + Inst.gear_[(int)BabyInitGear.BIG_Power] + Inst.gear_[(int)BabyInitGear.BIG_Strength];
            dangshuLable.text = dd.ToString();

            tishiObj.SetActive(true);
            EffectAPI.PlayUIEffect((EFFECT_ID)GlobalValue.EFFECT_UI_pinzhijinjie, jiaotouSp.transform, null, (GameObject obj) => {
                obj.transform.localPosition = Vector3.zero;
            });
            GlobalInstanceFunction.Instance.Invoke(() => {
                if (hasDestroyed)
                {
                    return;
                }

                tishiObj.SetActive(false);
                int Magic1       = oldBdata._BIG_Magic - Inst.gear_[(int)BabyInitGear.BIG_Magic];
                int Stama1       = oldBdata._BIG_Stama - Inst.gear_[(int)BabyInitGear.BIG_Stama];
                int Speed1       = oldBdata._BIG_Speed - Inst.gear_[(int)BabyInitGear.BIG_Speed];
                int Power1       = oldBdata._BIG_Power - Inst.gear_[(int)BabyInitGear.BIG_Power];
                int Strength1    = oldBdata._BIG_Strength - Inst.gear_[(int)BabyInitGear.BIG_Strength];
                int num1         = Magic1 + Stama1 + Speed1 + Power1 + Strength1;
                onesp.spriteName = BabyData.GetBabyLeveSp(num1) + "_big";
                oldBdata         = bdata;
            }, 1f);
        }
    }