void missile() { if (fireCooldown <= 0f) { float dam = damage.get(); Buff b = null; if (missileR3Unlock) { b = new ArmorShredBuff(6, missileR3ArmorShred); } shootTargetProjectile(missilePrefab, dam, missileExplosionRadius.get(), b); fireCooldown = 1f / fireRate.get(); } }
void shoot(Player player, Vector3 dir) { GameObject proj = (GameObject)Instantiate(level == 3 ? projectileMissile : projectileBullet, player.transform.position, Quaternion.identity); SkillshotBullet projScript = proj.GetComponent <SkillshotBullet>(); projScript.setSource(player.gameObject); proj.transform.localScale /= 1.6f; projScript.seek(dir); projScript.setDamage(damagePerProjectile); projScript.setRange(range); projScript.setTargetTag(player.targetTag); projScript.setIgnoreArmor(false); projScript.setPlayerShot(true); if (level >= 2) { ArmorShredBuff buff = new ArmorShredBuff(2, armorShred); projScript.setBuffToApply(buff); } projScript.setExplosionRadius(level == 3 ? explosionRadius : 0f); projScript.setChanceToImpactEffect(level == 3 ? .2f : 1f); }