Ejemplo n.º 1
0
 public void restartCombo(Queue <Weapon_Attack> comboSet)
 {
     while (comboSet.Peek().ComboNumber != 0)
     {
         Weapon_Attack attack = comboSet.Dequeue();
         comboSet.Enqueue(attack);
     }
 }
Ejemplo n.º 2
0
    public void executeComboSet(Queue <Weapon_Attack> comboSet)
    {
        Weapon_Attack comboAttack = comboSet.Dequeue();

        animator_.SetTrigger(comboAttack.AttackAnimation);
        comboSet.Enqueue(comboAttack);

        Debug.Log(comboAttack.Tag + " executed");
    }
Ejemplo n.º 3
0
 public void addAttackToCombo(Queue <Weapon_Attack> comboSet, Weapon_Attack attack)
 {
     Debug.Log("Adding attack");
     if (comboSet.Count < 5)
     {
         attack.ComboNumber = comboSet.Count;
         comboSet.Enqueue(attack);
     }
 }
    public void ItemSelected()
    {
        itemType = item.ToString();

        if (itemType == TypeOfItem.Helmets.ToString())
        {
            helmet = inventory.InventoryExtensions.FindHelmet(objectId);
            inventoryManager.updatePlayerHelmet(helmet);
        }
        else if (itemType == TypeOfItem.Arms.ToString())
        {
            arm = inventory.InventoryExtensions.FindArm(objectId);
            inventoryManager.updatePlayerArm(arm);
        }
        else if (itemType == TypeOfItem.Chests.ToString())
        {
            chest = inventory.InventoryExtensions.FindChest(objectId);
            inventoryManager.updatePlayerChest(chest);
        }
        else if (itemType == TypeOfItem.Legs.ToString())
        {
            leg = inventory.InventoryExtensions.FindLeg(objectId);
            inventoryManager.updatePlayerLeg(leg);
        }
        else if (itemType == TypeOfItem.WeaponAttacks.ToString())
        {
            attack = inventory.InventoryExtensions.FindWeaponAttack(objectId);
            inventoryManager.updatePlayerComboSet(attack);
        }
        else if (itemType == TypeOfItem.OneHandedWeapons.ToString())
        {
            oneHandedWeapon = inventory.InventoryExtensions.FindOneHandedWeapon(objectId);
            inventoryManager.updatePlayerOneHandedWeapon(oneHandedWeapon);
        }
        else if (itemType == TypeOfItem.TwoHandedWeapons.ToString())
        {
            twoHandedWeapon = inventory.InventoryExtensions.FindTwoHandedWeapon(objectId);
            inventoryManager.updatePlayerTwoHandedWeapon(twoHandedWeapon);
        }

        Debug.Log("Item added!");
    }
Ejemplo n.º 5
0
    public void advanceComboSet(Queue <Weapon_Attack> comboSet)
    {
        Weapon_Attack comboAttack = comboSet.Dequeue();

        comboSet.Enqueue(comboAttack);
    }
Ejemplo n.º 6
0
 // Method to add one attack to a comboSet
 public void updatePlayerComboSet(/*Queue<Weapon_Attack> comboSet,*/ Weapon_Attack a)
 {
     playerManager.ComboSystem.addAttackToCombo(playerManager.ComboSet1, a);
 }
    // Method to find an specific Weapon Attack
    public Weapon_Attack FindWeaponAttack(int weaponAttackId)
    {
        Weapon_Attack attack = (Weapon_Attack)FindInventoryItem(inv.AttacksKey, inv.Attacks.WeaponAttacksKey, weaponAttackId);

        return(attack);
    }