using UnityEngine; public class FireBullet : PlayerAbility { public float accuracy; public float bulletLifetime; public float damage; public float projectileSpeed; [SerializeField] private Projectile projectile; protected override void AbilityEffects() { Projectile newProjectile = Instantiate(projectile, transform.position, transform.rotation); newProjectile.damage = damage; newProjectile.speed = projectileSpeed; newProjectile.lifetime = bulletLifetime; newProjectile.RotateToTarget(thisPlayer.mouseWorldPos); newProjectile.transform.Rotate(0, 0, Random.Range(-accuracy, accuracy)); newProjectile.tag = thisPlayer.tag; } }