Charged Weapons & Hitscan Weapons

Implemented two new weapon types and created the Railgun (which is both) and accompanying VFX
This commit is contained in:
Reinier Vens 2021-01-30 01:02:11 +00:00
commit 2a0fe34611
36 changed files with 49495 additions and 25 deletions

View file

@ -220,6 +220,18 @@ public class SectorRenderer : MonoBehaviour
instantWeapon.OnFire += () =>
_instantWeaponManagers[data].Fire(data, item, instance, entity.Target.Value != null ? EntityInstances[entity.Target.Value] : null);
if (behavior is ChargedWeapon chargedWeapon)
{
var chargeManager = _instantWeaponManagers[data].GetComponent<ChargeEffectManager>();
if (chargeManager)
{
chargedWeapon.OnStartCharging += () => chargeManager.StartCharging(chargedWeapon, item, instance);
chargedWeapon.OnStopCharging += () => chargeManager.StopCharging(chargedWeapon);
chargedWeapon.OnCharged += () => chargeManager.Charged(chargedWeapon);
chargedWeapon.OnFailed += () => chargeManager.Failed(chargedWeapon);
}
}
}
if (behavior is ConstantWeapon constantWeapon)