public override void applyGunPerk(GunParent gun) { if (gun.ammoQuantity == 1) { gun.currentStats.damage *= 2; } }
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; } }
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; } }
public virtual void applyGunPerk(GunParent gun) { }
public override void applyGunPerk(GunParent gun) { StartCoroutine(delayedShot(gun)); }
private IEnumerator delayedShot(GunParent gun) { yield return(new WaitForSeconds(0.2f)); gun.fireBullet(); }