Exemplo n.º 1
0
 public virtual void ShootEffect(Vector3 aimPosition, Transform sender = null)
 {
     if (item)
     {
         var ammoAttribute = item.GetItemAttribute(isSecundaryWeapon ? "SecundaryAmmoCount" : "AmmoCount");
         if (ammoAttribute != null)
         {
             ammoAttribute.value--;
         }
     }
     else
     {
         ammo--;
     }
     this.sender = sender != null ? sender : transform;
     HandleShotEffect(aimPosition);
 }
Exemplo n.º 2
0
    public void OnEquip(vItem item)
    {
        SetScopeZoom(scopeZoom);
        this.item = item;
        var damageAttribute = item.GetItemAttribute("Damage");

        if (damageAttribute != null)
        {
            maxDamage = damageAttribute.value;
        }
    }
Exemplo n.º 3
0
        public void OnEquip(vItem item)
        {
            SetScopeZoom(scopeZoom);
            this.item = item;
            var damageAttribute = item.GetItemAttribute(isSecundaryWeapon?"SecundaryDamage":"Damage");

            if (damageAttribute != null)
            {
                maxDamage = damageAttribute.value;
            }
            if (secundaryWeapon)
            {
                secundaryWeapon.OnEquip(item);
            }
        }