public MethodEventListener FindMethodEventListener(string @name, bool createListener)
 {
     if (!methodEventListeners.Contains(name) && createListener)
     {
         methodEventListeners.Add(name, new MethodEventListener(name));
         return((MethodEventListener)methodEventListeners[name]);
     }
     else
     {
         return((MethodEventListener)methodEventListeners[name]);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Create a new method events. Populates these triggerable events into an Event Method Listener, by binding them just like delegates.
 /// </summary>
 /// <param name="name">The name of this Method Event.</param>
 public MethodEvent(string @name, IGraph @graph, GameObject @gameobject, int eventId, AotDictionary arguments)
 {
     this.@name      = @name;
     instanceId      = new object().GetHashCode();
     methodEventData = new AotDictionary();
     methodEventData.Add("name", @name);
     methodEventData.Add("instanceId", instanceId);
     methodEventData.Add("graph", @graph);
     methodEventData.Add("gameObject", @gameobject);
     methodEventData.Add("arguments", @arguments);
     methodEventData.Add("eventId", eventId);
 }
Ejemplo n.º 3
0
        public IDictionary Merge(Flow flow)
        {
            var dictionary = new AotDictionary();

            for (var i = 0; i < inputCount; i++)
            {
                var inputDictionary = flow.GetValue <IDictionary>(multiInputs[i]);

                var enumerator = inputDictionary.GetEnumerator();

                while (enumerator.MoveNext())
                {
                    if (!dictionary.Contains(enumerator.Key))
                    {
                        dictionary.Add(enumerator.Key, enumerator.Value);
                    }
                }
            }

            return(dictionary);
        }