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
d45075c8
Commit
d45075c8
authored
Oct 12, 2020
by
spc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modified: src/chuansongdai/Root.ts
parent
9d86b3b6
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
48 deletions
+44
-48
output.js
project/src/canvas/game/output.js
+6
-8
output.js.map
project/src/canvas/game/output.js.map
+1
-1
output.js
project/src/canvas/game/released/output.js
+6
-8
copyJs.js
project/src/canvas/game/scripts/copyJs.js
+2
-2
Root.ts
project/src/canvas/game/src/chuansongdai/Root.ts
+29
-29
No files found.
project/src/canvas/game/output.js
View file @
d45075c8
...
...
@@ -2558,9 +2558,6 @@ var Root = (function (_super) {
switch
(
_a
.
label
)
{
case
0
:
Main_1
.
GDispatcher
.
removeEventListener
(
'gameReset'
,
this
.
gameAgain
,
this
);
this
.
removeChild
(
this
.
scoreBoard
);
this
.
scoreBoard
=
null
;
this
.
goodsContainer
.
stopGoods
();
return
[
4
,
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
getUserInfo
,
{})];
case
1
:
userInfoRes
=
_a
.
sent
();
...
...
@@ -2570,11 +2567,12 @@ var Root = (function (_super) {
Main_1
.
GDispatcher
.
addEventListener
(
"outCallBackToPage"
,
this
.
backOutCall
,
this
);
return
[
2
];
}
else
{
this
.
removeChild
(
this
.
scoreBoard
);
this
.
scoreBoard
=
null
;
this
.
goodsContainer
.
stopGoods
();
Main_1
.
GDispatcher
.
addEventListener
(
'MatchCompelete'
,
this
.
gameStart
,
this
);
this
.
goodsContainer
.
createGoodsContainer
();
ctrls_1
.
showPanel
(
MatchingPanel_1
.
MatchingPanel
,
this
.
userInfo
);
}
return
[
2
];
}
});
...
...
project/src/canvas/game/output.js.map
View file @
d45075c8
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 @
d45075c8
...
...
@@ -2560,9 +2560,6 @@ var Root = (function (_super) {
switch
(
_a
.
label
)
{
case
0
:
Main_1
.
GDispatcher
.
removeEventListener
(
'gameReset'
,
this
.
gameAgain
,
this
);
this
.
removeChild
(
this
.
scoreBoard
);
this
.
scoreBoard
=
null
;
this
.
goodsContainer
.
stopGoods
();
return
[
4
,
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
getUserInfo
,
{})];
case
1
:
userInfoRes
=
_a
.
sent
();
...
...
@@ -2572,11 +2569,12 @@ var Root = (function (_super) {
Main_1
.
GDispatcher
.
addEventListener
(
"outCallBackToPage"
,
this
.
backOutCall
,
this
);
return
[
2
];
}
else
{
this
.
removeChild
(
this
.
scoreBoard
);
this
.
scoreBoard
=
null
;
this
.
goodsContainer
.
stopGoods
();
Main_1
.
GDispatcher
.
addEventListener
(
'MatchCompelete'
,
this
.
gameStart
,
this
);
this
.
goodsContainer
.
createGoodsContainer
();
ctrls_1
.
showPanel
(
MatchingPanel_1
.
MatchingPanel
,
this
.
userInfo
);
}
return
[
2
];
}
});
...
...
project/src/canvas/game/scripts/copyJs.js
View file @
d45075c8
...
...
@@ -6,8 +6,8 @@ var fs = require("fs");
// fs.readFileSync("./output.js")
// )
// var endPath = 'D:/duibaGame/测试项目0527/taobaominiTest/client/pages/index1/';
//
var endPath = "C:/Users/Duiba/Desktop/work/雅顿/new/new_taobao/taobao_mini/client/pages/pagecanvas/"
var
endPath
=
'/Applications/DUIBA-TAOBAO/YD/new_taobao/taobao_mini/client/pages/pagecanvas/'
var
endPath
=
"C:/Users/Duiba/Desktop/work/雅顿/new/new_taobao/taobao_mini/client/pages/pagecanvas/"
//
var endPath = '/Applications/DUIBA-TAOBAO/YD/new_taobao/taobao_mini/client/pages/pagecanvas/'
var
version
=
Math
.
round
(
new
Date
().
getTime
()
/
1000
);
...
...
project/src/canvas/game/src/chuansongdai/Root.ts
View file @
d45075c8
...
...
@@ -60,7 +60,7 @@ export default class Root extends FYGE.Container {
this
.
once
(
FYGE
.
Event
.
ADDED_TO_STAGE
,
this
.
onAddToStage
,
this
)
}
async
initUi
()
{
async
initUi
()
{
this
.
backGround
=
new
FYGE
.
Sprite
()
this
.
backGround
.
x
=
0
this
.
backGround
.
y
=
0
...
...
@@ -110,7 +110,7 @@ export default class Root extends FYGE.Container {
}
// 开始游戏
gameStart
()
{
gameStart
()
{
this
.
scoreBoard
=
new
ScoreBoard
(
this
,
this
.
userInfo
)
this
.
addChild
(
this
.
scoreBoard
)
this
.
scoreBoard
.
start
(
this
.
time
)
...
...
@@ -122,33 +122,33 @@ export default class Root extends FYGE.Container {
}
// 再来一局
async
gameAgain
()
{
async
gameAgain
()
{
// 取消监听再来一局
GDispatcher
.
removeEventListener
(
'gameReset'
,
this
.
gameAgain
,
this
)
this
.
removeChild
(
this
.
scoreBoard
)
this
.
scoreBoard
=
null
this
.
goodsContainer
.
stopGoods
()
const
userInfoRes
=
await
sendTbNet
(
TbNetName
.
getUserInfo
,
{})
this
.
userInfo
=
userInfoRes
.
data
console
.
log
(
'CSD-GAME this.userInfo:'
,
userInfoRes
.
data
)
// 若返回信息中 显示没有游戏次数
if
(
this
.
userInfo
.
noGameTime
&&
this
.
userInfo
.
noGameTime
==
1
)
{
GDispatcher
.
addEventListener
(
"outCallBackToPage"
,
this
.
backOutCall
,
this
)
return
// 否则 执行正常开始逻辑
}
else
{
}
this
.
removeChild
(
this
.
scoreBoard
)
this
.
scoreBoard
=
null
this
.
goodsContainer
.
stopGoods
()
// 若返回信息中 显示没有游戏次数
GDispatcher
.
addEventListener
(
'MatchCompelete'
,
this
.
gameStart
,
this
)
this
.
goodsContainer
.
createGoodsContainer
()
showPanel
(
MatchingPanel
,
this
.
userInfo
)
}
}
// 结束游戏
async
gameOver
(
type
=
''
)
{
async
gameOver
(
type
=
''
)
{
this
.
time
=
60
this
.
gameStartFlag
=
false
...
...
@@ -190,19 +190,19 @@ export default class Root extends FYGE.Container {
// GDispatcher.dispatchEvent('gameOver-csd', {score: score})
}
backOutCall
()
{
backOutCall
()
{
GDispatcher
.
removeEventListener
(
'gameReset'
,
this
.
gameAgain
,
this
)
GDispatcher
.
removeEventListener
(
'outCallBackToPage'
,
this
.
backOutCall
,
this
)
sendTbNet
(
TbNetName
.
backToPage
,
{},
(
s
,
res
)
=>
{
console
.
log
(
'back_To_Page'
)
})
}
// 分数变动
gameScoreChange
(
score
)
{
gameScoreChange
(
score
)
{
this
.
scoreBoard
.
updateScore
(
score
)
}
// 创建 触摸层
createTouchRect
()
{
createTouchRect
()
{
this
.
touchArea
=
Tools
.
getRect
(
750
,
874
,
0xff22ff
,
0
)
this
.
touchArea
.
x
=
0
this
.
touchArea
.
y
=
750
...
...
@@ -214,15 +214,15 @@ export default class Root extends FYGE.Container {
}
// 退出游戏 返回主页
backToPage
()
{
backToPage
()
{
sendTbNet
(
TbNetName
.
backToPage
,
{},
(
s
,
res
)
=>
{
console
.
log
(
'back_To_Page'
)
})
}
onMouseDownArea
(
e
)
{
onMouseDownArea
(
e
)
{
if
(
this
.
gameStartFlag
)
{
this
.
touchXStart
=
e
.
localX
}
}
onMouseUpArea
(
e
)
{
onMouseUpArea
(
e
)
{
let
direction
=
''
if
(
this
.
gameStartFlag
)
{
this
.
touchXEnd
=
e
.
localX
...
...
@@ -235,7 +235,7 @@ export default class Root extends FYGE.Container {
}
}
guideFunc
()
{
guideFunc
()
{
let
i
=
++
this
.
guideIndex
if
(
i
>
this
.
guideRes
.
length
-
1
)
{
this
.
guide
.
visible
=
false
...
...
@@ -248,7 +248,7 @@ export default class Root extends FYGE.Container {
}
}
onAddToStage
()
{
onAddToStage
()
{
this
.
stageHeight
=
this
.
stage
.
viewRect
.
height
this
.
x
=
0
this
.
y
=
this
.
stage
.
viewRect
.
height
/
2
-
1624
/
2
...
...
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