public static bool Prefix(WeaponScript __instance) { var eventArgs = new MethodPreviewEventArgs <WeaponScript>(__instance); Weapon.InvokePreviewAwake(eventArgs); return(!eventArgs.Cancel); }
public static bool Prefix(WeaponScript __instance, int BurstCount) { var eventArgs = new MethodPreviewEventArgs <WeaponScript>(__instance); eventArgs.AdditionalData[nameof(BurstCount)] = BurstCount; Weapon.InvokePreviewShotFiredSecondary(eventArgs); return(!eventArgs.Cancel); }
internal static void InvokePreviewShotFiredSecondary(MethodPreviewEventArgs <WeaponScript> e) => PreviewSecondaryShot?.Invoke(null, e);
internal static void InvokePreviewAwake(MethodPreviewEventArgs <WeaponScript> e) => PreviewAwake?.Invoke(null, e);