Esempio n. 1
0
        /************************************************************************************************************************/

        /// <summary>Stores the details of the specified event.</summary>
        public static void CopyEvent(UltEventBase e)
        {
            var eventType = e.GetType();

            if (_Event == null || _Event.GetType() != eventType)
            {
                _Event = (UltEventBase)Activator.CreateInstance(eventType);
            }

            _Event.CopyFrom(e);
        }
Esempio n. 2
0
        /************************************************************************************************************************/

        private void DoDynamicListenerGUI(float x, float y, float width, UltEventBase targetEvent)
        {
            x     += IndentSize;
            width -= IndentSize * 2;

            var area = new Rect(x, y, width, EditorGUIUtility.singleLineHeight);

            var calls = targetEvent.GetDynamicCallInvocationList();

            for (int i = 0; i < calls.Length; i++)
            {
                var call = calls[i];
                DoDelegateGUI(area, call);
                area.y += area.height;
            }
        }
Esempio n. 3
0
        /************************************************************************************************************************/

        /// <summary>Overwrites the specified event with the previously copied details.</summary>
        public static void Paste(UltEventBase e)
        {
            e.CopyFrom(_Event);
        }