Пример #1
0
        public static void InvokeGeneratorUnlock(GameObject player, Generator079 generator, ref bool allow)
        {
            if (GeneratorUnlockEvent == null)
            {
                return;
            }

            GeneratorUnlockEvent ev = new GeneratorUnlockEvent()
            {
                Player    = player.GetPlayer(),
                Generator = generator,
                Allow     = allow
            };

            GeneratorUnlockEvent.Invoke(ref ev);

            allow = ev.Allow;
        }
Пример #2
0
        internal static void InvokeGeneratorUnlock(GameObject person, Generator079 generator, ref bool allow)
        {
            GeneratorUnlock generatorUnlock = GeneratorUnlockEvent;

            if (generatorUnlock == null)
            {
                return;
            }
            GeneratorUnlockEvent ev = new GeneratorUnlockEvent()
            {
                Allow     = allow,
                Generator = generator,
                Player    = Player.GetPlayer(person)
            };

            generatorUnlock.Invoke(ref ev);
            allow = ev.Allow;
        }