2021-02-04 04:37:47 +00:00
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
public class LightningGunManager : InstantWeaponEffectManager
|
|
|
|
|
{
|
|
|
|
|
public Prototype Prototype;
|
|
|
|
|
|
|
|
|
|
public override void Fire(InstantWeapon weapon, EquippedItem item, EntityInstance source, EntityInstance target)
|
|
|
|
|
{
|
|
|
|
|
var p = Prototype.Instantiate<Lightning>();
|
|
|
|
|
var hp = source.Entity.Hardpoints[item.Position.x, item.Position.y];
|
|
|
|
|
var barrel = source.GetBarrel(hp);
|
|
|
|
|
p.Barrel = barrel;
|
|
|
|
|
p.Source = source;
|
|
|
|
|
p.Range = weapon.Range;
|
2026-07-05 19:36:19 +01:00
|
|
|
p.ImpactIntensity = 1;
|
2021-02-04 04:37:47 +00:00
|
|
|
p.Target = target;
|
|
|
|
|
p.Fire();
|
|
|
|
|
}
|
2026-06-14 17:37:51 +01:00
|
|
|
}
|