Weapos Rejiggered
Modified weapon scripts to eliminate specialized projectile behavior - allows charged weapons to have projectiles and modify weapon stats when charged Added machine gun weapon & VFX Moved third party code to Plugins folder to improve compile times
This commit is contained in:
parent
2a0fe34611
commit
dbc522a224
2105 changed files with 7033 additions and 1141 deletions
|
|
@ -219,7 +219,7 @@ public class SectorRenderer : MonoBehaviour
|
|||
}
|
||||
|
||||
instantWeapon.OnFire += () =>
|
||||
_instantWeaponManagers[data].Fire(data, item, instance, entity.Target.Value != null ? EntityInstances[entity.Target.Value] : null);
|
||||
_instantWeaponManagers[data].Fire(instantWeapon, item, instance, entity.Target.Value != null && EntityInstances.ContainsKey(entity.Target.Value) ? EntityInstances[entity.Target.Value] : null);
|
||||
|
||||
if (behavior is ChargedWeapon chargedWeapon)
|
||||
{
|
||||
|
|
@ -474,6 +474,16 @@ public class SectorRenderer : MonoBehaviour
|
|||
var t = Instantiate(EntityInstances[entity].Prefab.DestroyEffect).transform;
|
||||
t.position = EntityInstances[entity].Prefab.transform.position;
|
||||
}
|
||||
|
||||
foreach (var item in entity.Equipment)
|
||||
{
|
||||
foreach (var behavior in item.Behaviors)
|
||||
{
|
||||
if(behavior is Weapon weapon)
|
||||
weapon.ResetEvents();
|
||||
}
|
||||
}
|
||||
|
||||
Destroy(EntityInstances[entity].Transform.gameObject);
|
||||
EntityInstances.Remove(entity);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue