@bettergi/types 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/csharp/BetterGenshinImpact/Core/Recognition/OcrEngineTypes.d.ts +13 -7
- package/csharp/BetterGenshinImpact/Core/Recognition/RecognitionObject.d.ts +151 -142
- package/csharp/BetterGenshinImpact/Core/Recognition/RecognitionTypes.d.ts +20 -14
- package/csharp/BetterGenshinImpact/Core/Script/Dependence/Model/RealtimeTimer.d.ts +20 -14
- package/csharp/BetterGenshinImpact/Core/Script/Dependence/Model/SoloTask.d.ts +12 -7
- package/csharp/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainParam.d.ts +72 -0
- package/csharp/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainTask.d.ts +40 -0
- package/csharp/BetterGenshinImpact/GameTask/AutoFight/AutoFightParam.d.ts +113 -0
- package/csharp/BetterGenshinImpact/GameTask/AutoFight/AutoFightTask.d.ts +40 -0
- package/csharp/BetterGenshinImpact/GameTask/ISoloTask.d.ts +13 -0
- package/csharp/BetterGenshinImpact/GameTask/Model/Area/Converter/INodeConverter.d.ts +8 -2
- package/csharp/BetterGenshinImpact/GameTask/Model/Area/ImageRegion.d.ts +65 -52
- package/csharp/BetterGenshinImpact/GameTask/Model/Area/Region.d.ts +190 -136
- package/csharp/BetterGenshinImpact/GameTask/Model/BaseTaskParam.d.ts +13 -0
- package/csharp/BetterGenshinImpact/View/Drawable/DrawContent.d.ts +45 -0
- package/csharp/BetterGenshinImpact/View/Drawable/LineDrawable.d.ts +17 -9
- package/csharp/BetterGenshinImpact/View/Drawable/RectDrawable.d.ts +20 -10
- package/csharp/Microsoft/Extensions/Localization/IStringLocalizer.d.ts +16 -0
- package/csharp/Microsoft/Extensions/Localization/LocalizedString.d.ts +26 -0
- package/csharp/SixLabors/ImageSharp/Image.d.ts +9 -0
- package/csharp/System/Collections/DictionaryEntry.d.ts +14 -0
- package/csharp/System/Collections/Generic/Dictionary.d.ts +193 -34
- package/csharp/System/Collections/Generic/ICollection.d.ts +15 -9
- package/csharp/System/Collections/Generic/IDictionary.d.ts +11 -22
- package/csharp/System/Collections/Generic/IEnumerable.d.ts +10 -3
- package/csharp/System/Collections/Generic/IEnumerator.d.ts +10 -5
- package/csharp/System/Collections/Generic/IEqualityComparer.d.ts +9 -3
- package/csharp/System/Collections/Generic/IList.d.ts +16 -7
- package/csharp/System/Collections/Generic/IReadOnlyCollection.d.ts +9 -3
- package/csharp/System/Collections/Generic/IReadOnlyDictionary.d.ts +15 -10
- package/csharp/System/Collections/Generic/IReadOnlyList.d.ts +9 -3
- package/csharp/System/Collections/Generic/KeyValuePair.d.ts +15 -8
- package/csharp/System/Collections/Generic/List.d.ts +149 -77
- package/csharp/System/Collections/ICollection.d.ts +17 -0
- package/csharp/System/Collections/IDictionary.d.ts +29 -0
- package/csharp/System/Collections/IDictionaryEnumerator.d.ts +14 -0
- package/csharp/System/Collections/IEnumerable.d.ts +9 -0
- package/csharp/System/Collections/IEnumerator.d.ts +13 -0
- package/csharp/System/Collections/IList.d.ts +30 -0
- package/csharp/System/DateTimeOffset.d.ts +8 -0
- package/csharp/System/Drawing/Bitmap.d.ts +8 -2
- package/csharp/System/Drawing/Color.d.ts +341 -2
- package/csharp/System/Drawing/Image.d.ts +8 -2
- package/csharp/System/Drawing/KnownColor.d.ts +357 -0
- package/csharp/System/Drawing/Pen.d.ts +8 -2
- package/csharp/System/Globalization/CultureInfo.d.ts +9 -0
- package/csharp/System/IAsyncDisposable.d.ts +10 -0
- package/csharp/System/IDisposable.d.ts +9 -0
- package/csharp/System/IEquatable.d.ts +8 -0
- package/csharp/System/Runtime/Serialization/IDeserializationCallback.d.ts +9 -0
- package/csharp/System/Runtime/Serialization/ISerializable.d.ts +9 -0
- package/csharp/System/Threading/CancellationToken.d.ts +58 -0
- package/csharp/System/Threading/CancellationTokenRegistration.d.ts +27 -0
- package/csharp/System/Threading/CancellationTokenSource.d.ts +51 -0
- package/csharp/System/Threading/ITimer.d.ts +12 -0
- package/csharp/System/Threading/Tasks/ValueTask.d.ts +12 -0
- package/csharp/System/Threading/WaitHandle.d.ts +8 -0
- package/csharp/System/TimeProvider.d.ts +31 -0
- package/csharp/System/TimeSpan.d.ts +8 -0
- package/csharp/System/Windows/Media/Matrix.d.ts +80 -0
- package/csharp/System/Windows/Point.d.ts +39 -5
- package/csharp/System/Windows/Vector.d.ts +51 -0
- package/modules/dispatcher.d.ts +54 -3
- package/modules/file.d.ts +3 -3
- package/modules/genshin.d.ts +18 -1
- package/modules/globalMethod.d.ts +9 -5
- package/modules/http.d.ts +23 -21
- package/package.json +1 -1
- package/csharp/Vanara/PInvoke/POINT.d.ts +0 -23
- package/csharp/Vanara/PInvoke/RECT.d.ts +0 -37
- package/csharp/Vanara/PInvoke/SIZE.d.ts +0 -19
- package/enums/wood.d.ts +0 -27
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import "../../GameTask/Model/BaseTaskParam";
|
|
2
|
+
import "./AutoFightTask";
|
|
3
|
+
|
|
4
|
+
declare global {
|
|
5
|
+
namespace BetterGenshinImpact.GameTask.AutoFight {
|
|
6
|
+
class AutoFightParam extends BetterGenshinImpact.GameTask.Model
|
|
7
|
+
.BaseTaskParam<BetterGenshinImpact.GameTask.AutoFight.AutoFightTask> {
|
|
8
|
+
/** 快速检查战斗结束配置 */
|
|
9
|
+
finishDetectConfig: BetterGenshinImpact.GameTask.AutoFight.FightFinishDetectConfig;
|
|
10
|
+
|
|
11
|
+
combatStrategyPath: string;
|
|
12
|
+
|
|
13
|
+
/** 检测到战斗已经结束的情况下,停止自动战斗功能 */
|
|
14
|
+
fightFinishDetectEnabled: boolean;
|
|
15
|
+
|
|
16
|
+
/** 战斗结束后尽可能拾取周围掉落物 */
|
|
17
|
+
pickDropsAfterFightEnabled: boolean;
|
|
18
|
+
|
|
19
|
+
/** 战斗结束后拾取周围掉落物延迟(单位为秒,0表示不自动拾取掉落物) */
|
|
20
|
+
pickDropsAfterFightSeconds: number;
|
|
21
|
+
|
|
22
|
+
battleThresholdForLoot: number;
|
|
23
|
+
|
|
24
|
+
/** 到达指定时间后,自动停止战斗 */
|
|
25
|
+
timeout: number;
|
|
26
|
+
|
|
27
|
+
/** 战斗结束后,如存在(万叶/琴),则执行长E聚集材料动作 */
|
|
28
|
+
kazuhaPickupEnabled: boolean;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* 根据填入人或人和cd,来决定当此人元素战技cd未结束时,跳过此人出招,来优化战斗流程。
|
|
32
|
+
* 可填入人名或人名数字(用逗号分隔),多种用分号分隔。
|
|
33
|
+
* 例如:白术;钟离,12;,
|
|
34
|
+
* 如果是人名,则用内置cd检查(或填入数字也小于0);
|
|
35
|
+
* 如果是人名和数字,则把数字当做出招cd(秒)。
|
|
36
|
+
*/
|
|
37
|
+
actionSchedulerByCd: string;
|
|
38
|
+
|
|
39
|
+
/** 万叶队伍名称 */
|
|
40
|
+
kazuhaPartyName: string;
|
|
41
|
+
|
|
42
|
+
/** 只拾取精英掉落模式 */
|
|
43
|
+
onlyPickEliteDropsMode: string;
|
|
44
|
+
|
|
45
|
+
/** 盾奶位 */
|
|
46
|
+
guardianAvatar: string;
|
|
47
|
+
|
|
48
|
+
/** 盾奶位E战技 */
|
|
49
|
+
guardianCombatSkip: boolean;
|
|
50
|
+
|
|
51
|
+
/** 检测盾奶位战技短按或长按(禁用:短按 / 启用:长按) */
|
|
52
|
+
guardianAvatarHold: boolean;
|
|
53
|
+
|
|
54
|
+
/** 释放Q前检测 */
|
|
55
|
+
checkBeforeBurst: boolean;
|
|
56
|
+
|
|
57
|
+
isFirstCheck: boolean;
|
|
58
|
+
|
|
59
|
+
/** 旋转速度(建议单次360°左右) */
|
|
60
|
+
rotaryFactor: number;
|
|
61
|
+
|
|
62
|
+
/** 释放Q爆发 */
|
|
63
|
+
burstEnabled: boolean;
|
|
64
|
+
|
|
65
|
+
/** 琴二次拾取 */
|
|
66
|
+
qinDoublePickUp: boolean;
|
|
67
|
+
|
|
68
|
+
/** 游泳检测(先回战斗节点,失败则去七天神像) */
|
|
69
|
+
swimmingEnabled: boolean;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* 设置战斗策略路径
|
|
73
|
+
* @param strategyName 战斗策略名称
|
|
74
|
+
*/
|
|
75
|
+
setCombatStrategyPath(strategyName?: string): void;
|
|
76
|
+
|
|
77
|
+
/** 设置默认值 */
|
|
78
|
+
setDefault(): void;
|
|
79
|
+
|
|
80
|
+
constructor(
|
|
81
|
+
path: string,
|
|
82
|
+
autoFightConfig: BetterGenshinImpact.GameTask.AutoFight.FightFinishDetectConfig
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** 快速检查战斗结束配置 */
|
|
87
|
+
class FightFinishDetectConfig {
|
|
88
|
+
/** 判断战斗结束读条颜色 */
|
|
89
|
+
battleEndProgressBarColor: string;
|
|
90
|
+
|
|
91
|
+
/** 对于战斗结束基准色的偏差值 */
|
|
92
|
+
battleEndProgressBarColorTolerance: string;
|
|
93
|
+
|
|
94
|
+
/** 是否启用快速检查战斗结束 */
|
|
95
|
+
fastCheckEnabled: boolean;
|
|
96
|
+
|
|
97
|
+
/** 快速检查战斗结束的参数 */
|
|
98
|
+
fastCheckParams: string;
|
|
99
|
+
|
|
100
|
+
/** 检查战斗结束的延时 */
|
|
101
|
+
checkEndDelay: string;
|
|
102
|
+
|
|
103
|
+
/** 按下切换队伍后去检查屏幕色块的延时 */
|
|
104
|
+
beforeDetectDelay: string;
|
|
105
|
+
|
|
106
|
+
/** 打开队伍界面检测战斗结束前,先检测敌人,判断是否需靠近敌或旋转寻找敌人 */
|
|
107
|
+
rotateFindEnemyEnabled: boolean;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
export import AutoFightParam = BetterGenshinImpact.GameTask.AutoFight.AutoFightParam;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import "../../../System/Collections/Generic/List";
|
|
2
|
+
import "../../../System/Threading/CancellationToken";
|
|
3
|
+
import "../../GameTask/Model/Area/ImageRegion";
|
|
4
|
+
import "../../GameTask/Model/Area/Region";
|
|
5
|
+
import "../ISoloTask";
|
|
6
|
+
import "./AutoFightParam";
|
|
7
|
+
|
|
8
|
+
declare global {
|
|
9
|
+
namespace BetterGenshinImpact.GameTask.AutoFight {
|
|
10
|
+
class AutoFightTask implements BetterGenshinImpact.GameTask.ISoloTask {
|
|
11
|
+
name: string;
|
|
12
|
+
|
|
13
|
+
start(ct: System.Threading.CancellationToken): Promise<void>;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 点击使用树脂
|
|
17
|
+
* @param ra 图像识别区域
|
|
18
|
+
* @param resinName 树脂名称
|
|
19
|
+
*/
|
|
20
|
+
static pressUseResin(
|
|
21
|
+
ra: BetterGenshinImpact.GameTask.Model.Area.ImageRegion,
|
|
22
|
+
resinName: string
|
|
23
|
+
): [boolean, number];
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 点击使用树脂
|
|
27
|
+
* @param regionList 识别区域列表
|
|
28
|
+
* @param resinName 树脂名称
|
|
29
|
+
*/
|
|
30
|
+
static pressUseResin(
|
|
31
|
+
regionList: System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>,
|
|
32
|
+
resinName: string
|
|
33
|
+
): [boolean, number];
|
|
34
|
+
|
|
35
|
+
constructor(taskParam: BetterGenshinImpact.GameTask.AutoFight.AutoFightParam);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export {};
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare global {
|
|
2
|
+
namespace BetterGenshinImpact.GameTask.Model.Area.Converter {
|
|
3
|
+
interface INodeConverter {
|
|
4
|
+
toPrev(x: number, y: number, w: number, h: number): [number, number, number, number];
|
|
5
|
+
}
|
|
6
|
+
}
|
|
3
7
|
}
|
|
8
|
+
|
|
9
|
+
export {};
|
|
@@ -1,54 +1,67 @@
|
|
|
1
1
|
import { Mat, Rect } from "mirada/dist/src/types/opencv";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
2
|
+
import "../../../../BetterGenshinImpact/Core/Recognition/RecognitionObject";
|
|
3
|
+
import "../../../../BetterGenshinImpact/GameTask/Model/Area/Converter/INodeConverter";
|
|
4
|
+
import "../../../../BetterGenshinImpact/GameTask/Model/Area/Region";
|
|
5
|
+
import "../../../../BetterGenshinImpact/View/Drawable/DrawContent";
|
|
6
|
+
import "../../../../SixLabors/ImageSharp/Image";
|
|
7
|
+
import "../../../../System/Collections/Generic/List";
|
|
8
|
+
|
|
9
|
+
declare global {
|
|
10
|
+
namespace BetterGenshinImpact.GameTask.Model.Area {
|
|
11
|
+
class ImageRegion extends BetterGenshinImpact.GameTask.Model.Area.Region {
|
|
12
|
+
srcMat: Mat;
|
|
13
|
+
|
|
14
|
+
cacheGreyMat: Mat;
|
|
15
|
+
|
|
16
|
+
cacheImage: SixLabors.ImageSharp.Image;
|
|
17
|
+
|
|
18
|
+
deriveCrop(
|
|
19
|
+
x: number,
|
|
20
|
+
y: number,
|
|
21
|
+
w: number,
|
|
22
|
+
h: number
|
|
23
|
+
): BetterGenshinImpact.GameTask.Model.Area.ImageRegion;
|
|
24
|
+
|
|
25
|
+
deriveCrop(rect: Rect): BetterGenshinImpact.GameTask.Model.Area.ImageRegion;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 在本区域内查找最优识别对象
|
|
29
|
+
* @param ro 识别对象
|
|
30
|
+
* @param successAction 识别成功回调
|
|
31
|
+
* @param failAction 识别失败回调
|
|
32
|
+
*/
|
|
33
|
+
find: (
|
|
34
|
+
ro: BetterGenshinImpact.Core.Recognition.RecognitionObject,
|
|
35
|
+
successAction?: (region: BetterGenshinImpact.GameTask.Model.Area.Region) => void,
|
|
36
|
+
failAction?: () => void
|
|
37
|
+
) => BetterGenshinImpact.GameTask.Model.Area.Region;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 在本区域内查找识别对象,返回所有找到的结果
|
|
41
|
+
* @param ro 识别对象
|
|
42
|
+
* @param successAction 识别成功回调
|
|
43
|
+
* @param failAction 识别失败回调
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
findMulti: (
|
|
47
|
+
ro: BetterGenshinImpact.Core.Recognition.RecognitionObject,
|
|
48
|
+
successAction?: (
|
|
49
|
+
regions: System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>
|
|
50
|
+
) => void,
|
|
51
|
+
failAction?: () => void
|
|
52
|
+
) => System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>;
|
|
53
|
+
|
|
54
|
+
constructor(
|
|
55
|
+
mat: Mat,
|
|
56
|
+
x: number,
|
|
57
|
+
y: number,
|
|
58
|
+
owner?: BetterGenshinImpact.GameTask.Model.Area.Region,
|
|
59
|
+
converter?: BetterGenshinImpact.GameTask.Model.Area.Converter.INodeConverter,
|
|
60
|
+
drawContent?: BetterGenshinImpact.View.Drawable.DrawContent
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export import ImageRegion = BetterGenshinImpact.GameTask.Model.Area.ImageRegion;
|
|
54
65
|
}
|
|
66
|
+
|
|
67
|
+
export {};
|
|
@@ -1,139 +1,193 @@
|
|
|
1
1
|
import { Rect } from "mirada/dist/src/types/opencv";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
2
|
+
import "../../../../System/Drawing/Pen";
|
|
3
|
+
import "../../../../System/IDisposable";
|
|
4
|
+
import "../../../GameTask/Model/Area/Converter/INodeConverter";
|
|
5
|
+
import "../../../GameTask/Model/Area/ImageRegion";
|
|
6
|
+
import "../../../View/Drawable/LineDrawable";
|
|
7
|
+
import "../../../View/Drawable/RectDrawable";
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
9
|
+
declare global {
|
|
10
|
+
namespace BetterGenshinImpact.GameTask.Model.Area {
|
|
11
|
+
class Region implements System.IDisposable {
|
|
12
|
+
dispose(): void;
|
|
13
|
+
|
|
14
|
+
/** 水平位置(像素) */
|
|
15
|
+
x: number;
|
|
16
|
+
|
|
17
|
+
/** 垂直位置(像素) */
|
|
18
|
+
y: number;
|
|
19
|
+
|
|
20
|
+
/** 区域宽度 */
|
|
21
|
+
width: number;
|
|
22
|
+
|
|
23
|
+
/** 区域高度 */
|
|
24
|
+
height: number;
|
|
25
|
+
|
|
26
|
+
/** 边界顶部垂直位置(像素) */
|
|
27
|
+
top: number;
|
|
28
|
+
|
|
29
|
+
/** 边界底部垂直位置(像素) */
|
|
30
|
+
bottom: number;
|
|
31
|
+
|
|
32
|
+
/** 边界左侧水平位置(像素) */
|
|
33
|
+
left: number;
|
|
34
|
+
|
|
35
|
+
/** 边界右侧水平位置(像素) */
|
|
36
|
+
right: number;
|
|
37
|
+
|
|
38
|
+
/** 存放OCR识别的结果文本 */
|
|
39
|
+
text: string;
|
|
40
|
+
|
|
41
|
+
/** 上一个区域 */
|
|
42
|
+
prev: BetterGenshinImpact.GameTask.Model.Area.Region | null;
|
|
43
|
+
|
|
44
|
+
/** 本区域节点向上一个区域节点坐标的转换器 */
|
|
45
|
+
prevConverter: BetterGenshinImpact.GameTask.Model.Area.Converter.INodeConverter | null;
|
|
46
|
+
|
|
47
|
+
/** 点击 [当前区域] 中心(后台模拟) */
|
|
48
|
+
backgroundClick(): void;
|
|
49
|
+
|
|
50
|
+
/** 点击 [当前区域] 中心 */
|
|
51
|
+
click(): void;
|
|
52
|
+
|
|
53
|
+
/** 点击 [当前区域] 指定位置 */
|
|
54
|
+
clickTo(x: number, y: number): void;
|
|
55
|
+
|
|
56
|
+
/** 点击 [当前区域] 指定位置 */
|
|
57
|
+
clickTo(x: number, y: number, w: number, h: number): void;
|
|
58
|
+
|
|
59
|
+
/** 移动鼠标到 [当前区域] 中心 */
|
|
60
|
+
move(): void;
|
|
61
|
+
|
|
62
|
+
/** 移动鼠标到指定位置 */
|
|
63
|
+
moveTo(x: number, y: number): void;
|
|
64
|
+
|
|
65
|
+
/** 移动鼠标到指定位置 */
|
|
66
|
+
moveTo(x: number, y: number, w: number, h: number): void;
|
|
67
|
+
|
|
68
|
+
/** 绘制当前区域 */
|
|
69
|
+
drawSelf(name: string, pen?: System.Drawing.Pen): void;
|
|
70
|
+
|
|
71
|
+
/** 绘制矩形区域 */
|
|
72
|
+
drawRect(
|
|
73
|
+
x: number,
|
|
74
|
+
y: number,
|
|
75
|
+
w: number,
|
|
76
|
+
h: number,
|
|
77
|
+
name: string,
|
|
78
|
+
pen?: System.Drawing.Pen
|
|
79
|
+
): void;
|
|
80
|
+
|
|
81
|
+
/** 绘制矩形区域 */
|
|
82
|
+
drawRect(rect: Rect, name: string, pen?: System.Drawing.Pen): void;
|
|
83
|
+
|
|
84
|
+
/** 将 [当前区域] 转换成 [遮罩窗口绘制矩形] */
|
|
85
|
+
selfToRectDrawable(
|
|
86
|
+
name: string,
|
|
87
|
+
pen?: System.Drawing.Pen
|
|
88
|
+
): BetterGenshinImpact.View.Drawable.RectDrawable;
|
|
89
|
+
|
|
90
|
+
/** 将 [区域] 转换成 [遮罩窗口绘制矩形] */
|
|
91
|
+
toRectDrawable(
|
|
92
|
+
rect: Rect,
|
|
93
|
+
name: string,
|
|
94
|
+
pen?: System.Drawing.Pen
|
|
95
|
+
): BetterGenshinImpact.View.Drawable.RectDrawable;
|
|
96
|
+
|
|
97
|
+
/** 将 [区域] 转换成 [遮罩窗口绘制矩形] */
|
|
98
|
+
toRectDrawable(
|
|
99
|
+
x: number,
|
|
100
|
+
y: number,
|
|
101
|
+
w: number,
|
|
102
|
+
h: number,
|
|
103
|
+
name: string,
|
|
104
|
+
pen?: System.Drawing.Pen
|
|
105
|
+
): BetterGenshinImpact.View.Drawable.RectDrawable;
|
|
106
|
+
|
|
107
|
+
/** 将 [直线] 转换成 [遮罩窗口绘制直线] */
|
|
108
|
+
toLineDrawable(
|
|
109
|
+
x1: number,
|
|
110
|
+
y1: number,
|
|
111
|
+
x2: number,
|
|
112
|
+
y2: number,
|
|
113
|
+
name: string,
|
|
114
|
+
pen?: System.Drawing.Pen
|
|
115
|
+
): BetterGenshinImpact.View.Drawable.LineDrawable;
|
|
116
|
+
|
|
117
|
+
/** 绘制直线 */
|
|
118
|
+
drawLine(
|
|
119
|
+
x1: number,
|
|
120
|
+
y1: number,
|
|
121
|
+
x2: number,
|
|
122
|
+
y2: number,
|
|
123
|
+
name: string,
|
|
124
|
+
pen?: System.Drawing.Pen
|
|
125
|
+
): BetterGenshinImpact.View.Drawable.LineDrawable;
|
|
126
|
+
|
|
127
|
+
/** 将当前区域的截图转换成矩形类型的区域 */
|
|
128
|
+
convertSelfPositionToGameCaptureRegion(): Rect;
|
|
129
|
+
|
|
130
|
+
/** 将指定区域的截图转换成矩形类型的区域 */
|
|
131
|
+
convertPositionToGameCaptureRegion(x: number, y: number, w: number, h: number): Rect;
|
|
132
|
+
|
|
133
|
+
/** 将指定区域的截图转换成位置元组 */
|
|
134
|
+
convertPositionToGameCaptureRegion(x: number, y: number): [number, number];
|
|
135
|
+
|
|
136
|
+
/** 将指定桌面区域的截图转换成位置元组 */
|
|
137
|
+
convertPositionToDesktopRegion(x: number, y: number): [number, number];
|
|
138
|
+
|
|
139
|
+
/** 生成一个新的矩形类型的区域 */
|
|
140
|
+
toRect(): Rect;
|
|
141
|
+
|
|
142
|
+
/** 生成一个新的图片类型的区域 */
|
|
143
|
+
toImageRegion(): BetterGenshinImpact.GameTask.Model.Area.ImageRegion;
|
|
144
|
+
|
|
145
|
+
/** 区域面积是否为空 */
|
|
146
|
+
isEmpty(): boolean;
|
|
147
|
+
|
|
148
|
+
/** 区域面积是否为空 */
|
|
149
|
+
isExist(): boolean;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* 派生一个点类型的区域
|
|
153
|
+
* @param x 水平位置(像素)
|
|
154
|
+
* @param y 垂直位置(像素)
|
|
155
|
+
*/
|
|
156
|
+
derive(x: number, y: number): BetterGenshinImpact.GameTask.Model.Area.Region;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* 派生一个点类型的区域
|
|
160
|
+
* @param x 水平位置(像素)
|
|
161
|
+
* @param y 垂直位置(像素)
|
|
162
|
+
* @param w 宽度
|
|
163
|
+
* @param h 高度
|
|
164
|
+
*/
|
|
165
|
+
derive(
|
|
166
|
+
x: number,
|
|
167
|
+
y: number,
|
|
168
|
+
w: number,
|
|
169
|
+
h: number
|
|
170
|
+
): BetterGenshinImpact.GameTask.Model.Area.Region;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* 派生一个矩形类型的区域
|
|
174
|
+
* @param rect 矩形
|
|
175
|
+
*/
|
|
176
|
+
derive(rect: Rect): BetterGenshinImpact.GameTask.Model.Area.Region;
|
|
177
|
+
|
|
178
|
+
constructor();
|
|
179
|
+
|
|
180
|
+
constructor(
|
|
181
|
+
x: number,
|
|
182
|
+
y: number,
|
|
183
|
+
width: number,
|
|
184
|
+
height: number,
|
|
185
|
+
owner?: BetterGenshinImpact.GameTask.Model.Area.Region,
|
|
186
|
+
converter?: BetterGenshinImpact.GameTask.Model.Area.Converter.INodeConverter
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
export import Region = BetterGenshinImpact.GameTask.Model.Area.Region;
|
|
139
191
|
}
|
|
192
|
+
|
|
193
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "../../../Microsoft/Extensions/Localization/IStringLocalizer";
|
|
2
|
+
import "../../../System/Globalization/CultureInfo";
|
|
3
|
+
|
|
4
|
+
declare global {
|
|
5
|
+
namespace BetterGenshinImpact.GameTask.Model {
|
|
6
|
+
abstract class BaseTaskParam<T> {
|
|
7
|
+
gameCultureInfo: System.Globalization.CultureInfo;
|
|
8
|
+
|
|
9
|
+
stringLocalizer: Microsoft.Extensions.Localization.IStringLocalizer<T>;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export {};
|