BEHOLD, MY SUPER LASER PISS
This commit is contained in:
parent
084aada510
commit
e29208a2e5
23 changed files with 760 additions and 20 deletions
20
Assets/Scripts/FireBullet.cs
Normal file
20
Assets/Scripts/FireBullet.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue