Charged Weapons & Hitscan Weapons
Implemented two new weapon types and created the Railgun (which is both) and accompanying VFX
This commit is contained in:
parent
4c0038830b
commit
2a0fe34611
36 changed files with 49495 additions and 25 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue