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
Hide 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) {
...
@@ -2969,7 +2969,7 @@ var GoodsContainer = (function (_super) {
_this
.
goodsArr
=
[];
_this
.
goodsArr
=
[];
_this
.
createGoodTimeOut
=
false
;
_this
.
createGoodTimeOut
=
false
;
_this
.
intoGoods
=
[];
_this
.
intoGoods
=
[];
_this
.
gameEndFlag
=
false
;
_this
.
gameEndFlag
=
0
;
_this
.
speed
=
2.5
;
_this
.
speed
=
2.5
;
_this
.
acceleratedSpeed
=
0.01
;
_this
.
acceleratedSpeed
=
0.01
;
_this
.
lt
=
0
;
_this
.
lt
=
0
;
...
@@ -3058,7 +3058,13 @@ var GoodsContainer = (function (_super) {
...
@@ -3058,7 +3058,13 @@ var GoodsContainer = (function (_super) {
g
.
turnDirection
(
direction
);
g
.
turnDirection
(
direction
);
if
(
g
.
dir
!==
direction
)
{
if
(
g
.
dir
!==
direction
)
{
if
(
g
.
wrong
===
'endGame'
)
{
if
(
g
.
wrong
===
'endGame'
)
{
g
.
turnDirection
(
direction
,
'gameOver'
);
this
.
gameEndFlag
+=
1
;
if
(
this
.
gameEndFlag
>
1
)
{
g
.
turnDirection
(
direction
);
}
else
{
g
.
turnDirection
(
direction
,
'gameOver'
);
}
}
}
else
{
else
{
this
.
_root
.
gameScoreChange
(
g
.
wrong
);
this
.
_root
.
gameScoreChange
(
g
.
wrong
);
...
@@ -3110,7 +3116,7 @@ var GoodsContainer = (function (_super) {
...
@@ -3110,7 +3116,7 @@ var GoodsContainer = (function (_super) {
this
.
goodsContainer
=
null
;
this
.
goodsContainer
=
null
;
};
};
GoodsContainer
.
prototype
.
startGoods
=
function
()
{
GoodsContainer
.
prototype
.
startGoods
=
function
()
{
this
.
gameEndFlag
=
false
;
this
.
gameEndFlag
=
0
;
this
.
createGoodTimeOut
=
true
;
this
.
createGoodTimeOut
=
true
;
};
};
GoodsContainer
.
prototype
.
createGoods
=
function
()
{
GoodsContainer
.
prototype
.
createGoods
=
function
()
{
...
@@ -3156,9 +3162,6 @@ var GoodsContainer = (function (_super) {
...
@@ -3156,9 +3162,6 @@ var GoodsContainer = (function (_super) {
},
750
)
},
750
)
.
call
(
function
()
{
.
call
(
function
()
{
if
(
cb
===
'gameOver'
)
{
if
(
cb
===
'gameOver'
)
{
if
(
_this
.
gameEndFlag
)
return
;
_this
.
gameEndFlag
=
true
;
_this
.
removeAllGoods
();
_this
.
removeAllGoods
();
_this
.
_root
.
gameOver
();
_this
.
_root
.
gameOver
();
}
}
...
@@ -3180,9 +3183,6 @@ var GoodsContainer = (function (_super) {
...
@@ -3180,9 +3183,6 @@ var GoodsContainer = (function (_super) {
},
750
)
},
750
)
.
call
(
function
()
{
.
call
(
function
()
{
if
(
cb
===
'gameOver'
)
{
if
(
cb
===
'gameOver'
)
{
if
(
_this
.
gameEndFlag
)
return
;
_this
.
gameEndFlag
=
true
;
_this
.
removeAllGoods
();
_this
.
removeAllGoods
();
_this
.
_root
.
gameOver
();
_this
.
_root
.
gameOver
();
}
}
...
...
project/src/canvas/game/output.js.map
View file @
45bb3d75
This source diff could not be displayed because it is too large. You can
view the blob
instead.
project/src/canvas/game/released/output.js
View file @
45bb3d75
...
@@ -2971,7 +2971,7 @@ var GoodsContainer = (function (_super) {
...
@@ -2971,7 +2971,7 @@ var GoodsContainer = (function (_super) {
_this
.
goodsArr
=
[];
_this
.
goodsArr
=
[];
_this
.
createGoodTimeOut
=
false
;
_this
.
createGoodTimeOut
=
false
;
_this
.
intoGoods
=
[];
_this
.
intoGoods
=
[];
_this
.
gameEndFlag
=
false
;
_this
.
gameEndFlag
=
0
;
_this
.
speed
=
2.5
;
_this
.
speed
=
2.5
;
_this
.
acceleratedSpeed
=
0.01
;
_this
.
acceleratedSpeed
=
0.01
;
_this
.
lt
=
0
;
_this
.
lt
=
0
;
...
@@ -3060,7 +3060,13 @@ var GoodsContainer = (function (_super) {
...
@@ -3060,7 +3060,13 @@ var GoodsContainer = (function (_super) {
g
.
turnDirection
(
direction
);
g
.
turnDirection
(
direction
);
if
(
g
.
dir
!==
direction
)
{
if
(
g
.
dir
!==
direction
)
{
if
(
g
.
wrong
===
'endGame'
)
{
if
(
g
.
wrong
===
'endGame'
)
{
g
.
turnDirection
(
direction
,
'gameOver'
);
this
.
gameEndFlag
+=
1
;
if
(
this
.
gameEndFlag
>
1
)
{
g
.
turnDirection
(
direction
);
}
else
{
g
.
turnDirection
(
direction
,
'gameOver'
);
}
}
}
else
{
else
{
this
.
_root
.
gameScoreChange
(
g
.
wrong
);
this
.
_root
.
gameScoreChange
(
g
.
wrong
);
...
@@ -3112,7 +3118,7 @@ var GoodsContainer = (function (_super) {
...
@@ -3112,7 +3118,7 @@ var GoodsContainer = (function (_super) {
this
.
goodsContainer
=
null
;
this
.
goodsContainer
=
null
;
};
};
GoodsContainer
.
prototype
.
startGoods
=
function
()
{
GoodsContainer
.
prototype
.
startGoods
=
function
()
{
this
.
gameEndFlag
=
false
;
this
.
gameEndFlag
=
0
;
this
.
createGoodTimeOut
=
true
;
this
.
createGoodTimeOut
=
true
;
};
};
GoodsContainer
.
prototype
.
createGoods
=
function
()
{
GoodsContainer
.
prototype
.
createGoods
=
function
()
{
...
@@ -3158,9 +3164,6 @@ var GoodsContainer = (function (_super) {
...
@@ -3158,9 +3164,6 @@ var GoodsContainer = (function (_super) {
},
750
)
},
750
)
.
call
(
function
()
{
.
call
(
function
()
{
if
(
cb
===
'gameOver'
)
{
if
(
cb
===
'gameOver'
)
{
if
(
_this
.
gameEndFlag
)
return
;
_this
.
gameEndFlag
=
true
;
_this
.
removeAllGoods
();
_this
.
removeAllGoods
();
_this
.
_root
.
gameOver
();
_this
.
_root
.
gameOver
();
}
}
...
@@ -3182,9 +3185,6 @@ var GoodsContainer = (function (_super) {
...
@@ -3182,9 +3185,6 @@ var GoodsContainer = (function (_super) {
},
750
)
},
750
)
.
call
(
function
()
{
.
call
(
function
()
{
if
(
cb
===
'gameOver'
)
{
if
(
cb
===
'gameOver'
)
{
if
(
_this
.
gameEndFlag
)
return
;
_this
.
gameEndFlag
=
true
;
_this
.
removeAllGoods
();
_this
.
removeAllGoods
();
_this
.
_root
.
gameOver
();
_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 {
...
@@ -32,7 +32,7 @@ export default class GoodsContainer extends FYGE.Container {
// 进入可被滑动的 掉落物
// 进入可被滑动的 掉落物
intoGoods
=
[];
intoGoods
=
[];
// 游戏结束 flag
// 游戏结束 flag
gameEndFlag
=
false
;
gameEndFlag
=
0
;
private
speed
=
2.5
// 初速度
private
speed
=
2.5
// 初速度
private
acceleratedSpeed
=
0.01
// 加速度
private
acceleratedSpeed
=
0.01
// 加速度
...
@@ -136,7 +136,12 @@ export default class GoodsContainer extends FYGE.Container {
...
@@ -136,7 +136,12 @@ export default class GoodsContainer extends FYGE.Container {
g
.
turnDirection
(
direction
)
g
.
turnDirection
(
direction
)
if
(
g
.
dir
!==
direction
)
{
if
(
g
.
dir
!==
direction
)
{
if
(
g
.
wrong
===
'endGame'
)
{
if
(
g
.
wrong
===
'endGame'
)
{
g
.
turnDirection
(
direction
,
'gameOver'
)
this
.
gameEndFlag
+=
1
if
(
this
.
gameEndFlag
>
1
)
{
g
.
turnDirection
(
direction
)
}
else
{
g
.
turnDirection
(
direction
,
'gameOver'
)
}
}
else
{
}
else
{
this
.
_root
.
gameScoreChange
(
g
.
wrong
)
this
.
_root
.
gameScoreChange
(
g
.
wrong
)
this
.
floatScore
(
direction
,
g
.
wrong
)
this
.
floatScore
(
direction
,
g
.
wrong
)
...
@@ -197,7 +202,7 @@ export default class GoodsContainer extends FYGE.Container {
...
@@ -197,7 +202,7 @@ export default class GoodsContainer extends FYGE.Container {
// 掉落物开始掉落
// 掉落物开始掉落
startGoods
()
{
startGoods
()
{
this
.
gameEndFlag
=
false
this
.
gameEndFlag
=
0
this
.
createGoodTimeOut
=
true
this
.
createGoodTimeOut
=
true
}
}
...
@@ -245,8 +250,6 @@ export default class GoodsContainer extends FYGE.Container {
...
@@ -245,8 +250,6 @@ export default class GoodsContainer extends FYGE.Container {
},
750
)
},
750
)
.
call
(()
=>
{
.
call
(()
=>
{
if
(
cb
===
'gameOver'
)
{
if
(
cb
===
'gameOver'
)
{
if
(
this
.
gameEndFlag
)
return
this
.
gameEndFlag
=
true
this
.
removeAllGoods
()
this
.
removeAllGoods
()
this
.
_root
.
gameOver
()
this
.
_root
.
gameOver
()
}
}
...
@@ -269,8 +272,6 @@ export default class GoodsContainer extends FYGE.Container {
...
@@ -269,8 +272,6 @@ export default class GoodsContainer extends FYGE.Container {
},
750
)
},
750
)
.
call
(()
=>
{
.
call
(()
=>
{
if
(
cb
===
'gameOver'
)
{
if
(
cb
===
'gameOver'
)
{
if
(
this
.
gameEndFlag
)
return
this
.
gameEndFlag
=
true
this
.
removeAllGoods
()
this
.
removeAllGoods
()
this
.
_root
.
gameOver
()
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