Пример #1
0
 public static bool MoteSpawned(RealtimeMoteList __instance, Mote newMote)
 {
     lock (__instance)
     {
         __instance.allMotes.Add(newMote);
     }
     return(false);
 }
Пример #2
0
 public static bool MoteListUpdate(RealtimeMoteList __instance)
 {
     foreach (Mote mote in allMotes.Values.ToList())
     {
         mote.RealtimeUpdate();
     }
     return(false);
 }
Пример #3
0
 public static bool Clear(RealtimeMoteList __instance)
 {
     lock (__instance)
     {
         __instance.allMotes = new List <Mote>();
     }
     return(false);
 }
 public static bool prefix(ref RealtimeMoteList __instance, Mote oldMote)
 {
     lock (locker)
     {
         __instance.allMotes.Remove(oldMote);
     }
     return(false);
 }
 public static bool prefix(ref RealtimeMoteList __instance, Mote newMote)
 {
     lock (locker)
     {
         __instance.allMotes.Add(newMote);
     }
     return(false);
 }
Пример #6
0
 public static bool MoteDespawned(RealtimeMoteList __instance, Mote oldMote)
 {
     lock (__instance)
     {
         List <Mote> newMotes = new List <Mote>(__instance.allMotes);
         newMotes.Remove(oldMote);
         __instance.allMotes = newMotes;
     }
     return(false);
 }
Пример #7
0
 public static bool MoteDespawned(RealtimeMoteList __instance, Mote oldMote)
 {
     allMotes.TryRemove(oldMote, out _);
     return(false);
 }
Пример #8
0
 public static bool MoteSpawned(RealtimeMoteList __instance, Mote newMote)
 {
     allMotes.TryAdd(newMote, newMote);
     return(false);
 }
Пример #9
0
 public static bool Clear(RealtimeMoteList __instance)
 {
     allMotes.Clear();
     return(false);
 }