示例#1
0
        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
        }
示例#2
0
        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
        }
示例#3
0
        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());
        }
示例#4
0
        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());
        }
示例#5
0
        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());
        }