public void SetArgument(string key, object value) { if (arguments.ContainsKey(key)) { arguments[key].data = value.ToString(); } }
/// <summary> /// A quick helper function for execute to get the data from the arg dict /// </summary> /// <param name="arg_name"></param> /// <param name="owner"></param> /// <param name="action"></param> /// <returns></returns> public object GetArgument(string arg_name, BattleObject owner, GameAction action, object defaultValue = null) { if (arg_dict.ContainsKey(arg_name)) { return(arg_dict[arg_name].GetData(owner, action)); } else { Debug.LogWarning("Argument " + arg_name + " not found in subaction: " + SubactionName); } return(defaultValue); }