using System.Collections; using System.Collections.Generic; using UnityEngine; public class LaserManager : InstantWeaponEffectManager { public Prototype ProjectilePrototype; public override void Fire(InstantWeapon weapon, EquippedItem item, EntityInstance source, EntityInstance target, int shotId) { var p = ProjectilePrototype.Instantiate(); var hp = item.Hardpoint; var barrel = source.GetBarrel(hp); var t = p.transform; t.SetParent(barrel); t.forward = barrel.forward; t.position = barrel.position; p.ShotId = shotId; p.SourceEntity = source.Entity; p.Range = weapon.Range; p.TargetTransform = target != null ? target.transform : null; } }