Exemplo n.º 1
0
    public void EquipWeapon(CardInfo_Equip cardInfo, int equipId)
    {
        ModuleWeapon newWeapon = GameObjectPoolManager.Instance.PoolDict[GameObjectPoolManager.PrefabNames.ModuleWeapon].AllocateGameObject <ModuleWeapon>(transform);

        newWeapon.M_ModuleMech = Mech;
        newWeapon.Initiate(cardInfo, Mech.ClientPlayer);
        newWeapon.M_EquipID          = equipId;
        newWeapon.transform.position = EquipPivots[0].position;
        M_Weapon = newWeapon;
    }
Exemplo n.º 2
0
    public void EquipWeapon(EquipWeaponRequest r, CardInfo_Base cardInfo)
    {
        ModuleWeapon   weapon          = new ModuleWeapon();
        CardInfo_Equip cardInfo_Weapon = (CardInfo_Equip)cardInfo;
        ModuleMech     mech            = GetMech(r.mechId);

        weapon.M_ModuleMech = mech;
        weapon.M_EquipID    = BattlePlayer.GameManager.GenerateNewEquipId();
        weapon.Initiate(cardInfo_Weapon, BattlePlayer);
        weapon.OriginCardInstanceId = r.handCardInstanceId;
        mech.M_Weapon = weapon;
        BattlePlayer.CardDeckManager.CardDeck.AddCardInstanceId(cardInfo.CardID, r.handCardInstanceId);
    }