Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
games
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
熊东起
games
Commits
4ca96863
Commit
4ca96863
authored
Nov 03, 2020
by
熊东起
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first
parent
a7424019
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
71 additions
and
47 deletions
+71
-47
output.js
output.js
+18
-10
output.js.map
output.js.map
+1
-1
gameAwardBg.png
resource/gameAwardPanel/gameAwardBg.png
+0
-0
ResJson.ts
src/ResJson.ts
+1
-1
DxqPlayScene.ts
src/game/DxqPlayScene.ts
+40
-31
GameAwardPanel.ts
src/panels/GameAwardPanel.ts
+11
-4
No files found.
output.js
View file @
4ca96863
...
...
@@ -7036,7 +7036,7 @@ exports.ResJson = {
}
}
],
"path"
:
"https://yun.duiba.com.cn/db_games/activity/kickball-feile/160
1200393
/resource/"
"path"
:
"https://yun.duiba.com.cn/db_games/activity/kickball-feile/160
3181578
/resource/"
};
...
...
@@ -8733,7 +8733,7 @@ var DxqPlayScene = (function (_super) {
parseInt
(
this
.
__score
/
MConst_1
.
MConst
.
disScore
+
""
)
>
0
&&
parseInt
(
this
.
__score
/
MConst_1
.
MConst
.
disScore
+
""
)
>
this
.
count
)
{
var
seq
=
parseInt
(
this
.
__score
/
MConst_1
.
MConst
.
disScore
+
""
);
this
.
count
+=
seq
;
this
.
count
++
;
this
.
onSubmitFirst
(
seq
);
}
},
...
...
@@ -8745,7 +8745,7 @@ var DxqPlayScene = (function (_super) {
var
result
;
return
__generator
(
this
,
function
(
_a
)
{
switch
(
_a
.
label
)
{
case
0
:
return
[
4
,
submitFirstGame_1
.
default
(
this
.
s
core
,
seq
)];
case
0
:
return
[
4
,
submitFirstGame_1
.
default
(
MConst_1
.
MConst
.
disS
core
,
seq
)];
case
1
:
result
=
_a
.
sent
();
if
(
!
result
.
success
)
{
...
...
@@ -8857,16 +8857,23 @@ var DxqPlayScene = (function (_super) {
};
DxqPlayScene
.
prototype
.
over
=
function
()
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
var
result
;
var
result
1
,
result
;
var
_this
=
this
;
return
__generator
(
this
,
function
(
_a
)
{
switch
(
_a
.
label
)
{
case
0
:
console
.
log
(
"游戏结束"
);
this
.
timer
==
0
;
this
.
gamePause
();
this
.
_car
.
carMc
.
stop
();
return
[
4
,
submit
Game_1
.
default
(
this
.
score
)];
return
[
4
,
submit
FirstGame_1
.
default
(
this
.
score
-
this
.
count
*
MConst_1
.
MConst
.
disScore
,
this
.
count
+
1
)];
case
1
:
result1
=
_a
.
sent
();
if
(
!!
result1
.
success
)
return
[
3
,
2
];
this
.
gameDead
();
return
[
3
,
4
];
case
2
:
return
[
4
,
submitGame_1
.
default
(
this
.
score
)];
case
3
:
result
=
_a
.
sent
();
if
(
result
.
success
)
{
console
.
log
(
"弹出弹窗"
,
result
);
...
...
@@ -8899,7 +8906,8 @@ var DxqPlayScene = (function (_super) {
},
3000
);
}
}
return
[
2
];
_a
.
label
=
4
;
case
4
:
return
[
2
];
}
});
});
...
...
@@ -10243,13 +10251,13 @@ var GameAwardPanel = (function (_super) {
bg
.
addChild
(
desc
);
desc
.
y
=
515
;
var
awardImg
=
new
FYGE
.
Sprite
();
awardImg
.
width
=
401
;
awardImg
.
height
=
1
64
;
awardImg
.
width
=
180
;
awardImg
.
height
=
1
80
;
awardImg
.
texture
=
FYGE
.
Texture
.
fromUrl
(
raw
.
prize
.
icon
+
(
"?"
+
Date
.
now
()));
awardImg
.
texture
.
baseTexture
.
once
(
"update"
,
function
()
{
awardImg
.
x
=
bg
.
width
/
2
-
awardImg
.
texture
.
baseTexture
.
source
.
width
/
2
-
11
;
awardImg
.
y
=
5
6
0
;
bg
.
width
/
2
-
90
;
awardImg
.
y
=
5
5
0
;
},
this
);
bg
.
addChild
(
awardImg
);
this
.
closeBtn
=
new
FYGE
.
Button
(
RES_1
.
RES
.
getRes
(
"comCloseBtn.png"
));
...
...
output.js.map
View file @
4ca96863
This source diff could not be displayed because it is too large. You can
view the blob
instead.
resource/gameAwardPanel/gameAwardBg.png
View replaced file @
a7424019
View file @
4ca96863
738 KB
|
W:
|
H:
827 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/ResJson.ts
View file @
4ca96863
...
...
@@ -994,5 +994,5 @@ export const ResJson = {
}
}
],
"path"
:
"https://yun.duiba.com.cn/db_games/activity/kickball-feile/160
1200393
/resource/"
"path"
:
"https://yun.duiba.com.cn/db_games/activity/kickball-feile/160
3181578
/resource/"
}
\ No newline at end of file
src/game/DxqPlayScene.ts
View file @
4ca96863
...
...
@@ -285,13 +285,13 @@ export default class DxqPlayScene extends FYGE.Container {
parseInt
(
this
.
__score
/
MConst
.
disScore
+
""
)
>
this
.
count
)
{
let
seq
=
parseInt
(
this
.
__score
/
MConst
.
disScore
+
""
);
this
.
count
+=
seq
;
this
.
count
++
;
this
.
onSubmitFirst
(
seq
);
}
}
private
async
onSubmitFirst
(
seq
)
{
const
result
=
await
submitFirstGame
(
this
.
s
core
,
seq
);
const
result
=
await
submitFirstGame
(
MConst
.
disS
core
,
seq
);
if
(
!
result
.
success
)
{
this
.
gameDead
();
}
...
...
@@ -439,10 +439,19 @@ export default class DxqPlayScene extends FYGE.Container {
}
private
async
over
()
{
console
.
log
(
"游戏结束"
);
this
.
timer
==
0
;
this
.
gamePause
();
this
.
_car
.
carMc
.
stop
();
//先中途提交
const
result1
=
await
submitFirstGame
(
this
.
score
-
this
.
count
*
MConst
.
disScore
,
this
.
count
+
1
);
if
(
!
result1
.
success
)
{
this
.
gameDead
();
}
else
{
const
result
=
await
submitGame
(
this
.
score
);
if
(
result
.
success
)
{
console
.
log
(
"弹出弹窗"
,
result
);
...
...
@@ -459,15 +468,14 @@ export default class DxqPlayScene extends FYGE.Container {
}
else
{
//弹出弹窗 -- 游戏结束
if
(
result
.
code
==
"500723"
)
{
showPanel
(
GameOverPanel
,
{
finalScore
:
this
.
score
,
type
:
"500723"
});
}
else
if
(
result
.
code
==
"500724"
)
{
showPanel
(
GameOverPanel
,
{
finalScore
:
this
.
score
,
type
:
"500724"
});
showPanel
(
GameOverPanel
,
{
finalScore
:
this
.
score
,
type
:
"500723"
});
}
else
if
(
result
.
code
==
"500724"
)
{
showPanel
(
GameOverPanel
,
{
finalScore
:
this
.
score
,
type
:
"500724"
});
}
//再来一局
else
if
(
result
.
code
==
"500722"
)
{
// showPanel(GameAgainPanel, result.data);
showPanel
(
GameAgainPanel
,
{
finalScore
:
this
.
score
});
showPanel
(
GameAgainPanel
,
{
finalScore
:
this
.
score
});
GDispatcher
.
dispatchEvent
({
type
:
"showBuried"
},
{
type
:
1
});
}
else
{
showToast
(
result
.
message
);
...
...
@@ -477,6 +485,7 @@ export default class DxqPlayScene extends FYGE.Container {
}
}
}
}
gamePause
()
{
this
.
pause
=
true
;
...
...
src/panels/GameAwardPanel.ts
View file @
4ca96863
...
...
@@ -18,6 +18,12 @@ export class GameAwardPanel extends Panel {
centerImage
(
bg
);
const
{
raw
}
=
this
.
data
as
any
;
// let raw = {
// finalScore: 99,
// prize: {
// name: "88",
// }
// }
//本局分数
var
textures
=
{};
...
...
@@ -55,15 +61,16 @@ export class GameAwardPanel extends Panel {
//奖品图片
const
awardImg
=
new
FYGE
.
Sprite
();
awardImg
.
width
=
401
;
awardImg
.
height
=
164
;
awardImg
.
width
=
180
;
awardImg
.
height
=
180
;
// awardImg.texture = FYGE.Texture.fromUrl("//yun.duiba.com.cn/spark/assets/def91b02829adc3d995d8a0416924152bf2bf49f.png");
awardImg
.
texture
=
FYGE
.
Texture
.
fromUrl
(
raw
.
prize
.
icon
+
`?
${
Date
.
now
()}
`
);
awardImg
.
texture
.
baseTexture
.
once
(
"update"
,
()
=>
{
awardImg
.
x
=
bg
.
width
/
2
-
awardImg
.
texture
.
baseTexture
.
source
.
width
/
2
-
11
;
awardImg
.
y
=
5
6
0
;
bg
.
width
/
2
-
90
;
awardImg
.
y
=
5
5
0
;
},
this
);
...
...
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