blob: 6a7bf2a9403450c1dd8ea2f78217a47f83532e68 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 | using UnityEngine;
public class ParticleBeam : Projectile
{
	[SerializeField]
	private GameObject beamTrail;
	protected override void MoveProjectile()
	{
		base.MoveProjectile();
		beamTrail.transform.position = base.transform.position + new Vector3(Random.Range(-1f, 1f), Random.Range(0f, 1f), Random.Range(-1f, 1f));
	}
	protected new virtual void OnHit(RaycastHit hit)
	{
		beamTrail.transform.position = hit.point;
		base.OnHit(hit);
	}
}
 |