public override async Task <IBaseEventTriggerModel> InvokeNextEventTriggerAsync(IBaseEventTriggerModel saveModel, ProcessConfigModel processEventTriggerModel) { if (processEventTriggerModel.Token.IsCancellationRequested) { return(null); } int hpPercent = 100; int mpPercent = 100; Dispatcher.Invoke(() => { if (_hpRoiPosition != null) { var lower = Tuple.Create(_colorDatas["HP"].Lower.R, _colorDatas["HP"].Lower.G, _colorDatas["HP"].Lower.B); var upper = Tuple.Create(_colorDatas["HP"].Upper.R, _colorDatas["HP"].Upper.G, _colorDatas["HP"].Upper.B); foreach (var process in processEventTriggerModel.Processes) { CheckPercentageImage(_hpRoiPosition, process, lower, upper); } } }); var nextModel = await contentController.TriggerProcess(saveModel as GameEventTriggerModel, processEventTriggerModel); return(nextModel.Item2); }
public override async Task <IBaseEventTriggerModel> InvokeNextEventTriggerAsync(IBaseEventTriggerModel saveModel, ProcessConfigModel processEventTriggerModel) { if (processEventTriggerModel.Token.IsCancellationRequested) { return(null); } var nextModel = await contentController.TriggerProcess(saveModel as EventTriggerModel, processEventTriggerModel); return(nextModel.Item2); }