Ejemplo n.º 1
0
    public void OnWingSuccess()
    {
        AttachMent attachment = mAttachMents[(int)AttachMountType.Wing];

        if (attachment == null)
        {
            return;
        }

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

        if (commonRes == null)
        {
            return;
        }
        int effectid = WingModule.GetEffectId(mWingID, (int)mWingLv);

        if (effectid == -1)
        {
            return;
        }

        uint         instid = ParticleUtility.AddEffect2MV(attachment.visual as MeshVisual, effectid, commonRes.modelSlot, SceneManager.Instance.GetCurScene().GetParticleManager());
        ParticleItem pitem  = SceneManager.Instance.GetCurScene().GetParticleManager().GetParticle(instid);

        if (pitem != null)
        {
            pitem.Layer = layermask;
        }
    }
Ejemplo n.º 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);
        }
    }