public static void InvokeGrenadeThrown(ref GrenadeManager grenadeManager, ref int grenadeId, ref bool slow, ref double fuse, ref bool allow) { if (GrenadeThrownEvent == null) { return; } GrenadeThrownEvent ev = new GrenadeThrownEvent() { Player = grenadeManager.gameObject.GetPlayer(), Gm = grenadeManager, Id = grenadeId, Allow = allow, Slow = slow, Fuse = fuse }; GrenadeThrownEvent.InvokeSafely(ev); allow = ev.Allow; grenadeId = ev.Id; grenadeManager = ev.Gm; slow = ev.Slow; fuse = ev.Fuse; }
public static void InvokeGrenadeThrown(ref GrenadeManager gm, ref int id, ref bool slow, ref double fuse, ref bool allow) { GrenadeThrown grenadeThrown = GrenadeThrownEvent; if (grenadeThrown == null) { return; } GrenadeThrownEvent ev = new GrenadeThrownEvent() { Player = gm.gameObject.GetPlayer(), Gm = gm, Id = id, Allow = allow, Slow = slow, Fuse = fuse }; grenadeThrown?.Invoke(ref ev); allow = ev.Allow; id = ev.Id; gm = ev.Gm; slow = ev.Slow; fuse = ev.Fuse; }