Exemplo n.º 1
0
 public void AddWeapon(Tps_Weapon weapon)
 {
     if (!weaponContainer.Contains(weapon))
     {
         weaponContainer.Add(weapon);
     }
 }
Exemplo n.º 2
0
 public int FindeWeaponIndex(Tps_Weapon weapon)
 {
     if (weaponContainer.Contains(weapon))
     {
         return(weaponContainer.IndexOf(weapon));
     }
     return(-1);
 }
Exemplo n.º 3
0
 public bool HasWeapon(Tps_Weapon weapon)
 {
     if (weaponContainer.Contains(weapon))
     {
         return(true);
     }
     return(false);
 }
    public void AddWeaponType(Tps_Weapon weapon)
    {
        playerInventory.AddWeapon(weapon);
        weaponText.text += (" " + (playerInventory.FindeWeaponIndex(weapon) + 1) + ": " + weapon.WeaponName);

        if (!playerInventory.HasWeapon(weapon))
        {
            weaponContainer.Add(weapon);
        }
    }