Beispiel #1
0
 public override void applyGunPerk(GunParent gun)
 {
     if (gun.ammoQuantity == 1)
     {
         gun.currentStats.damage *= 2;
     }
 }
Beispiel #2
0
    public override void applyGunPerk(GunParent gun)
    {
        var rand = new System.Random((int)System.DateTime.Now.Ticks);

        if (rand.Next(0, chance) == 0)
        {
            gun.bulletProperties["poison"] = true;
        }
    }
Beispiel #3
0
 public override void applyGunPerk(GunParent gun)
 {
     if (!statsUpdated)
     {
         Debug.Log("applyStatChange");
         gun.statsBaseState.ammoCapacity   += statsToUpdate.ammoCapacity;
         gun.statsBaseState.reloadSpeed    += statsToUpdate.reloadSpeed;
         gun.statsBaseState.damage         += statsToUpdate.damage;
         gun.statsBaseState.shotDelay      += statsToUpdate.shotDelay;
         gun.statsBaseState.spread         += statsToUpdate.spread;
         gun.statsBaseState.bulletVelocity += statsToUpdate.bulletVelocity;
         gun.statsBaseState.lifetime       += statsToUpdate.lifetime;
         gun.statsBaseState.loudness       += statsToUpdate.loudness;
         statsUpdated = true;
     }
 }
Beispiel #4
0
 public virtual void applyGunPerk(GunParent gun)
 {
 }
Beispiel #5
0
 public override void applyGunPerk(GunParent gun)
 {
     StartCoroutine(delayedShot(gun));
 }
Beispiel #6
0
    private IEnumerator delayedShot(GunParent gun)
    {
        yield return(new WaitForSeconds(0.2f));

        gun.fireBullet();
    }