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);
        }
Exemple #3
0
 internal static void InvokePreviewShotFiredSecondary(MethodPreviewEventArgs <WeaponScript> e)
 => PreviewSecondaryShot?.Invoke(null, e);
Exemple #4
0
 internal static void InvokePreviewAwake(MethodPreviewEventArgs <WeaponScript> e)
 => PreviewAwake?.Invoke(null, e);