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
45bb3d75
Commit
45bb3d75
authored
Oct 13, 2020
by
AU-Pro-mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed game bugs
parent
03e1853f
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
26 deletions
+27
-26
output.js
project/src/canvas/game/output.js
+9
-9
output.js.map
project/src/canvas/game/output.js.map
+1
-1
output.js
project/src/canvas/game/released/output.js
+9
-9
goodsContainer.ts
...t/src/canvas/game/src/chuansongdai/game/goodsContainer.ts
+8
-7
No files found.
project/src/canvas/game/output.js
View file @
45bb3d75
...
...
@@ -2969,7 +2969,7 @@ var GoodsContainer = (function (_super) {
_this
.
goodsArr
=
[];
_this
.
createGoodTimeOut
=
false
;
_this
.
intoGoods
=
[];
_this
.
gameEndFlag
=
false
;
_this
.
gameEndFlag
=
0
;
_this
.
speed
=
2.5
;
_this
.
acceleratedSpeed
=
0.01
;
_this
.
lt
=
0
;
...
...
@@ -3058,8 +3058,14 @@ var GoodsContainer = (function (_super) {
g
.
turnDirection
(
direction
);
if
(
g
.
dir
!==
direction
)
{
if
(
g
.
wrong
===
'endGame'
)
{
this
.
gameEndFlag
+=
1
;
if
(
this
.
gameEndFlag
>
1
)
{
g
.
turnDirection
(
direction
);
}
else
{
g
.
turnDirection
(
direction
,
'gameOver'
);
}
}
else
{
this
.
_root
.
gameScoreChange
(
g
.
wrong
);
this
.
floatScore
(
direction
,
g
.
wrong
);
...
...
@@ -3110,7 +3116,7 @@ var GoodsContainer = (function (_super) {
this
.
goodsContainer
=
null
;
};
GoodsContainer
.
prototype
.
startGoods
=
function
()
{
this
.
gameEndFlag
=
false
;
this
.
gameEndFlag
=
0
;
this
.
createGoodTimeOut
=
true
;
};
GoodsContainer
.
prototype
.
createGoods
=
function
()
{
...
...
@@ -3156,9 +3162,6 @@ var GoodsContainer = (function (_super) {
},
750
)
.
call
(
function
()
{
if
(
cb
===
'gameOver'
)
{
if
(
_this
.
gameEndFlag
)
return
;
_this
.
gameEndFlag
=
true
;
_this
.
removeAllGoods
();
_this
.
_root
.
gameOver
();
}
...
...
@@ -3180,9 +3183,6 @@ var GoodsContainer = (function (_super) {
},
750
)
.
call
(
function
()
{
if
(
cb
===
'gameOver'
)
{
if
(
_this
.
gameEndFlag
)
return
;
_this
.
gameEndFlag
=
true
;
_this
.
removeAllGoods
();
_this
.
_root
.
gameOver
();
}
...
...
project/src/canvas/game/output.js.map
View file @
45bb3d75
This diff is collapsed.
Click to expand it.
project/src/canvas/game/released/output.js
View file @
45bb3d75
...
...
@@ -2971,7 +2971,7 @@ var GoodsContainer = (function (_super) {
_this
.
goodsArr
=
[];
_this
.
createGoodTimeOut
=
false
;
_this
.
intoGoods
=
[];
_this
.
gameEndFlag
=
false
;
_this
.
gameEndFlag
=
0
;
_this
.
speed
=
2.5
;
_this
.
acceleratedSpeed
=
0.01
;
_this
.
lt
=
0
;
...
...
@@ -3060,8 +3060,14 @@ var GoodsContainer = (function (_super) {
g
.
turnDirection
(
direction
);
if
(
g
.
dir
!==
direction
)
{
if
(
g
.
wrong
===
'endGame'
)
{
this
.
gameEndFlag
+=
1
;
if
(
this
.
gameEndFlag
>
1
)
{
g
.
turnDirection
(
direction
);
}
else
{
g
.
turnDirection
(
direction
,
'gameOver'
);
}
}
else
{
this
.
_root
.
gameScoreChange
(
g
.
wrong
);
this
.
floatScore
(
direction
,
g
.
wrong
);
...
...
@@ -3112,7 +3118,7 @@ var GoodsContainer = (function (_super) {
this
.
goodsContainer
=
null
;
};
GoodsContainer
.
prototype
.
startGoods
=
function
()
{
this
.
gameEndFlag
=
false
;
this
.
gameEndFlag
=
0
;
this
.
createGoodTimeOut
=
true
;
};
GoodsContainer
.
prototype
.
createGoods
=
function
()
{
...
...
@@ -3158,9 +3164,6 @@ var GoodsContainer = (function (_super) {
},
750
)
.
call
(
function
()
{
if
(
cb
===
'gameOver'
)
{
if
(
_this
.
gameEndFlag
)
return
;
_this
.
gameEndFlag
=
true
;
_this
.
removeAllGoods
();
_this
.
_root
.
gameOver
();
}
...
...
@@ -3182,9 +3185,6 @@ var GoodsContainer = (function (_super) {
},
750
)
.
call
(
function
()
{
if
(
cb
===
'gameOver'
)
{
if
(
_this
.
gameEndFlag
)
return
;
_this
.
gameEndFlag
=
true
;
_this
.
removeAllGoods
();
_this
.
_root
.
gameOver
();
}
...
...
project/src/canvas/game/src/chuansongdai/game/goodsContainer.ts
View file @
45bb3d75
...
...
@@ -32,7 +32,7 @@ export default class GoodsContainer extends FYGE.Container {
// 进入可被滑动的 掉落物
intoGoods
=
[];
// 游戏结束 flag
gameEndFlag
=
false
;
gameEndFlag
=
0
;
private
speed
=
2.5
// 初速度
private
acceleratedSpeed
=
0.01
// 加速度
...
...
@@ -136,7 +136,12 @@ export default class GoodsContainer extends FYGE.Container {
g
.
turnDirection
(
direction
)
if
(
g
.
dir
!==
direction
)
{
if
(
g
.
wrong
===
'endGame'
)
{
this
.
gameEndFlag
+=
1
if
(
this
.
gameEndFlag
>
1
)
{
g
.
turnDirection
(
direction
)
}
else
{
g
.
turnDirection
(
direction
,
'gameOver'
)
}
}
else
{
this
.
_root
.
gameScoreChange
(
g
.
wrong
)
this
.
floatScore
(
direction
,
g
.
wrong
)
...
...
@@ -197,7 +202,7 @@ export default class GoodsContainer extends FYGE.Container {
// 掉落物开始掉落
startGoods
()
{
this
.
gameEndFlag
=
false
this
.
gameEndFlag
=
0
this
.
createGoodTimeOut
=
true
}
...
...
@@ -245,8 +250,6 @@ export default class GoodsContainer extends FYGE.Container {
},
750
)
.
call
(()
=>
{
if
(
cb
===
'gameOver'
)
{
if
(
this
.
gameEndFlag
)
return
this
.
gameEndFlag
=
true
this
.
removeAllGoods
()
this
.
_root
.
gameOver
()
}
...
...
@@ -269,8 +272,6 @@ export default class GoodsContainer extends FYGE.Container {
},
750
)
.
call
(()
=>
{
if
(
cb
===
'gameOver'
)
{
if
(
this
.
gameEndFlag
)
return
this
.
gameEndFlag
=
true
this
.
removeAllGoods
()
this
.
_root
.
gameOver
()
}
...
...
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