internal static void Postfix(Tower __instance) { NTowerEntity towerEntity = new NTowerEntity(__instance); var o = new TowerEvents.DeletedEvent(towerEntity); //Create DeletedEvent instance EventRegistry.instance.DispatchEvent(ref o); //Dispatch it }
internal static void Postfix(Tower __instance, Entity target, Model modelToUse) { NTowerEntity towerEntity = new NTowerEntity(__instance); var o = new TowerEvents.CreatedEvent(towerEntity); //Create CreatedEvent instance EventRegistry.instance.DispatchEvent(ref o); //Dispatch it }
internal static bool Prefix(TowerToSimulation __instance, int pathIndex, Il2CppSystem.Action <bool> callback) { NTowerEntity towerEntity = new NTowerEntity(__instance.tower); var o = new TowerEvents.UpgradeEvent(towerEntity); //Create UpgradePatch instance EventRegistry.instance.DispatchEvent(ref o); //Dispatch it return(!o.IsCancelled()); }
internal static bool Prefix(TowerToSimulation __instance) { NTowerEntity towerEntity = new NTowerEntity(__instance.tower); var o = new TowerEvents.SelectedEvent(towerEntity); //Create SelectedPatch instance EventRegistry.instance.DispatchEvent(ref o); //Dispatch it return(!o.IsCancelled()); }
internal static bool Prefix(Simulation __instance, Tower tower, int inputId) { NTowerEntity towerEntity = new NTowerEntity(tower); var o = new TowerEvents.SoldEvent(towerEntity, tower.SaleValue); //Create SoldPatch instance EventRegistry.instance.DispatchEvent(ref o); //Dispatch it return(!o.IsCancelled()); }