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
9d86b3b6
Commit
9d86b3b6
authored
Oct 12, 2020
by
AU-Pro-mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a
parent
3db49fcc
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
12 deletions
+26
-12
output.js
project/src/canvas/game/output.js
+6
-3
output.js.map
project/src/canvas/game/output.js.map
+1
-1
output.js
project/src/canvas/game/released/output.js
+6
-3
Root.ts
project/src/canvas/game/src/chuansongdai/Root.ts
+7
-2
output.js
taobao_mini/client/pages/pagecanvas/output.js
+6
-3
No files found.
project/src/canvas/game/output.js
View file @
9d86b3b6
...
@@ -2554,7 +2554,6 @@ var Root = (function (_super) {
...
@@ -2554,7 +2554,6 @@ var Root = (function (_super) {
Root
.
prototype
.
gameAgain
=
function
()
{
Root
.
prototype
.
gameAgain
=
function
()
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
var
userInfoRes
;
var
userInfoRes
;
var
_this
=
this
;
return
__generator
(
this
,
function
(
_a
)
{
return
__generator
(
this
,
function
(
_a
)
{
switch
(
_a
.
label
)
{
switch
(
_a
.
label
)
{
case
0
:
case
0
:
...
@@ -2568,7 +2567,7 @@ var Root = (function (_super) {
...
@@ -2568,7 +2567,7 @@ var Root = (function (_super) {
this
.
userInfo
=
userInfoRes
.
data
;
this
.
userInfo
=
userInfoRes
.
data
;
console
.
log
(
'CSD-GAME this.userInfo:'
,
userInfoRes
.
data
);
console
.
log
(
'CSD-GAME this.userInfo:'
,
userInfoRes
.
data
);
if
(
this
.
userInfo
.
noGameTime
&&
this
.
userInfo
.
noGameTime
==
1
)
{
if
(
this
.
userInfo
.
noGameTime
&&
this
.
userInfo
.
noGameTime
==
1
)
{
Main_1
.
GDispatcher
.
addEventListener
(
"outCallBackToPage"
,
function
()
{
_this
.
gameOver
(
'back'
);
}
,
this
);
Main_1
.
GDispatcher
.
addEventListener
(
"outCallBackToPage"
,
this
.
backOutCall
,
this
);
return
[
2
];
return
[
2
];
}
}
else
{
else
{
...
@@ -2624,6 +2623,11 @@ var Root = (function (_super) {
...
@@ -2624,6 +2623,11 @@ var Root = (function (_super) {
});
});
});
});
};
};
Root
.
prototype
.
backOutCall
=
function
()
{
Main_1
.
GDispatcher
.
removeEventListener
(
'gameReset'
,
this
.
gameAgain
,
this
);
Main_1
.
GDispatcher
.
removeEventListener
(
'outCallBackToPage'
,
this
.
backOutCall
,
this
);
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
backToPage
,
{},
function
(
s
,
res
)
{
console
.
log
(
'back_To_Page'
);
});
};
Root
.
prototype
.
gameScoreChange
=
function
(
score
)
{
Root
.
prototype
.
gameScoreChange
=
function
(
score
)
{
this
.
scoreBoard
.
updateScore
(
score
);
this
.
scoreBoard
.
updateScore
(
score
);
};
};
...
@@ -2685,7 +2689,6 @@ var Root = (function (_super) {
...
@@ -2685,7 +2689,6 @@ var Root = (function (_super) {
this
.
touchArea
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
this
.
onMouseDownArea
,
this
);
this
.
touchArea
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
this
.
onMouseDownArea
,
this
);
this
.
touchArea
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_UP
,
this
.
onMouseUpArea
,
this
);
this
.
touchArea
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_UP
,
this
.
onMouseUpArea
,
this
);
this
.
backBtn
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
function
()
{
_this
.
gameOver
(
'back'
);
},
this
);
this
.
backBtn
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
function
()
{
_this
.
gameOver
(
'back'
);
},
this
);
Main_1
.
GDispatcher
.
removeEventListener
(
"outCallBackToPage"
,
function
()
{
_this
.
gameOver
(
'back'
);
});
};
};
return
Root
;
return
Root
;
}(
FYGE
.
Container
));
}(
FYGE
.
Container
));
...
...
project/src/canvas/game/output.js.map
View file @
9d86b3b6
This diff is collapsed.
Click to expand it.
project/src/canvas/game/released/output.js
View file @
9d86b3b6
...
@@ -2556,7 +2556,6 @@ var Root = (function (_super) {
...
@@ -2556,7 +2556,6 @@ var Root = (function (_super) {
Root
.
prototype
.
gameAgain
=
function
()
{
Root
.
prototype
.
gameAgain
=
function
()
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
var
userInfoRes
;
var
userInfoRes
;
var
_this
=
this
;
return
__generator
(
this
,
function
(
_a
)
{
return
__generator
(
this
,
function
(
_a
)
{
switch
(
_a
.
label
)
{
switch
(
_a
.
label
)
{
case
0
:
case
0
:
...
@@ -2570,7 +2569,7 @@ var Root = (function (_super) {
...
@@ -2570,7 +2569,7 @@ var Root = (function (_super) {
this
.
userInfo
=
userInfoRes
.
data
;
this
.
userInfo
=
userInfoRes
.
data
;
console
.
log
(
'CSD-GAME this.userInfo:'
,
userInfoRes
.
data
);
console
.
log
(
'CSD-GAME this.userInfo:'
,
userInfoRes
.
data
);
if
(
this
.
userInfo
.
noGameTime
&&
this
.
userInfo
.
noGameTime
==
1
)
{
if
(
this
.
userInfo
.
noGameTime
&&
this
.
userInfo
.
noGameTime
==
1
)
{
Main_1
.
GDispatcher
.
addEventListener
(
"outCallBackToPage"
,
function
()
{
_this
.
gameOver
(
'back'
);
}
,
this
);
Main_1
.
GDispatcher
.
addEventListener
(
"outCallBackToPage"
,
this
.
backOutCall
,
this
);
return
[
2
];
return
[
2
];
}
}
else
{
else
{
...
@@ -2626,6 +2625,11 @@ var Root = (function (_super) {
...
@@ -2626,6 +2625,11 @@ var Root = (function (_super) {
});
});
});
});
};
};
Root
.
prototype
.
backOutCall
=
function
()
{
Main_1
.
GDispatcher
.
removeEventListener
(
'gameReset'
,
this
.
gameAgain
,
this
);
Main_1
.
GDispatcher
.
removeEventListener
(
'outCallBackToPage'
,
this
.
backOutCall
,
this
);
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
backToPage
,
{},
function
(
s
,
res
)
{
console
.
log
(
'back_To_Page'
);
});
};
Root
.
prototype
.
gameScoreChange
=
function
(
score
)
{
Root
.
prototype
.
gameScoreChange
=
function
(
score
)
{
this
.
scoreBoard
.
updateScore
(
score
);
this
.
scoreBoard
.
updateScore
(
score
);
};
};
...
@@ -2687,7 +2691,6 @@ var Root = (function (_super) {
...
@@ -2687,7 +2691,6 @@ var Root = (function (_super) {
this
.
touchArea
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
this
.
onMouseDownArea
,
this
);
this
.
touchArea
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
this
.
onMouseDownArea
,
this
);
this
.
touchArea
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_UP
,
this
.
onMouseUpArea
,
this
);
this
.
touchArea
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_UP
,
this
.
onMouseUpArea
,
this
);
this
.
backBtn
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
function
()
{
_this
.
gameOver
(
'back'
);
},
this
);
this
.
backBtn
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
function
()
{
_this
.
gameOver
(
'back'
);
},
this
);
Main_1
.
GDispatcher
.
removeEventListener
(
"outCallBackToPage"
,
function
()
{
_this
.
gameOver
(
'back'
);
});
};
};
return
Root
;
return
Root
;
}(
FYGE
.
Container
));
}(
FYGE
.
Container
));
...
...
project/src/canvas/game/src/chuansongdai/Root.ts
View file @
9d86b3b6
...
@@ -136,7 +136,7 @@ export default class Root extends FYGE.Container {
...
@@ -136,7 +136,7 @@ export default class Root extends FYGE.Container {
// 若返回信息中 显示没有游戏次数
// 若返回信息中 显示没有游戏次数
if
(
this
.
userInfo
.
noGameTime
&&
this
.
userInfo
.
noGameTime
==
1
)
{
if
(
this
.
userInfo
.
noGameTime
&&
this
.
userInfo
.
noGameTime
==
1
)
{
GDispatcher
.
addEventListener
(
"outCallBackToPage"
,
()
=>
{
this
.
gameOver
(
'back'
)
}
,
this
)
GDispatcher
.
addEventListener
(
"outCallBackToPage"
,
this
.
backOutCall
,
this
)
return
return
// 否则 执行正常开始逻辑
// 否则 执行正常开始逻辑
}
else
{
}
else
{
...
@@ -189,6 +189,12 @@ export default class Root extends FYGE.Container {
...
@@ -189,6 +189,12 @@ export default class Root extends FYGE.Container {
}
}
// GDispatcher.dispatchEvent('gameOver-csd', {score: score})
// GDispatcher.dispatchEvent('gameOver-csd', {score: score})
}
}
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
)
{
...
@@ -256,7 +262,6 @@ export default class Root extends FYGE.Container {
...
@@ -256,7 +262,6 @@ export default class Root extends FYGE.Container {
this
.
touchArea
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
this
.
onMouseDownArea
,
this
)
this
.
touchArea
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
this
.
onMouseDownArea
,
this
)
this
.
touchArea
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_UP
,
this
.
onMouseUpArea
,
this
)
this
.
touchArea
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_UP
,
this
.
onMouseUpArea
,
this
)
this
.
backBtn
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
()
=>
{
this
.
gameOver
(
'back'
)
},
this
)
this
.
backBtn
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
()
=>
{
this
.
gameOver
(
'back'
)
},
this
)
GDispatcher
.
removeEventListener
(
"outCallBackToPage"
,
()
=>
{
this
.
gameOver
(
'back'
)
})
// 取消监听再来一局
// 取消监听再来一局
// throw new Error("Method not implemented.")
// throw new Error("Method not implemented.")
}
}
...
...
taobao_mini/client/pages/pagecanvas/output.js
View file @
9d86b3b6
...
@@ -2556,7 +2556,6 @@ var Root = (function (_super) {
...
@@ -2556,7 +2556,6 @@ var Root = (function (_super) {
Root
.
prototype
.
gameAgain
=
function
()
{
Root
.
prototype
.
gameAgain
=
function
()
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
var
userInfoRes
;
var
userInfoRes
;
var
_this
=
this
;
return
__generator
(
this
,
function
(
_a
)
{
return
__generator
(
this
,
function
(
_a
)
{
switch
(
_a
.
label
)
{
switch
(
_a
.
label
)
{
case
0
:
case
0
:
...
@@ -2570,7 +2569,7 @@ var Root = (function (_super) {
...
@@ -2570,7 +2569,7 @@ var Root = (function (_super) {
this
.
userInfo
=
userInfoRes
.
data
;
this
.
userInfo
=
userInfoRes
.
data
;
console
.
log
(
'CSD-GAME this.userInfo:'
,
userInfoRes
.
data
);
console
.
log
(
'CSD-GAME this.userInfo:'
,
userInfoRes
.
data
);
if
(
this
.
userInfo
.
noGameTime
&&
this
.
userInfo
.
noGameTime
==
1
)
{
if
(
this
.
userInfo
.
noGameTime
&&
this
.
userInfo
.
noGameTime
==
1
)
{
Main_1
.
GDispatcher
.
addEventListener
(
"outCallBackToPage"
,
function
()
{
_this
.
gameOver
(
'back'
);
}
,
this
);
Main_1
.
GDispatcher
.
addEventListener
(
"outCallBackToPage"
,
this
.
backOutCall
,
this
);
return
[
2
];
return
[
2
];
}
}
else
{
else
{
...
@@ -2626,6 +2625,11 @@ var Root = (function (_super) {
...
@@ -2626,6 +2625,11 @@ var Root = (function (_super) {
});
});
});
});
};
};
Root
.
prototype
.
backOutCall
=
function
()
{
Main_1
.
GDispatcher
.
removeEventListener
(
'gameReset'
,
this
.
gameAgain
,
this
);
Main_1
.
GDispatcher
.
removeEventListener
(
'outCallBackToPage'
,
this
.
backOutCall
,
this
);
TaoBaoNet_1
.
sendTbNet
(
TaoBaoNet_1
.
TbNetName
.
backToPage
,
{},
function
(
s
,
res
)
{
console
.
log
(
'back_To_Page'
);
});
};
Root
.
prototype
.
gameScoreChange
=
function
(
score
)
{
Root
.
prototype
.
gameScoreChange
=
function
(
score
)
{
this
.
scoreBoard
.
updateScore
(
score
);
this
.
scoreBoard
.
updateScore
(
score
);
};
};
...
@@ -2687,7 +2691,6 @@ var Root = (function (_super) {
...
@@ -2687,7 +2691,6 @@ var Root = (function (_super) {
this
.
touchArea
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
this
.
onMouseDownArea
,
this
);
this
.
touchArea
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
this
.
onMouseDownArea
,
this
);
this
.
touchArea
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_UP
,
this
.
onMouseUpArea
,
this
);
this
.
touchArea
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_UP
,
this
.
onMouseUpArea
,
this
);
this
.
backBtn
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
function
()
{
_this
.
gameOver
(
'back'
);
},
this
);
this
.
backBtn
.
removeEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
function
()
{
_this
.
gameOver
(
'back'
);
},
this
);
Main_1
.
GDispatcher
.
removeEventListener
(
"outCallBackToPage"
,
function
()
{
_this
.
gameOver
(
'back'
);
});
};
};
return
Root
;
return
Root
;
}(
FYGE
.
Container
));
}(
FYGE
.
Container
));
...
...
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