This interface permits derived classes to be used for script compilation recognition.
Esempio n. 1
0
        private static void OnScriptInstanceDestroyed(CryScriptInstance instance)
        {
            // ReSharper disable PossibleUnintendedReferenceComparison
            Delegate[] invocationList = Input.KeyEvents.GetInvocationList();
            invocationList.Where(x => x.Target == instance).ForEach(x => KeyEvents -= (KeyEventDelegate)x);

            invocationList = Input.MouseEvents.GetInvocationList();
            invocationList.Where(x => x.Target == instance).ForEach(x => MouseEvents -= (MouseEventDelegate)x);

            ActionmapEvents.RemoveAll(instance);
            // ReSharper restore PossibleUnintendedReferenceComparison
        }
Esempio n. 2
0
        static void OnScriptInstanceDestroyed(CryScriptInstance instance)
        {
            foreach (KeyEventDelegate d in KeyEvents.GetInvocationList())
            {
                if (d.Target == instance)
                {
                    KeyEvents -= d;
                }
            }

            foreach (MouseEventDelegate d in MouseEvents.GetInvocationList())
            {
                if (d.Target == instance)
                {
                    MouseEvents -= d;
                }
            }

            ActionmapEvents.RemoveAll(instance);
        }
Esempio n. 3
0
        static void OnScriptInstanceDestroyed(CryScriptInstance instance)
        {
            foreach (KeyEventDelegate d in KeyEvents.GetInvocationList())
            {
                if (d.Target == instance)
                    KeyEvents -= d;
            }

            foreach (MouseEventDelegate d in MouseEvents.GetInvocationList())
            {
                if (d.Target == instance)
                    MouseEvents -= d;
            }

            ActionmapEvents.RemoveAll(instance);
        }