private IEnumerator ShootLaser() { float laserDamage = owner.damage; PlayLaserEffect(); while (isTargetInRange) { laserDamage *= scalationAmount; player.SendMessage("ReceiveDamage", laserDamage); yield return(new WaitForSeconds(scalationInterval)); } StopLaserEffect(); }
private IEnumerator ShootLaser() { float laserDamage = owner.damage; PlayLaserEffect(); isShootingLaser = true; while (isTargetInRange) { laserDamage *= scalationAmount; player.SendMessage("ReceiveDamage", laserDamage); owner.RegainHealth(laserDamage * 2f); yield return(new WaitForSeconds(scalationInterval)); } isShootingLaser = false; StopLaserEffect(); }