示例#1
0
    public void EquipShield(CardInfo_Equip cardInfo, int equipId)
    {
        ModuleShield newShield = GameObjectPoolManager.Instance.PoolDict[GameObjectPoolManager.PrefabNames.ModuleShield].AllocateGameObject <ModuleShield>(transform);

        newShield.M_ModuleMech = Mech;
        newShield.Initiate(cardInfo, Mech.ClientPlayer);
        newShield.M_EquipID          = equipId;
        newShield.transform.position = EquipPivots[1].position;
        M_Shield = newShield;
    }
示例#2
0
    public void EquipShield(EquipShieldRequest r, CardInfo_Base cardInfo)
    {
        ModuleShield   shield          = new ModuleShield();
        CardInfo_Equip cardInfo_Shield = (CardInfo_Equip)cardInfo;
        ModuleMech     mech            = GetMech(r.mechID);

        shield.M_ModuleMech = mech;
        shield.M_EquipID    = BattlePlayer.GameManager.GenerateNewEquipId();
        shield.Initiate(cardInfo_Shield, BattlePlayer);
        shield.OriginCardInstanceId = r.handCardInstanceId;
        mech.M_Shield = shield;
        BattlePlayer.CardDeckManager.CardDeck.AddCardInstanceId(cardInfo.CardID, r.handCardInstanceId);
    }