internal static bool Prefix(Bloon __instance, float rotation) { NBloonEntity bloonEntity = new NBloonEntity(__instance); var o = new BloonEvents.RotateEvent(bloonEntity, rotation); //Create RotateEvent instance if (rotation != bloonEntity.GetRotation()) { EventRegistry.instance.DispatchEvent(ref o); //Dispatch it } return(!o.IsCancelled()); }
public static void onRotate(BloonEvents.RotateEvent e) { IBloonEntity bloon = e.getBloon(); Logger.Log(bloon.getRotation().ToString()); }