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
4e40fc96
Commit
4e40fc96
authored
Oct 02, 2020
by
spc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modified: output.js
parent
c3eaf564
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
94 additions
and
53 deletions
+94
-53
output.js
project/src/canvas/game/output.js
+44
-24
output.js.map
project/src/canvas/game/output.js.map
+1
-1
output.js
project/src/canvas/game/released/output.js
+44
-24
Root.ts
project/src/canvas/game/src/chuansongdai/Root.ts
+1
-1
Robot.ts
project/src/canvas/game/src/xiaoxiaole/Robot.ts
+2
-2
XxlConfig.ts
project/src/canvas/game/src/xiaoxiaole/XxlConfig.ts
+1
-1
XxlScene.ts
project/src/canvas/game/src/xiaoxiaole/XxlScene.ts
+1
-0
No files found.
project/src/canvas/game/output.js
View file @
4e40fc96
...
...
@@ -1925,7 +1925,7 @@ var Main = (function () {
return
[
4
,
this
.
loadImageTexturesCsd02
(
resCanvasList
)];
case
2
:
_a
.
sent
();
ctrls_1
.
changeScene
(
XxlScene_1
.
XxlScene
);
ctrls_1
.
changeScene
(
MainScene_2
.
OpenAni
);
return
[
2
];
}
});
...
...
@@ -2546,6 +2546,7 @@ var Root = (function (_super) {
this
.
goodsContainer
.
startGoods
();
Main_1
.
GDispatcher
.
removeEventListener
(
'MatchCompelete'
,
this
.
gameStart
,
this
);
this
.
gameStartFlag
=
true
;
this
.
touchArea
.
mouseEnable
=
true
;
};
Root
.
prototype
.
gameOver
=
function
()
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
...
...
@@ -2555,6 +2556,7 @@ var Root = (function (_super) {
case
0
:
this
.
time
=
60
;
this
.
gameStartFlag
=
false
;
this
.
touchArea
.
mouseEnable
=
false
;
if
(
!
this
.
userInfo
.
win
)
this
.
scoreBoard
.
scoreRight
+=
3
;
this
.
goodsContainer
.
removeAllGoods
();
...
...
@@ -2569,7 +2571,7 @@ var Root = (function (_super) {
prizeInfo
=
_a
.
sent
();
prize
=
prizeInfo
.
data
;
console
.
log
(
'user win --- CSD-GAME over data:'
,
prizeInfo
.
data
);
if
(
prize
.
type
>
3
)
{
if
(
prize
.
type
<=
3
)
{
ctrls_1
.
showPanel
(
SuccessPanel_1
.
SuccessPanel
,
prize
);
}
else
{
...
...
@@ -2589,10 +2591,10 @@ var Root = (function (_super) {
this
.
scoreBoard
.
updateScore
(
score
);
};
Root
.
prototype
.
createTouchRect
=
function
()
{
this
.
touchArea
=
Tools_1
.
Tools
.
getRect
(
750
,
5
74
,
0xff22ff
,
0
);
this
.
touchArea
=
Tools_1
.
Tools
.
getRect
(
750
,
8
74
,
0xff22ff
,
0
);
this
.
touchArea
.
x
=
0
;
this
.
touchArea
.
y
=
10
50
;
this
.
touchArea
.
mouseEnable
=
tru
e
;
this
.
touchArea
.
y
=
7
50
;
this
.
touchArea
.
mouseEnable
=
fals
e
;
this
.
addChild
(
this
.
touchArea
);
this
.
touchArea
.
addEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
this
.
onMouseDownArea
,
this
);
this
.
touchArea
.
addEventListener
(
FYGE
.
MouseEvent
.
MOUSE_UP
,
this
.
onMouseUpArea
,
this
);
...
...
@@ -2626,6 +2628,7 @@ var Root = (function (_super) {
this
.
guide
.
visible
=
false
;
setTimeout
(
function
()
{
ctrls_1
.
showPanel
(
MatchingPanel_1
.
MatchingPanel
,
_this
.
userInfo
);
_this
.
guide
.
removeEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
_this
.
guideFunc
,
_this
);
},
200
);
}
else
{
...
...
@@ -2681,6 +2684,9 @@ var Catecher = (function (_super) {
__extends
(
Catecher
,
_super
);
function
Catecher
(
root
,
dataInfo
)
{
var
_this
=
_super
.
call
(
this
)
||
this
;
_this
.
timerNumer
=
60
;
_this
.
lt
=
0
;
_this
.
tt
=
0
;
_this
.
sum
=
function
(
m
,
n
)
{
var
num
=
Math
.
floor
(
Math
.
random
()
*
(
m
-
n
)
+
n
);
return
num
;
...
...
@@ -2732,8 +2738,7 @@ var Catecher = (function (_super) {
.
to
({
x
:
424
,
alpha
:
1
},
100
);
};
Catecher
.
prototype
.
destroy
=
function
()
{
clearInterval
(
this
.
timerFunc
);
this
.
timerFunc
=
null
;
this
.
removeEventListener
(
FYGE
.
Event
.
ENTER_FRAME
,
this
.
timerFunc
,
this
);
};
Catecher
.
prototype
.
updateScore
=
function
(
score
)
{
var
scoreNow
=
score
+
this
.
scoreLeft
;
...
...
@@ -2784,26 +2789,39 @@ var Catecher = (function (_super) {
this
.
userScore_right
.
updateScore
(
this
.
scoreRight
);
};
Catecher
.
prototype
.
stopTime
=
function
()
{
clearInterval
(
this
.
timerFunc
);
this
.
timerFunc
=
null
;
this
.
removeEventListener
(
FYGE
.
Event
.
ENTER_FRAME
,
this
.
timerFunc
,
this
);
};
Catecher
.
prototype
.
start
=
function
(
time
)
{
var
_this
=
this
;
this
.
scoreLeft
=
0
;
this
.
scoreRight
=
0
;
this
.
timerNumer
=
time
;
this
.
updateTime
(
this
.
timerNumer
);
this
.
timerFunc
=
setInterval
(
function
()
{
if
(
_this
.
timerNumer
<=
0
)
{
_this
.
_root
.
gameOver
();
clearInterval
(
_this
.
timerFunc
);
_this
.
timerFunc
=
null
;
_this
.
updateTime
(
0
);
}
else
{
_this
.
updateTime
(
--
_this
.
timerNumer
);
this
.
addEventListener
(
FYGE
.
Event
.
ENTER_FRAME
,
this
.
timerFunc
,
this
);
};
Catecher
.
prototype
.
timerFunc
=
function
()
{
if
(
!
this
.
_root
.
gameStartFlag
)
return
;
if
(
this
.
timerNumer
<=
0
)
{
this
.
_root
.
gameOver
();
this
.
updateTime
(
0
);
this
.
lt
=
this
.
tt
=
0
;
this
.
removeEventListener
(
FYGE
.
Event
.
ENTER_FRAME
,
this
.
timerFunc
,
this
);
return
;
}
if
(
this
.
lt
)
{
var
nt
=
new
Date
().
getTime
();
var
dt
=
nt
-
this
.
lt
;
this
.
tt
+=
dt
/
1000
>>
0
;
var
ntt
=
60
-
this
.
tt
;
if
(
ntt
!=
this
.
timerNumer
)
{
this
.
timerNumer
=
ntt
;
this
.
updateTime
(
this
.
timerNumer
);
this
.
lt
=
nt
;
}
},
1000
);
}
else
{
this
.
lt
=
new
Date
().
getTime
();
}
};
Catecher
.
prototype
.
updateTime
=
function
(
time
)
{
this
.
timeText
.
text
=
time
.
toString
()
+
'S'
;
...
...
@@ -2837,7 +2855,8 @@ var Catecher = (function (_super) {
c
.
width
=
120
;
c
.
height
=
120
;
var
a
=
Tools_1
.
Tools
.
getCircle
(
60
,
0x000000
,
1
,
60
,
60
);
var
p
=
Tools_1
.
Tools
.
getSprite
(
avatar
,
0
,
0
);
var
p
=
FYGE
.
Sprite
.
fromUrl
(
avatar
);
p
.
x
=
p
.
y
=
0
;
p
.
width
=
120
;
p
.
height
=
120
;
c
[
'updateAvatar'
]
=
function
(
avatar
)
{
p
.
texture
=
RES_1
.
RES
.
getRes
(
avatar
);
};
...
...
@@ -15103,10 +15122,10 @@ var Robot = (function () {
else
{
if
(
gameLeftTime
>
XxlConfig_1
.
config
.
time
/
2
)
{
if
(
this
.
_score
>
userScore
)
{
this
.
_score
+=
(
Math
.
floor
(
Math
.
random
()
*
6
)
+
2
)
*
10
;
this
.
_score
+=
(
Math
.
floor
(
Math
.
random
()
*
6
)
+
3
)
*
10
;
}
else
{
this
.
_score
=
userScore
+
(
Math
.
floor
(
Math
.
random
()
*
3
)
+
2
)
*
10
;
this
.
_score
=
userScore
+
(
Math
.
floor
(
Math
.
random
()
*
6
)
+
8
)
*
10
;
}
}
else
{
...
...
@@ -15226,7 +15245,7 @@ exports.Star = Star;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
exports
.
config
=
void
0
;
exports
.
config
=
{
time
:
12
,
time
:
12
0
,
first
:
1000
,
second
:
2000
,
third
:
3000
,
...
...
@@ -16101,6 +16120,7 @@ var XxlScene = (function (_super) {
return
;
}
if
(
this
.
isGameEnd
)
{
this
.
updateFakeScore
(
this
.
robot
.
getScore
(
this
.
userScore
,
this
.
timeNum
));
this
.
gameOver
();
return
;
}
...
...
project/src/canvas/game/output.js.map
View file @
4e40fc96
This diff is collapsed.
Click to expand it.
project/src/canvas/game/released/output.js
View file @
4e40fc96
...
...
@@ -1927,7 +1927,7 @@ var Main = (function () {
return
[
4
,
this
.
loadImageTexturesCsd02
(
resCanvasList
)];
case
2
:
_a
.
sent
();
ctrls_1
.
changeScene
(
XxlScene_1
.
XxlScene
);
ctrls_1
.
changeScene
(
MainScene_2
.
OpenAni
);
return
[
2
];
}
});
...
...
@@ -2548,6 +2548,7 @@ var Root = (function (_super) {
this
.
goodsContainer
.
startGoods
();
Main_1
.
GDispatcher
.
removeEventListener
(
'MatchCompelete'
,
this
.
gameStart
,
this
);
this
.
gameStartFlag
=
true
;
this
.
touchArea
.
mouseEnable
=
true
;
};
Root
.
prototype
.
gameOver
=
function
()
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
...
...
@@ -2557,6 +2558,7 @@ var Root = (function (_super) {
case
0
:
this
.
time
=
60
;
this
.
gameStartFlag
=
false
;
this
.
touchArea
.
mouseEnable
=
false
;
if
(
!
this
.
userInfo
.
win
)
this
.
scoreBoard
.
scoreRight
+=
3
;
this
.
goodsContainer
.
removeAllGoods
();
...
...
@@ -2571,7 +2573,7 @@ var Root = (function (_super) {
prizeInfo
=
_a
.
sent
();
prize
=
prizeInfo
.
data
;
console
.
log
(
'user win --- CSD-GAME over data:'
,
prizeInfo
.
data
);
if
(
prize
.
type
>
3
)
{
if
(
prize
.
type
<=
3
)
{
ctrls_1
.
showPanel
(
SuccessPanel_1
.
SuccessPanel
,
prize
);
}
else
{
...
...
@@ -2591,10 +2593,10 @@ var Root = (function (_super) {
this
.
scoreBoard
.
updateScore
(
score
);
};
Root
.
prototype
.
createTouchRect
=
function
()
{
this
.
touchArea
=
Tools_1
.
Tools
.
getRect
(
750
,
5
74
,
0xff22ff
,
0
);
this
.
touchArea
=
Tools_1
.
Tools
.
getRect
(
750
,
8
74
,
0xff22ff
,
0
);
this
.
touchArea
.
x
=
0
;
this
.
touchArea
.
y
=
10
50
;
this
.
touchArea
.
mouseEnable
=
tru
e
;
this
.
touchArea
.
y
=
7
50
;
this
.
touchArea
.
mouseEnable
=
fals
e
;
this
.
addChild
(
this
.
touchArea
);
this
.
touchArea
.
addEventListener
(
FYGE
.
MouseEvent
.
MOUSE_DOWN
,
this
.
onMouseDownArea
,
this
);
this
.
touchArea
.
addEventListener
(
FYGE
.
MouseEvent
.
MOUSE_UP
,
this
.
onMouseUpArea
,
this
);
...
...
@@ -2628,6 +2630,7 @@ var Root = (function (_super) {
this
.
guide
.
visible
=
false
;
setTimeout
(
function
()
{
ctrls_1
.
showPanel
(
MatchingPanel_1
.
MatchingPanel
,
_this
.
userInfo
);
_this
.
guide
.
removeEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
_this
.
guideFunc
,
_this
);
},
200
);
}
else
{
...
...
@@ -2683,6 +2686,9 @@ var Catecher = (function (_super) {
__extends
(
Catecher
,
_super
);
function
Catecher
(
root
,
dataInfo
)
{
var
_this
=
_super
.
call
(
this
)
||
this
;
_this
.
timerNumer
=
60
;
_this
.
lt
=
0
;
_this
.
tt
=
0
;
_this
.
sum
=
function
(
m
,
n
)
{
var
num
=
Math
.
floor
(
Math
.
random
()
*
(
m
-
n
)
+
n
);
return
num
;
...
...
@@ -2734,8 +2740,7 @@ var Catecher = (function (_super) {
.
to
({
x
:
424
,
alpha
:
1
},
100
);
};
Catecher
.
prototype
.
destroy
=
function
()
{
clearInterval
(
this
.
timerFunc
);
this
.
timerFunc
=
null
;
this
.
removeEventListener
(
FYGE
.
Event
.
ENTER_FRAME
,
this
.
timerFunc
,
this
);
};
Catecher
.
prototype
.
updateScore
=
function
(
score
)
{
var
scoreNow
=
score
+
this
.
scoreLeft
;
...
...
@@ -2786,26 +2791,39 @@ var Catecher = (function (_super) {
this
.
userScore_right
.
updateScore
(
this
.
scoreRight
);
};
Catecher
.
prototype
.
stopTime
=
function
()
{
clearInterval
(
this
.
timerFunc
);
this
.
timerFunc
=
null
;
this
.
removeEventListener
(
FYGE
.
Event
.
ENTER_FRAME
,
this
.
timerFunc
,
this
);
};
Catecher
.
prototype
.
start
=
function
(
time
)
{
var
_this
=
this
;
this
.
scoreLeft
=
0
;
this
.
scoreRight
=
0
;
this
.
timerNumer
=
time
;
this
.
updateTime
(
this
.
timerNumer
);
this
.
timerFunc
=
setInterval
(
function
()
{
if
(
_this
.
timerNumer
<=
0
)
{
_this
.
_root
.
gameOver
();
clearInterval
(
_this
.
timerFunc
);
_this
.
timerFunc
=
null
;
_this
.
updateTime
(
0
);
}
else
{
_this
.
updateTime
(
--
_this
.
timerNumer
);
this
.
addEventListener
(
FYGE
.
Event
.
ENTER_FRAME
,
this
.
timerFunc
,
this
);
};
Catecher
.
prototype
.
timerFunc
=
function
()
{
if
(
!
this
.
_root
.
gameStartFlag
)
return
;
if
(
this
.
timerNumer
<=
0
)
{
this
.
_root
.
gameOver
();
this
.
updateTime
(
0
);
this
.
lt
=
this
.
tt
=
0
;
this
.
removeEventListener
(
FYGE
.
Event
.
ENTER_FRAME
,
this
.
timerFunc
,
this
);
return
;
}
if
(
this
.
lt
)
{
var
nt
=
new
Date
().
getTime
();
var
dt
=
nt
-
this
.
lt
;
this
.
tt
+=
dt
/
1000
>>
0
;
var
ntt
=
60
-
this
.
tt
;
if
(
ntt
!=
this
.
timerNumer
)
{
this
.
timerNumer
=
ntt
;
this
.
updateTime
(
this
.
timerNumer
);
this
.
lt
=
nt
;
}
},
1000
);
}
else
{
this
.
lt
=
new
Date
().
getTime
();
}
};
Catecher
.
prototype
.
updateTime
=
function
(
time
)
{
this
.
timeText
.
text
=
time
.
toString
()
+
'S'
;
...
...
@@ -2839,7 +2857,8 @@ var Catecher = (function (_super) {
c
.
width
=
120
;
c
.
height
=
120
;
var
a
=
Tools_1
.
Tools
.
getCircle
(
60
,
0x000000
,
1
,
60
,
60
);
var
p
=
Tools_1
.
Tools
.
getSprite
(
avatar
,
0
,
0
);
var
p
=
FYGE
.
Sprite
.
fromUrl
(
avatar
);
p
.
x
=
p
.
y
=
0
;
p
.
width
=
120
;
p
.
height
=
120
;
c
[
'updateAvatar'
]
=
function
(
avatar
)
{
p
.
texture
=
RES_1
.
RES
.
getRes
(
avatar
);
};
...
...
@@ -15105,10 +15124,10 @@ var Robot = (function () {
else
{
if
(
gameLeftTime
>
XxlConfig_1
.
config
.
time
/
2
)
{
if
(
this
.
_score
>
userScore
)
{
this
.
_score
+=
(
Math
.
floor
(
Math
.
random
()
*
6
)
+
2
)
*
10
;
this
.
_score
+=
(
Math
.
floor
(
Math
.
random
()
*
6
)
+
3
)
*
10
;
}
else
{
this
.
_score
=
userScore
+
(
Math
.
floor
(
Math
.
random
()
*
3
)
+
2
)
*
10
;
this
.
_score
=
userScore
+
(
Math
.
floor
(
Math
.
random
()
*
6
)
+
8
)
*
10
;
}
}
else
{
...
...
@@ -15228,7 +15247,7 @@ exports.Star = Star;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
exports
.
config
=
void
0
;
exports
.
config
=
{
time
:
12
,
time
:
12
0
,
first
:
1000
,
second
:
2000
,
third
:
3000
,
...
...
@@ -16103,6 +16122,7 @@ var XxlScene = (function (_super) {
return
;
}
if
(
this
.
isGameEnd
)
{
this
.
updateFakeScore
(
this
.
robot
.
getScore
(
this
.
userScore
,
this
.
timeNum
));
this
.
gameOver
();
return
;
}
...
...
project/src/canvas/game/src/chuansongdai/Root.ts
View file @
4e40fc96
...
...
@@ -142,7 +142,7 @@ export default class Root extends FYGE.Container {
const
prizeInfo
=
await
sendTbNet
(
TbNetName
.
getPrizeInfo
)
const
prize
=
prizeInfo
.
data
console
.
log
(
'user win --- CSD-GAME over data:'
,
prizeInfo
.
data
)
if
(
prize
.
type
>
3
)
{
if
(
prize
.
type
<=
3
)
{
showPanel
(
SuccessPanel
,
prize
)
}
else
{
showPanel
(
SuccessNoAwardPanel
,
prize
)
...
...
project/src/canvas/game/src/xiaoxiaole/Robot.ts
View file @
4e40fc96
...
...
@@ -19,9 +19,9 @@ export class Robot {
}
else
{
if
(
gameLeftTime
>
config
.
time
/
2
)
{
if
(
this
.
_score
>
userScore
)
{
this
.
_score
+=
(
Math
.
floor
(
Math
.
random
()
*
6
)
+
2
)
*
10
this
.
_score
+=
(
Math
.
floor
(
Math
.
random
()
*
6
)
+
3
)
*
10
}
else
{
this
.
_score
=
userScore
+
(
Math
.
floor
(
Math
.
random
()
*
3
)
+
2
)
*
10
this
.
_score
=
userScore
+
(
Math
.
floor
(
Math
.
random
()
*
6
)
+
8
)
*
10
}
}
else
{
if
(
this
.
_score
>
userScore
)
{
...
...
project/src/canvas/game/src/xiaoxiaole/XxlConfig.ts
View file @
4e40fc96
export
const
config
=
{
//倒计时时间s
time
:
12
,
time
:
12
0
,
//3关分数
first
:
1000
,
second
:
2000
,
...
...
project/src/canvas/game/src/xiaoxiaole/XxlScene.ts
View file @
4e40fc96
...
...
@@ -1103,6 +1103,7 @@ export class XxlScene extends Scene {
return
}
if
(
this
.
isGameEnd
)
{
this
.
updateFakeScore
(
this
.
robot
.
getScore
(
this
.
userScore
,
this
.
timeNum
))
this
.
gameOver
()
// console.log("游戏结束")
return
...
...
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