Пример #1
0
    public void SetupWing(int resid)
    {
        if (!DataManager.WingCommonTable.ContainsKey(resid))
        {
            return;
        }

        WingCommonTableItem wingtable = DataManager.WingCommonTable[resid] as WingCommonTableItem;

        if (wingtable == null)
        {
            GameDebug.LogError("WingTable 没有找到 id = " + resid.ToString());
            return;
        }

        if (resid != mResid)
        {
            if (mWing != null)
            {
                mWing.Destroy();
            }

            mResid = resid;
            mWing  = new MeshVisual();
            WingItemData itemData  = PlayerDataPool.Instance.MainData.mWingData.GetWingItemDataById(mResid);
            string       modleName = WingModule.GetModelName(itemData.id, itemData.level);
            //mWing.CreateWithConfig(AssetConfig.WeaponPath + modleName,
        }
    }
Пример #2
0
    public void WingEquip(int wingid, int action)
    {
        WingData wingData = PlayerDataPool.Instance.MainData.mWingData;

        WingItemData        itemData  = wingData.GetWingItemDataById(wingid);
        WingCommonTableItem commonRes = DataManager.WingCommonTable[wingid] as WingCommonTableItem;
        string modelName    = WingModule.GetModelName(wingid, itemData.level);
        int    wingeffectId = WingModule.GetEffectId(wingid, (int)itemData.level);

        if (action == 0)
        {
            RemoveAttach(AttachMountType.Wing);
            GameDebug.Log("装备翅膀");
            ChangeAttach(AttachMountType.Wing, AssetConfig.WeaponPath + modelName, commonRes.modelSlot);
            if (wingeffectId != -1)
            {
                AddEffect((uint)wingeffectId, null, float.NaN, AttachMountType.Wing);
            }
        }
        else
        {
            GameDebug.Log("卸载翅膀");
            RemoveAttach(AttachMountType.Wing);
        }
    }
Пример #3
0
    public void ChangeWing(int wingid, uint winglv)
    {
        if (mWingID == wingid && mWingLv == winglv)
        {
            return;
        }
        mWingID = wingid;
        mWingLv = winglv;

        WingCommonTableItem commonRes = DataManager.WingCommonTable[wingid] as WingCommonTableItem;

        if (commonRes == null)
        {
            return;
        }
        string     modelName = WingModule.GetModelName(wingid, winglv);
        MeshVisual visual    = new MeshVisual();

        visual.CreateWithConfig(AssetConfig.WeaponPath + modelName, null, null, false);
        ChangeAttach(AttachMountType.Wing, visual, commonRes.modelSlot);
    }