Commit 1df1f196 authored by unknown's avatar unknown

修改舒尔特评级标准

parent 1253cbee
...@@ -321,7 +321,7 @@ ...@@ -321,7 +321,7 @@
"_priority": 1073741824, "_priority": 1073741824,
"_fov": 45, "_fov": 45,
"_fovAxis": 0, "_fovAxis": 0,
"_orthoHeight": 375.00000000000006, "_orthoHeight": 414.4124472573839,
"_near": 1, "_near": 1,
"_far": 2000, "_far": 2000,
"_color": { "_color": {
...@@ -3980,9 +3980,9 @@ ...@@ -3980,9 +3980,9 @@
], ],
"totalTime": 180, "totalTime": 180,
"evaluateTime": [ "evaluateTime": [
45, 0.55,
75, 0.7,
120 0.85
], ],
"_id": "28Udl8Uu9NL7BjJXSAoEFz" "_id": "28Udl8Uu9NL7BjJXSAoEFz"
}, },
......
...@@ -321,7 +321,7 @@ ...@@ -321,7 +321,7 @@
"_priority": 1073741824, "_priority": 1073741824,
"_fov": 45, "_fov": 45,
"_fovAxis": 0, "_fovAxis": 0,
"_orthoHeight": 375.00000000000006, "_orthoHeight": 414.4124472573839,
"_near": 1, "_near": 1,
"_far": 2000, "_far": 2000,
"_color": { "_color": {
...@@ -3795,9 +3795,9 @@ ...@@ -3795,9 +3795,9 @@
], ],
"totalTime": 300, "totalTime": 300,
"evaluateTime": [ "evaluateTime": [
70, 0.55,
120, 0.7,
180 0.85
], ],
"_id": "fcoaDISp9CL4lUYZRGJzB/" "_id": "fcoaDISp9CL4lUYZRGJzB/"
}, },
......
...@@ -321,7 +321,7 @@ ...@@ -321,7 +321,7 @@
"_priority": 1073741824, "_priority": 1073741824,
"_fov": 45, "_fov": 45,
"_fovAxis": 0, "_fovAxis": 0,
"_orthoHeight": 375.00000000000006, "_orthoHeight": 414.4124472573839,
"_near": 1, "_near": 1,
"_far": 2000, "_far": 2000,
"_color": { "_color": {
...@@ -4329,9 +4329,9 @@ ...@@ -4329,9 +4329,9 @@
], ],
"totalTime": 300, "totalTime": 300,
"evaluateTime": [ "evaluateTime": [
70, 0.55,
120, 0.7,
180 0.85
], ],
"_id": "fcoaDISp9CL4lUYZRGJzB/" "_id": "fcoaDISp9CL4lUYZRGJzB/"
}, },
......
...@@ -324,7 +324,7 @@ ...@@ -324,7 +324,7 @@
"_priority": 1073741824, "_priority": 1073741824,
"_fov": 45, "_fov": 45,
"_fovAxis": 0, "_fovAxis": 0,
"_orthoHeight": 375.00000000000006, "_orthoHeight": 414.4124472573839,
"_near": 1, "_near": 1,
"_far": 2000, "_far": 2000,
"_color": { "_color": {
...@@ -1833,9 +1833,9 @@ ...@@ -1833,9 +1833,9 @@
], ],
"totalTime": 30, "totalTime": 30,
"evaluateTime": [ "evaluateTime": [
4.8, 0.55,
7.4, 0.7,
8.8 0.85
], ],
"_id": "ecVGsUHVNCv788b9oTm5D8" "_id": "ecVGsUHVNCv788b9oTm5D8"
}, },
......
...@@ -321,7 +321,7 @@ ...@@ -321,7 +321,7 @@
"_priority": 1073741824, "_priority": 1073741824,
"_fov": 45, "_fov": 45,
"_fovAxis": 0, "_fovAxis": 0,
"_orthoHeight": 375.00000000000006, "_orthoHeight": 414.4124472573839,
"_near": 1, "_near": 1,
"_far": 2000, "_far": 2000,
"_color": { "_color": {
...@@ -3238,9 +3238,9 @@ ...@@ -3238,9 +3238,9 @@
], ],
"totalTime": 90, "totalTime": 90,
"evaluateTime": [ "evaluateTime": [
19.2, 0.55,
29.6, 0.7,
35.2 0.85
], ],
"_id": "4cC8zRY35Ph5ysq+Rk+xI/" "_id": "4cC8zRY35Ph5ysq+Rk+xI/"
}, },
......
...@@ -321,7 +321,7 @@ ...@@ -321,7 +321,7 @@
"_priority": 1073741824, "_priority": 1073741824,
"_fov": 45, "_fov": 45,
"_fovAxis": 0, "_fovAxis": 0,
"_orthoHeight": 375.00000000000006, "_orthoHeight": 414.4124472573839,
"_near": 1, "_near": 1,
"_far": 2000, "_far": 2000,
"_color": { "_color": {
...@@ -3982,9 +3982,9 @@ ...@@ -3982,9 +3982,9 @@
], ],
"totalTime": 90, "totalTime": 90,
"evaluateTime": [ "evaluateTime": [
30, 0.55,
46, 0.7,
55 0.85
], ],
"_id": "28Udl8Uu9NL7BjJXSAoEFz" "_id": "28Udl8Uu9NL7BjJXSAoEFz"
}, },
......
...@@ -111,7 +111,7 @@ export class SchulteCtr extends Component { ...@@ -111,7 +111,7 @@ export class SchulteCtr extends Component {
} }
let outGameTime = Utils.getValueFromHref("gameTime"); let outGameTime = Utils.getValueFromHref("gameTime");
if (outGameTime !== null) { if (outGameTime !== null) {
this.totalTime = <number><any>outGameTime; this.totalTime = Number(outGameTime);
} }
this.bestTime = this.totalTime; this.bestTime = this.totalTime;
for (let i = 0; i < this.blockPosNodes.length; ++i) { for (let i = 0; i < this.blockPosNodes.length; ++i) {
...@@ -276,11 +276,13 @@ export class SchulteCtr extends Component { ...@@ -276,11 +276,13 @@ export class SchulteCtr extends Component {
getEvaluation(time: number) { getEvaluation(time: number) {
let idx = -1; let idx = -1;
for (let i = 0; i < this.evaluateTime.length; ++i) { for (let i = 0; i < this.evaluateTime.length; ++i) {
if (time / 1000 < this.evaluateTime[i]) { if (time / (this.totalTime * 1000) < this.evaluateTime[i]) {
idx = i; idx = i;
break; break;
} }
} }
console.log(`评级`);
console.log(time, this.totalTime, this.evaluateTime);
switch (idx) { switch (idx) {
case 0: case 0:
return "S"; return "S";
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Cocos Creator | 专注力训练马上开始</title> <title>专注力训练马上开始</title>
<!--http://www.html5rocks.com/en/mobile/mobifying/--> <!--http://www.html5rocks.com/en/mobile/mobifying/-->
<meta name="viewport" <meta name="viewport"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment