void Start() { DMInvoker invoker = new DMInvoker(); ConcreteCommand1 cmd1 = new ConcreteCommand1(new DMReceiver1()); invoker.AddCommand(cmd1); invoker.AddCommand(cmd1); invoker.ExecuteCommand(); }
void Start() { DMInvoker invoker = new DMInvoker(); DMReceiver1 receiver1 = new DMReceiver1(); ConcreateCommand1 command = new ConcreateCommand1(receiver1); invoker.AddCommand(command); invoker.InvokeCommand(); }