Exemplo n.º 1
0
        public void SendMessage(object key, object param)
        {
            if (observList.ContainsKey(key))
            {
                ObservParam observParam = new ObservParam();
                observParam.data = param;
                observParam.key  = key;
                Dictionary <Action <ObservParam>, BaseBehaviour> actions = observList[key];

                for (int i = 0; i < actions.Count; i++)
                {
                    BaseBehaviour tmpBehavior = actions.Values.ElementAt(i);
                    tmpBehavior.OnHandlerMessage(observParam, actions.Keys.ElementAt(i));
                }
            }
        }
 internal void OnHandlerMessage(ObservParam observParam, Action <ObservParam> value)
 {
     value(observParam);
 }