Example #1
0
        public override void Execute(ObserverParam notify)
        {
            Debug.Log("SetUpCMD is Running");

            Dispatcher.CommandMap.Bind(AppEvent.LoadScene).To <LoadSceneCMD>();

            Debug.Log("SetupCmd is Complete");
        }
Example #2
0
        protected internal void ExecuteCommand(ObserverParam param)
        {
            var binding = GetBind(param.Key);

            if (binding == null)
            {
                return;
            }

            if (binding.SingleRunList.ContainsKey(param.Key))
            {
                if (binding.SingleRunList[param.Key])
                {
                    return;
                }
            }

            var binded = binding.Binded;

            if (binded == null)
            {
                return;
            }

            foreach (var pair in binded)
            {
                var cmd = pair.Value as Type;
                if (cmd == null)
                {
                    continue;
                }
                var command = (ICommand)Activator.CreateInstance(cmd);
                command.Execute(param);
            }

            if (binding.SingleRunList.ContainsKey(param.Key))
            {
                if (!binding.SingleRunList[param.Key])
                {
                    binding.SingleRunList[param.Key] = true;
                }
            }
        }
Example #3
0
 public void OnHandlerObserver(ObserverParam param, Action <ObserverParam> callBack)
 {
     callBack(param);
 }
Example #4
0
 virtual public void Execute(ObserverParam notify)
 {
 }
Example #5
0
        public override void Execute(ObserverParam notify)
        {
            string sceneName = notify.Data as string;

            SceneManager.LoadScene(sceneName);
        }