public void Invoke(Command command) { var tCommand = command as T; Assert.IsNotNull(tCommand, $"typedMessage is null for: notice = {command.GetType().Name}, T = {typeof(T).Name}"); if (action != null) { action.Invoke(tCommand); } }
public bool AttemptToInvokeCommand(string key) // Command Action Response invokation in Scriptable object { if (commandDictionary.ContainsKey(key)) { CommandAction action = commandDictionary[key]; if (action != null) { action.Invoke(); return(true); } else { Debug.LogWarning("No action assigned to " + key); } } return(false); }
public void Invoke(string args) { command.Invoke(args); }
public void Execute(object parameter) { CommandAction?.Invoke(); }
private void DoShowTaskCommand() { CommandAction?.Invoke(); // do other stuff here... }
protected virtual void YesCommand_Commandaction(object para) { DialogResult = true; yesAction?.Invoke(this); Close(); }
protected virtual void NoCommand_Commandaction(object para) { DialogResult = false; noAction?.Invoke(this); Close(); }