29 lines
1.8 KiB
JavaScript
29 lines
1.8 KiB
JavaScript
"use strict";
|
|
cc._RF.push(module, 'f7f5dfmKidObZiMLtuBdAiq', 'test');
|
|
// Script/test.ts
|
|
|
|
if (this.level == 1) {
|
|
var data = { x: -200, y: -380, time: 0, timeCount: 0 };
|
|
var timeCount = this.timeCount + (0.8 - this.calculateDistance(this.ball.x, this.ball.y, -200, -380));
|
|
var time = this.calculateDistance(this.ball.x, this.ball.y, -200, -380) + timeCount;
|
|
data = { x: -200, y: -380, time: time, timeCount: timeCount };
|
|
this.now_Array.push(data);
|
|
timeCount = this.timeCount + (0.8 - this.calculateDistance(this.ball.x, this.ball.y, -250, -300));
|
|
time = this.calculateDistance(this.now_Array[this.now_Array.length - 1].x, this.now_Array[this.now_Array.length - 1].y, -250, -300) + timeCount;
|
|
data = { x: -250, y: -300, time: time, timeCount: timeCount };
|
|
this.now_Array.push(data);
|
|
timeCount = this.timeCount + (0.8 - this.calculateDistance(this.ball.x, this.ball.y, -300, 500));
|
|
time = this.calculateDistance(this.now_Array[this.now_Array.length - 1].x, this.now_Array[this.now_Array.length - 1].y, -300, 500) + timeCount;
|
|
data = { x: -300, y: 500, time: time, timeCount: timeCount };
|
|
this.now_Array.push(data);
|
|
timeCount = this.timeCount + (0.8 - this.calculateDistance(this.ball.x, this.ball.y, 208, 280));
|
|
time = this.calculateDistance(this.now_Array[this.now_Array.length - 1].x, this.now_Array[this.now_Array.length - 1].y, 208, 280) + timeCount;
|
|
data = { x: 208, y: 280, time: time, timeCount: timeCount };
|
|
this.now_Array.push(data);
|
|
timeCount = this.timeCount + (0.8 - this.calculateDistance(this.ball.x, this.ball.y, 208, -280));
|
|
time = this.calculateDistance(this.now_Array[this.now_Array.length - 1].x, this.now_Array[this.now_Array.length - 1].y, 208, -280) + timeCount;
|
|
data = { x: 208, y: -280, time: time, timeCount: timeCount };
|
|
this.now_Array.push(data);
|
|
}
|
|
|
|
cc._RF.pop(); |