mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-04-21 21:50:12 +08:00
61 lines
2.4 KiB
C#
61 lines
2.4 KiB
C#
using BetterGenshinImpact.Core.Recognition;
|
|
using BetterGenshinImpact.GameTask.Model;
|
|
using OpenCvSharp;
|
|
|
|
namespace BetterGenshinImpact.GameTask.Common.Element.Assets;
|
|
|
|
public class ElementAssets : BaseAssets<ElementAssets>
|
|
{
|
|
public RecognitionObject BtnWhiteConfirm;
|
|
public RecognitionObject BtnWhiteCancel;
|
|
public RecognitionObject BtnBlackConfirm;
|
|
public RecognitionObject PaimonMenuRo;
|
|
public RecognitionObject BlueTrackPoint;
|
|
|
|
private ElementAssets()
|
|
{
|
|
// 按钮
|
|
BtnWhiteConfirm = new RecognitionObject
|
|
{
|
|
Name = "BtnWhiteConfirm",
|
|
RecognitionType = RecognitionTypes.TemplateMatch,
|
|
TemplateImageMat = GameTaskManager.LoadAssetImage(@"Common\Element", "btn_white_confirm.png"),
|
|
DrawOnWindow = false
|
|
}.InitTemplate();
|
|
BtnWhiteCancel = new RecognitionObject
|
|
{
|
|
Name = "BtnWhiteCancel",
|
|
RecognitionType = RecognitionTypes.TemplateMatch,
|
|
TemplateImageMat = GameTaskManager.LoadAssetImage(@"Common\Element", "btn_white_cancel.png"),
|
|
DrawOnWindow = false
|
|
}.InitTemplate();
|
|
BtnBlackConfirm = new RecognitionObject
|
|
{
|
|
Name = "BtnBlackConfirm",
|
|
RecognitionType = RecognitionTypes.TemplateMatch,
|
|
TemplateImageMat = GameTaskManager.LoadAssetImage(@"Common\Element", "btn_black_confirm.png"),
|
|
DrawOnWindow = false
|
|
}.InitTemplate();
|
|
// 派蒙菜单
|
|
// 此图38x40 小地图210x210 小地图左上角位置 24,-15
|
|
PaimonMenuRo = new RecognitionObject
|
|
{
|
|
Name = "PaimonMenu",
|
|
RecognitionType = RecognitionTypes.TemplateMatch,
|
|
TemplateImageMat = GameTaskManager.LoadAssetImage(@"Common\Element", "paimon_menu.png"),
|
|
RegionOfInterest = new Rect(0, 0, CaptureRect.Width / 4, CaptureRect.Height / 4),
|
|
DrawOnWindow = false
|
|
}.InitTemplate();
|
|
|
|
// 任务追踪点位
|
|
BlueTrackPoint = new RecognitionObject
|
|
{
|
|
Name = "BlueTrackPoint",
|
|
RecognitionType = RecognitionTypes.TemplateMatch,
|
|
TemplateImageMat = GameTaskManager.LoadAssetImage(@"Common\Element", "blue_track_point_28x.png"),
|
|
RegionOfInterest = new Rect((int)(300 * AssetScale), 0, CaptureRect.Width - (int)(600 * AssetScale), CaptureRect.Height),
|
|
DrawOnWindow = true
|
|
}.InitTemplate();
|
|
}
|
|
}
|