示例#1
0
    public void reInit()
    {
        mZIdex.Clear();
        mZIdex.Add(-0.2f);
        mZIdex.Add(-0.4f);
        mZIdex.Add(-0.6f);
        mZIdex.Add(-0.8f);
        mZIdex.Add(-1f);
        mZIdex.Add(-1.2f);
        mZIdex.Add(-1.4f);
        mZIdex.Add(-1.6f);
        mZIdex.Add(-1.8f);
        mZIdex.Add(-2f);
        mZIdex.Add(-2.2f);
        mZIdex.Add(-2.4f);
        List <PlayerBackpackBean> list = InventoryHalper.getIntance().getPet();

        foreach (PlayerBackpackBean b in list)
        {
            if (b.goodType == SQLDate.GOOD_TYPE_USER_PET)
            {
                petReset(b.goodId);
                petFight(b.goodId);
            }
            PetJsonBean bean = JsonUtils.getIntance().getPetInfoById(b.goodId);
            mHero.mSkillManager.addSkill(bean.getAffixList(), mHero, SkillIndexUtil.getIntance().getPetIndexByPetId(false, bean.id));
        }
    }
示例#2
0
    public void addPet(long id)
    {
        List <PlayerBackpackBean> list = InventoryHalper.getIntance().getPet();

        foreach (PlayerBackpackBean b in list)
        {
            if (b.goodId == id)
            {
                addPet(b);
            }
        }
    }
示例#3
0
 public void reload(bool isNewLocal)
 {
     GameManager.getIntance().isEnd = true;
     transform.localScale = new Vector3(1, 1, 1);
     if (isNewLocal)
     {
         SQLManager.getIntance().deleteAll();
     }
     SQLHelper.getIntance().init();
     InventoryHalper.getIntance().init();
     GameObject.Find("Manager").GetComponent <LevelManager>().reset();
     transform.localScale = new Vector3(0, 0, 0);
 }