Example #1
0
 static void Postfix(Map ___map)
 {
     if (___map != last)
     {
         last = ___map;
         manager = ShieldManager.For(___map);
     }
     manager?.DrawShields(Find.CameraDriver.CurrentViewRect, ___map);
 }
Example #2
0
        public static void Register(Map map, IShieldManager manager)
        {
            var component = Component;

            var existing = component._managersByMap.TryGetValue(map, out var result);

            if (existing)
            {
                component._managers.Remove(result);
            }

            component._managersByMap.Add(map, manager);
            component._managers.Add(manager);
        }