www3215258313
发表于 2023-4-11 17:36:15
xzsdzgfxgchjknlnjhg
zhishifenzi
发表于 2023-4-10 18:12:49
感 谢
3372715539
发表于 2023-4-10 15:04:13
对应的VC++源代码:
nmdbld
发表于 2023-4-7 13:37:31
易语言平滑自喵代码及对应的VC++平
1483337600
发表于 2023-4-7 12:37:21
感觉分享?
3144863414
发表于 2023-4-7 12:25:07
: 易语言平滑自喵代码及对应的V
Crawlab
发表于 2023-4-7 12:01:10
VC++代码实现如下(假设游戏中心坐标为(0,0)):
float TargetX = 0, TargetY = 0;
float Frevise = 0.3;
float gameCenterX = 0, gameCenterY = 0, gameWidth = 0, gameHeight = 0;
float autoAimSpeed = 1.0; // 自m速率
if (Output.X != 0) {
if (Output.X > gameCenterX) {
TargetX = -(gameCenterX - Output.X);
TargetX = TargetX / autoAimSpeed;
if (TargetX + gameCenterX + 1 > gameWidth) {
TargetX = 0;
}
if (TargetX < 1 && TargetX > Frevise) {
TargetX = 1;
}
}
else if (Output.X < gameCenterX) {
TargetX = Output.X - gameCenterX;
TargetX = TargetX / autoAimSpeed;
if (TargetX + gameCenterX - 1 < 0) {
TargetX = 0;
}
if (TargetX > -1 && TargetX < Frevise) {
TargetX = -1;
}
}
}
if (Output.Y != 0) {
if (Output.Y > gameCenterY) {
TargetY = -(gameCenterY - Output.Y);
TargetY = TargetY / autoAimSpeed;
if (TargetY + gameCenterY + 1 > gameHeight) {
TargetY = 0;
}
if (TargetY < 1 && TargetY > Frevise) {
TargetY = 1;
}
}
else if (Output.Y < gameCenterY) {
TargetY = Output.Y - gameCenterY;
TargetY = TargetY / autoAimSpeed;
if (TargetY + gameCenterY - 1 < 0) {
TargetY = 0;
}
if (TargetY > -1 && TargetY < Frevise) {
TargetY = -1;
}
}
}
// 调用移动鼠标函数
MouseMove(1, TargetX, TargetY, 3, 3);
Crawlab
发表于 2023-4-7 12:00:17
对应的VC++源代码: