Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
new_taobao
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
new_taobao
Commits
12bca547
Commit
12bca547
authored
Oct 02, 2020
by
spc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modified: src/xiaoxiaole/Robot.ts
parent
63d3e214
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
Robot.ts
project/src/canvas/game/src/xiaoxiaole/Robot.ts
+1
-1
XxlScene.ts
project/src/canvas/game/src/xiaoxiaole/XxlScene.ts
+3
-0
No files found.
project/src/canvas/game/src/xiaoxiaole/Robot.ts
View file @
12bca547
...
@@ -9,7 +9,7 @@ export class Robot {
...
@@ -9,7 +9,7 @@ export class Robot {
this
.
_needWin
=
needWin
this
.
_needWin
=
needWin
}
}
getScore
(
userScore
:
number
,
gameLeftTime
:
number
):
number
{
getScore
(
userScore
:
number
,
gameLeftTime
:
number
,
dt
:
number
=
0
):
number
{
if
(
this
.
_time
<
0
)
{
if
(
this
.
_time
<
0
)
{
this
.
_time
=
120
+
Math
.
random
()
*
60
this
.
_time
=
120
+
Math
.
random
()
*
60
if
(
this
.
_needWin
)
{
if
(
this
.
_needWin
)
{
...
...
project/src/canvas/game/src/xiaoxiaole/XxlScene.ts
View file @
12bca547
...
@@ -1128,6 +1128,9 @@ export class XxlScene extends Scene {
...
@@ -1128,6 +1128,9 @@ export class XxlScene extends Scene {
if
(
this
.
lt
)
{
if
(
this
.
lt
)
{
let
nt
=
new
Date
().
getTime
()
let
nt
=
new
Date
().
getTime
()
let
dt
=
nt
-
this
.
lt
let
dt
=
nt
-
this
.
lt
if
(
dt
<
0
)
{
dt
=
0
}
this
.
tt
+=
dt
/
1000
>>
0
this
.
tt
+=
dt
/
1000
>>
0
let
ntt
=
config
.
time
-
this
.
tt
let
ntt
=
config
.
time
-
this
.
tt
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment