|
@@ -37,7 +37,7 @@ export class MoveService implements OnModuleInit {
|
|
|
private cacheService: CacheService,
|
|
|
private rotateService: RotateService,
|
|
|
private configService: ConfigService,
|
|
|
- ) {}
|
|
|
+ ) { }
|
|
|
private logger: Logger = new Logger('MoveService');
|
|
|
private Actions = {
|
|
|
Clicking: 1,
|
|
@@ -250,8 +250,8 @@ export class MoveService implements OnModuleInit {
|
|
|
if (checkReplys.length > 0) {
|
|
|
console.log(
|
|
|
'move-1' +
|
|
|
- checkReplys[checkReplys.length - 1].newUserStates[0].playerState
|
|
|
- .camera.angle.yaw,
|
|
|
+ checkReplys[checkReplys.length - 1].newUserStates[0].playerState
|
|
|
+ .camera.angle.yaw,
|
|
|
);
|
|
|
}
|
|
|
//过渡传到缓存里
|
|
@@ -991,7 +991,7 @@ export class MoveService implements OnModuleInit {
|
|
|
getDistance(position1, position2) {
|
|
|
return Math.sqrt(
|
|
|
(position1.x - position2.x) * (position1.x - position2.x) +
|
|
|
- (position1.y - position2.y) * (position1.y - position2.y),
|
|
|
+ (position1.y - position2.y) * (position1.y - position2.y),
|
|
|
);
|
|
|
}
|
|
|
|
|
@@ -1085,7 +1085,7 @@ export class MoveService implements OnModuleInit {
|
|
|
} else if (line.a == 0) {
|
|
|
return { x: point.x };
|
|
|
} else {
|
|
|
- const tl = {};
|
|
|
+ const tl = {} as any as VerticalLineType;
|
|
|
tl.a = -1 / line.a;
|
|
|
const result = this.createLine2(tl, point);
|
|
|
return result;
|
|
@@ -1101,7 +1101,12 @@ export class MoveService implements OnModuleInit {
|
|
|
|
|
|
// 与lineA平行并且point在线上
|
|
|
createLine2(lineA, point) {
|
|
|
- const parameter = {};
|
|
|
+ const parameter = {} as any as {
|
|
|
+ x: number;
|
|
|
+ y: number;
|
|
|
+ a: number;
|
|
|
+ b: number;
|
|
|
+ };
|
|
|
if (typeof lineA.a === 'undefined') {
|
|
|
if (typeof lineA.x !== 'undefined') {
|
|
|
parameter.x = point.x;
|