Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taobaominiDemo
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
taobaominiDemo
Commits
55a4fa00
Commit
55a4fa00
authored
Jun 29, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
03ba3a08
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
34 deletions
+31
-34
.gitignore
client/.gitignore
+1
-0
output.js
client/pages/index/output.js
+30
-34
No files found.
client/.gitignore
0 → 100644
View file @
55a4fa00
node_modules
\ No newline at end of file
client/pages/index/output.js
View file @
55a4fa00
...
@@ -1582,7 +1582,7 @@ var MConst;
...
@@ -1582,7 +1582,7 @@ var MConst;
width
:
750
,
width
:
750
,
height
:
1624
height
:
1624
};
};
MConst
.
GroundLine
=
1110
;
MConst
.
GroundLine
=
1110
+
150
;
MConst
.
BulletFireSpeed
=
{
MConst
.
BulletFireSpeed
=
{
min
:
10
,
min
:
10
,
max
:
20
max
:
20
...
@@ -4211,7 +4211,7 @@ exports.ResJson = {
...
@@ -4211,7 +4211,7 @@ exports.ResJson = {
}
}
}
}
],
],
"path"
:
"https://yun.duiba.com.cn/db_games/activity/kickball-feile/15934
17124
/resource/"
"path"
:
"https://yun.duiba.com.cn/db_games/activity/kickball-feile/15934
23717
/resource/"
};
};
...
@@ -5971,6 +5971,7 @@ var SoundMgr_1 = __webpack_require__(/*! ../Mgr/SoundMgr */ "./src/Mgr/SoundMgr.
...
@@ -5971,6 +5971,7 @@ var SoundMgr_1 = __webpack_require__(/*! ../Mgr/SoundMgr */ "./src/Mgr/SoundMgr.
var
TextureMgr_1
=
__webpack_require__
(
/*! ../Mgr/TextureMgr */
"./src/Mgr/TextureMgr.ts"
);
var
TextureMgr_1
=
__webpack_require__
(
/*! ../Mgr/TextureMgr */
"./src/Mgr/TextureMgr.ts"
);
var
Collider_1
=
__webpack_require__
(
/*! ./Collider */
"./src/game/Collider.ts"
);
var
Collider_1
=
__webpack_require__
(
/*! ./Collider */
"./src/game/Collider.ts"
);
var
MoveObject_1
=
__webpack_require__
(
/*! ./MoveObject */
"./src/game/MoveObject.ts"
);
var
MoveObject_1
=
__webpack_require__
(
/*! ./MoveObject */
"./src/game/MoveObject.ts"
);
var
DxqPlayScene_1
=
__webpack_require__
(
/*! ./DxqPlayScene */
"./src/game/DxqPlayScene.ts"
);
var
tempPower
=
null
;
var
tempPower
=
null
;
var
tempIndexOffset
=
null
;
var
tempIndexOffset
=
null
;
var
imageNames
=
[
var
imageNames
=
[
...
@@ -6010,7 +6011,6 @@ var Ball = (function (_super) {
...
@@ -6010,7 +6011,6 @@ var Ball = (function (_super) {
var
bitmapHeight
=
textureSize
.
height
*
scaleRatio
;
var
bitmapHeight
=
textureSize
.
height
*
scaleRatio
;
_this
.
bitmap
=
new
FYGE
.
Sprite
();
_this
.
bitmap
=
new
FYGE
.
Sprite
();
_this
.
addChild
(
_this
.
bitmap
);
_this
.
addChild
(
_this
.
bitmap
);
console
.
log
(
_this
.
name
);
_this
.
bitmap
.
width
=
bitmapWidth
;
_this
.
bitmap
.
width
=
bitmapWidth
;
_this
.
bitmap
.
height
=
bitmapHeight
;
_this
.
bitmap
.
height
=
bitmapHeight
;
_this
.
anchorX
=
bitmapWidth
/
2
;
_this
.
anchorX
=
bitmapWidth
/
2
;
...
@@ -6022,7 +6022,7 @@ var Ball = (function (_super) {
...
@@ -6022,7 +6022,7 @@ var Ball = (function (_super) {
textures
[
i
]
=
RES_1
.
RES
.
getRes
(
"ball_num_"
+
i
+
".png"
);
textures
[
i
]
=
RES_1
.
RES
.
getRes
(
"ball_num_"
+
i
+
".png"
);
textures
[
'k'
]
=
RES_1
.
RES
.
getRes
(
"ball_num_k.png"
);
textures
[
'k'
]
=
RES_1
.
RES
.
getRes
(
"ball_num_k.png"
);
var
labelScore2
=
new
FYGE
.
BitmapText
(
textures
);
var
labelScore2
=
new
FYGE
.
BitmapText
(
textures
);
labelScore2
.
textAlign
=
FYGE
.
TEXT_ALIGN
.
LEFT
;
labelScore2
.
textAlign
=
FYGE
.
TEXT_ALIGN
.
CENTER
;
labelScore2
.
scaleX
=
labelScore2
.
scaleY
=
scaleRatio
;
labelScore2
.
scaleX
=
labelScore2
.
scaleY
=
scaleRatio
;
_this
.
addChild
(
labelScore2
);
_this
.
addChild
(
labelScore2
);
var
textures2
=
{};
var
textures2
=
{};
...
@@ -6030,7 +6030,7 @@ var Ball = (function (_super) {
...
@@ -6030,7 +6030,7 @@ var Ball = (function (_super) {
textures2
[
i
]
=
RES_1
.
RES
.
getRes
(
"ball_num_black_"
+
i
+
".png"
);
textures2
[
i
]
=
RES_1
.
RES
.
getRes
(
"ball_num_black_"
+
i
+
".png"
);
textures2
[
'k'
]
=
RES_1
.
RES
.
getRes
(
"ball_num_black_k.png"
);
textures2
[
'k'
]
=
RES_1
.
RES
.
getRes
(
"ball_num_black_k.png"
);
var
labelScore3
=
new
FYGE
.
BitmapText
(
textures2
);
var
labelScore3
=
new
FYGE
.
BitmapText
(
textures2
);
labelScore3
.
textAlign
=
FYGE
.
TEXT_ALIGN
.
LEFT
;
labelScore3
.
textAlign
=
FYGE
.
TEXT_ALIGN
.
CENTER
;
labelScore3
.
scaleX
=
labelScore3
.
scaleY
=
scaleRatio
;
labelScore3
.
scaleX
=
labelScore3
.
scaleY
=
scaleRatio
;
_this
.
addChild
(
labelScore3
);
_this
.
addChild
(
labelScore3
);
var
collider
=
_this
.
addComponent
(
Collider_1
.
CircleCollider
);
var
collider
=
_this
.
addComponent
(
Collider_1
.
CircleCollider
);
...
@@ -6086,6 +6086,7 @@ var Ball = (function (_super) {
...
@@ -6086,6 +6086,7 @@ var Ball = (function (_super) {
else
{
else
{
this
.
labelScorewhite
.
visible
=
true
;
this
.
labelScorewhite
.
visible
=
true
;
}
}
console
.
log
(
'ball score'
,
score
,
'colorIndex'
,
colorIndex
);
this
.
initScore
=
score
;
this
.
initScore
=
score
;
this
.
score
=
score
;
this
.
score
=
score
;
this
.
physics
.
rotateVelocity
=
direction
*
MConst_1
.
MConst
.
BallRotateSpeed
*
Math
.
pow
(
1
/
this
.
scaleRatio
,
0.5
);
this
.
physics
.
rotateVelocity
=
direction
*
MConst_1
.
MConst
.
BallRotateSpeed
*
Math
.
pow
(
1
/
this
.
scaleRatio
,
0.5
);
...
@@ -6099,7 +6100,7 @@ var Ball = (function (_super) {
...
@@ -6099,7 +6100,7 @@ var Ball = (function (_super) {
else
if
(
dir
==
-
1
)
{
else
if
(
dir
==
-
1
)
{
this
.
x
=
MConst_1
.
MConst
.
DesignResolution
.
width
+
this
.
width
/
2
+
10
;
this
.
x
=
MConst_1
.
MConst
.
DesignResolution
.
width
+
this
.
width
/
2
+
10
;
}
}
this
.
y
=
MConst_1
.
MConst
.
BallInitPosY
;
this
.
y
=
MConst_1
.
MConst
.
BallInitPosY
+
DxqPlayScene_1
.
default
.
OFFSET_Y
;
this
.
physics
.
velocity
.
x
=
this
.
getRandomVelocityX
(
dir
)
+
1
*
dir
;
this
.
physics
.
velocity
.
x
=
this
.
getRandomVelocityX
(
dir
)
+
1
*
dir
;
this
.
dir
=
dir
;
this
.
dir
=
dir
;
this
.
physics
.
onMoved
=
this
.
onBornStageMoved
.
bind
(
this
);
this
.
physics
.
onMoved
=
this
.
onBornStageMoved
.
bind
(
this
);
...
@@ -6184,23 +6185,19 @@ var Ball = (function (_super) {
...
@@ -6184,23 +6185,19 @@ var Ball = (function (_super) {
};
};
Ball
.
prototype
.
updateScoreLabel
=
function
()
{
Ball
.
prototype
.
updateScoreLabel
=
function
()
{
if
(
this
.
scoreUpdateFlag
==
true
)
{
if
(
this
.
scoreUpdateFlag
==
true
)
{
var
labelScore21white
_1
=
this
.
labelScorewhite
;
var
labelScore21white
=
this
.
labelScorewhite
;
var
labelScoreBlack
_1
=
this
.
labelScoreBlack
;
var
labelScoreBlack
=
this
.
labelScoreBlack
;
var
score
=
this
.
score
;
var
score
=
this
.
score
;
if
(
score
>=
1000
)
{
if
(
score
>=
1000
)
{
labelScore21white
_1
.
text
=
(
Math
.
floor
(
score
/
100
)
/
10
).
toString
()
+
"k"
;
labelScore21white
.
text
=
(
Math
.
floor
(
score
/
100
)
/
10
).
toString
()
+
"k"
;
labelScoreBlack
_1
.
text
=
(
Math
.
floor
(
score
/
100
)
/
10
).
toString
()
+
"k"
;
labelScoreBlack
.
text
=
(
Math
.
floor
(
score
/
100
)
/
10
).
toString
()
+
"k"
;
}
}
else
{
else
{
labelScore21white
_1
.
text
=
score
.
toString
();
labelScore21white
.
text
=
score
.
toString
();
labelScoreBlack
_1
.
text
=
score
.
toString
();
labelScoreBlack
.
text
=
score
.
toString
();
}
}
setTimeout
(
function
()
{
labelScoreBlack
.
y
=
-
labelScore21white
.
height
/
2
;
labelScoreBlack_1
.
x
=
-
labelScore21white_1
.
width
/
2
;
labelScore21white
.
y
=
-
labelScore21white
.
height
/
2
;
labelScoreBlack_1
.
y
=
-
labelScore21white_1
.
height
/
2
;
labelScore21white_1
.
x
=
-
labelScore21white_1
.
width
/
2
;
labelScore21white_1
.
y
=
-
labelScore21white_1
.
height
/
2
;
});
this
.
scoreUpdateFlag
=
false
;
this
.
scoreUpdateFlag
=
false
;
if
(
this
.
score
<=
0
)
{
if
(
this
.
score
<=
0
)
{
this
.
onScoreIsZero
();
this
.
onScoreIsZero
();
...
@@ -6836,10 +6833,10 @@ var Drop = (function (_super) {
...
@@ -6836,10 +6833,10 @@ var Drop = (function (_super) {
if
(
config
.
type
==
"power"
)
if
(
config
.
type
==
"power"
)
str
=
str
+
"%"
;
str
=
str
+
"%"
;
label
.
text
=
str
;
label
.
text
=
str
;
label
.
fillColor
=
hex2string
(
config
.
textColor
);
label
.
fillColor
=
hex2string
(
0xffffff
);
label
.
visible
=
false
;
label
.
visible
=
false
;
label
.
x
=
texture
.
width
+
2
;
label
.
x
=
texture
.
width
/
2
-
label
.
textWidth
/
2
;
label
.
y
=
texture
.
height
/
2
-
label
.
height
/
2
;
label
.
y
=
-
label
.
textHeight
;
_this
.
collider
.
setData
(
texture
.
width
/
2
,
texture
.
height
/
2
);
_this
.
collider
.
setData
(
texture
.
width
/
2
,
texture
.
height
/
2
);
return
_this
;
return
_this
;
}
}
...
@@ -7040,7 +7037,7 @@ var DxqPlayScene = (function (_super) {
...
@@ -7040,7 +7037,7 @@ var DxqPlayScene = (function (_super) {
_this
.
_boomEffectMgr
=
new
SpBoomEffect_1
.
SpBoomEffectMgr
();
_this
.
_boomEffectMgr
=
new
SpBoomEffect_1
.
SpBoomEffectMgr
();
_this
.
_animationMgr
=
new
FrameAnimation_1
.
FrameAnimationMgr
();
_this
.
_animationMgr
=
new
FrameAnimation_1
.
FrameAnimationMgr
();
_this
.
_horizontalMoveMgr
=
new
Bullet_1
.
HorizontalMoveMgr
();
_this
.
_horizontalMoveMgr
=
new
Bullet_1
.
HorizontalMoveMgr
();
var
OFFSET_Y
=
(
1624
-
layers_1
.
layers
.
stageHeight
)
/
2
;
DxqPlayScene
.
OFFSET_Y
=
(
1624
-
layers_1
.
layers
.
stageHeight
)
/
2
;
DataMgr_1
.
DataMgr
.
game
=
_this
;
DataMgr_1
.
DataMgr
.
game
=
_this
;
_this
.
initMgrs
();
_this
.
initMgrs
();
_this
.
pause
=
false
;
_this
.
pause
=
false
;
...
@@ -7055,33 +7052,33 @@ var DxqPlayScene = (function (_super) {
...
@@ -7055,33 +7052,33 @@ var DxqPlayScene = (function (_super) {
var
bg
=
new
FYGE
.
Sprite
(
RES_1
.
RES
.
getRes
(
"main_bg.jpg"
));
var
bg
=
new
FYGE
.
Sprite
(
RES_1
.
RES
.
getRes
(
"main_bg.jpg"
));
_this
.
node
.
addChild
(
bg
);
_this
.
node
.
addChild
(
bg
);
var
cdbg
=
new
FYGE
.
Sprite
(
RES_1
.
RES
.
getRes
(
"main_countdown.png"
));
var
cdbg
=
new
FYGE
.
Sprite
(
RES_1
.
RES
.
getRes
(
"main_countdown.png"
));
cdbg
.
position
.
set
(
612
,
26
+
OFFSET_Y
);
cdbg
.
position
.
set
(
612
,
26
+
DxqPlayScene
.
OFFSET_Y
);
_this
.
node
.
addChild
(
cdbg
);
_this
.
node
.
addChild
(
cdbg
);
var
cdbg2
=
new
FYGE
.
Sprite
(
RES_1
.
RES
.
getRes
(
"main_countdown2.png"
));
var
cdbg2
=
new
FYGE
.
Sprite
(
RES_1
.
RES
.
getRes
(
"main_countdown2.png"
));
cdbg2
.
position
.
set
(
685
,
61
+
OFFSET_Y
);
cdbg2
.
position
.
set
(
685
,
61
+
DxqPlayScene
.
OFFSET_Y
);
cdbg2
.
anchorX
=
6
;
cdbg2
.
anchorX
=
6
;
cdbg2
.
anchorY
=
17
;
cdbg2
.
anchorY
=
17
;
_this
.
node
.
addChild
(
cdbg2
);
_this
.
node
.
addChild
(
cdbg2
);
_this
.
cdline
=
cdbg2
;
_this
.
cdline
=
cdbg2
;
var
bulletIcon
=
new
FYGE
.
Sprite
(
RES_1
.
RES
.
getRes
(
"main_bullet.png"
));
var
bulletIcon
=
new
FYGE
.
Sprite
(
RES_1
.
RES
.
getRes
(
"main_bullet.png"
));
bulletIcon
.
position
.
set
(
30
,
30
+
OFFSET_Y
);
bulletIcon
.
position
.
set
(
30
,
30
+
DxqPlayScene
.
OFFSET_Y
);
_this
.
bulletScoreLabel
=
Tools_1
.
Tool
.
getText
(
"0"
,
30
,
"#ffffff"
,
FYGE
.
TEXT_ALIGN
.
LEFT
,
500
);
_this
.
bulletScoreLabel
=
Tools_1
.
Tool
.
getText
(
"0"
,
30
,
"#ffffff"
,
FYGE
.
TEXT_ALIGN
.
LEFT
,
500
);
_this
.
bulletScoreLabel
.
x
=
100
;
_this
.
bulletScoreLabel
.
x
=
100
;
_this
.
bulletScoreLabel
.
y
=
42
+
OFFSET_Y
;
_this
.
bulletScoreLabel
.
y
=
42
+
DxqPlayScene
.
OFFSET_Y
;
var
powerIcon
=
new
FYGE
.
Sprite
(
RES_1
.
RES
.
getRes
(
"main_power.png"
));
var
powerIcon
=
new
FYGE
.
Sprite
(
RES_1
.
RES
.
getRes
(
"main_power.png"
));
powerIcon
.
position
.
set
(
30
,
30
+
OFFSET_Y
+
72
);
powerIcon
.
position
.
set
(
30
,
30
+
DxqPlayScene
.
OFFSET_Y
+
72
);
_this
.
powerScoreLabel
=
Tools_1
.
Tool
.
getText
(
"0%"
,
30
,
"#ffffff"
,
FYGE
.
TEXT_ALIGN
.
LEFT
,
500
);
_this
.
powerScoreLabel
=
Tools_1
.
Tool
.
getText
(
"0%"
,
30
,
"#ffffff"
,
FYGE
.
TEXT_ALIGN
.
LEFT
,
500
);
_this
.
powerScoreLabel
.
x
=
100
;
_this
.
powerScoreLabel
.
x
=
100
;
_this
.
powerScoreLabel
.
y
=
114
+
OFFSET_Y
;
_this
.
powerScoreLabel
.
y
=
114
+
DxqPlayScene
.
OFFSET_Y
;
var
textures
=
{};
var
textures
=
{};
for
(
var
i
=
0
;
i
<
10
;
i
++
)
for
(
var
i
=
0
;
i
<
10
;
i
++
)
textures
[
i
]
=
RES_1
.
RES
.
getRes
(
"score_num_"
+
i
+
".png"
);
textures
[
i
]
=
RES_1
.
RES
.
getRes
(
"score_num_"
+
i
+
".png"
);
var
labelScore2
=
new
FYGE
.
BitmapText
(
textures
);
var
labelScore2
=
new
FYGE
.
BitmapText
(
textures
);
labelScore2
.
textAlign
=
FYGE
.
TEXT_ALIGN
.
LEFT
;
labelScore2
.
textAlign
=
FYGE
.
TEXT_ALIGN
.
CENTER
;
labelScore2
.
y
=
OFFSET_Y
+
50
;
labelScore2
.
y
=
DxqPlayScene
.
OFFSET_Y
+
50
;
_this
.
totalScoreLabel
=
labelScore2
;
_this
.
totalScoreLabel
=
labelScore2
;
_this
.
timeLabel
=
Tools_1
.
Tool
.
getText
(
"00:00"
,
30
,
"#ffffff"
,
FYGE
.
TEXT_ALIGN
.
LEFT
);
_this
.
timeLabel
=
Tools_1
.
Tool
.
getText
(
"00:00"
,
30
,
"#ffffff"
,
FYGE
.
TEXT_ALIGN
.
LEFT
);
_this
.
timeLabel
.
position
.
set
(
656
,
117
+
OFFSET_Y
);
_this
.
timeLabel
.
position
.
set
(
656
,
117
+
DxqPlayScene
.
OFFSET_Y
);
_this
.
node
.
addChild
(
bulletIcon
);
_this
.
node
.
addChild
(
bulletIcon
);
_this
.
node
.
addChild
(
_this
.
bulletScoreLabel
);
_this
.
node
.
addChild
(
_this
.
bulletScoreLabel
);
_this
.
node
.
addChild
(
powerIcon
);
_this
.
node
.
addChild
(
powerIcon
);
...
@@ -7387,11 +7384,10 @@ var DxqPlayScene = (function (_super) {
...
@@ -7387,11 +7384,10 @@ var DxqPlayScene = (function (_super) {
if
(
needSend
)
{
if
(
needSend
)
{
FYGE
.
GDispatcher
.
dispatchEvent
(
"game-update"
,
updateData
);
FYGE
.
GDispatcher
.
dispatchEvent
(
"game-update"
,
updateData
);
this
.
powerScoreLabel
.
text
=
updateData
.
powerScore
+
"%"
;
this
.
powerScoreLabel
.
text
=
updateData
.
powerScore
+
"%"
;
this
.
bulletScoreLabel
.
text
=
"
x
"
+
updateData
.
bulletScore
;
this
.
bulletScoreLabel
.
text
=
""
+
updateData
.
bulletScore
;
this
.
totalScoreLabel
.
text
=
updateData
.
score
+
""
;
this
.
totalScoreLabel
.
text
=
updateData
.
score
+
""
;
console
.
log
(
'this.totalScoreLabel.text'
,
this
.
totalScoreLabel
.
text
);
setTimeout
(
function
()
{
setTimeout
(
function
()
{
_this
.
totalScoreLabel
.
x
=
750
/
2
-
_this
.
totalScoreLabel
.
width
/
2
;
_this
.
totalScoreLabel
.
x
=
750
/
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