Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
db-game-template
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
崔立强
db-game-template
Commits
1db12f0e
Commit
1db12f0e
authored
Apr 09, 2021
by
zhangjinzhou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
奖品图片自适应
parent
39fefee6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
19 deletions
+35
-19
PrizePanel.ts
egret/libs/new_wx/components/PrizePanel.ts
+30
-16
NetManager.ts
egret/libs/tw/manager/NetManager.ts
+2
-2
PrizeSkin.exml
egret/resource/skins/PrizeSkin.exml
+1
-1
PlayScene.ts
egret/src/playScene/PlayScene.ts
+2
-0
No files found.
egret/libs/new_wx/components/PrizePanel.ts
View file @
1db12f0e
...
@@ -12,16 +12,30 @@ export default class PrizePanel extends Panel {
...
@@ -12,16 +12,30 @@ export default class PrizePanel extends Panel {
const
lottery
=
DataManager
.
ins
.
getCustomOrderStatusData
.
lottery
;
const
lottery
=
DataManager
.
ins
.
getCustomOrderStatusData
.
lottery
;
this
.
data
=
lottery
;
this
.
data
=
lottery
;
this
.
data
.
score
=
`本局分数
${
DataManager
.
ins
.
getData
(
'ngameSubmit'
).
data
.
score
}
`
;
this
.
data
.
score
=
`本局分数
${
DataManager
.
ins
.
getData
(
'ngameSubmit'
).
data
.
score
}
`
;
// let maxheight = 220;
// let imgwid = this.img.width;
// let imghei = this.img.height;
var
imgLoader
:
egret
.
ImageLoader
=
new
egret
.
ImageLoader
();
// console.error('图片信息==》',imghei,imgwid,this.img,this.img['$bitmapHeight'],this.img['$bitmapWidth']);
egret
.
ImageLoader
.
crossOrigin
=
"anonymous"
;
// if(imghei>maxheight){
imgLoader
.
load
(
this
.
data
.
img
);
// imgwid *= 220/imghei;
imgLoader
.
once
(
egret
.
Event
.
COMPLETE
,
(
evt
:
egret
.
Event
)
=>
{
// imghei = maxheight;
if
(
evt
.
currentTarget
.
data
)
{
// this.img.width = imgwid;
let
texture
=
new
egret
.
Texture
();
// this.img.height = imghei;
texture
.
bitmapData
=
evt
.
currentTarget
.
data
;
// }
let
maxheight
=
220
;
let
imgwid
=
texture
.
textureWidth
;
let
imghei
=
texture
.
textureHeight
;
if
(
imghei
>
maxheight
)
{
imgwid
*=
220
/
imghei
;
imghei
=
maxheight
;
}
this
.
img
.
width
=
imgwid
;
this
.
img
.
height
=
imghei
;
}
},
this
);
// this.img.width = this.picBigWidth;
// this.img.width = this.picBigWidth;
// this.img.height = this.picBigWidth / this.bigPicRatio;
// this.img.height = this.picBigWidth / this.bigPicRatio;
...
@@ -45,12 +59,12 @@ export default class PrizePanel extends Panel {
...
@@ -45,12 +59,12 @@ export default class PrizePanel extends Panel {
const
lottery
=
DataManager
.
ins
.
getCustomOrderStatusData
.
lottery
;
const
lottery
=
DataManager
.
ins
.
getCustomOrderStatusData
.
lottery
;
if
(
lottery
.
type
==
LotteryType
.
COUPON
||
lottery
.
type
==
LotteryType
.
LUCKY
)
{
if
(
lottery
.
type
==
LotteryType
.
COUPON
||
lottery
.
type
==
LotteryType
.
LUCKY
)
{
window
[
"downloadAppConfig"
]
=
window
[
"downloadAppConfig"
]
=
{
{
openUrl
:
lottery
.
openUrl
,
openUrl
:
lottery
.
openUrl
,
iosDownloadUrl
:
lottery
.
iosDownloadUrl
,
iosDownloadUrl
:
lottery
.
iosDownloadUrl
,
androidDownloadUrl
:
lottery
.
androidDownloadUrl
,
androidDownloadUrl
:
lottery
.
androidDownloadUrl
,
confirm
:
lottery
.
confirm
?
lottery
.
confirm
:
false
confirm
:
lottery
.
confirm
?
lottery
.
confirm
:
false
};
};
window
[
"downloadApp"
]();
window
[
"downloadApp"
]();
if
(
lottery
.
type
==
"lucky"
)
{
if
(
lottery
.
type
==
"lucky"
)
{
NetManager
.
ins
.
spmclick
(
DataManager
.
ins
.
getCustomOrderStatusData
.
exposure
);
NetManager
.
ins
.
spmclick
(
DataManager
.
ins
.
getCustomOrderStatusData
.
exposure
);
...
...
egret/libs/tw/manager/NetManager.ts
View file @
1db12f0e
...
@@ -462,10 +462,10 @@ export class NetManager extends ABNetManager {
...
@@ -462,10 +462,10 @@ export class NetManager extends ABNetManager {
param
.
rankId
=
rankId
;
param
.
rankId
=
rankId
;
pp
[
"rankId"
]
=
rankId
;
pp
[
"rankId"
]
=
rankId
;
}
}
console
.
error
(
"请求头处理submit===》"
,
JSON
.
stringify
(
pp
));
//
console.error("请求头处理submit===》", JSON.stringify(pp));
//加密拼参数
//加密拼参数
pp
=
encrypt
(
pp
);
pp
=
encrypt
(
pp
);
console
.
error
(
"请求头处理submit加密后===》"
,
JSON
.
stringify
(
pp
));
//
console.error("请求头处理submit加密后===》", JSON.stringify(pp));
const
net
:
INetData
=
{
const
net
:
INetData
=
{
name
:
'ngameSubmit'
,
name
:
'ngameSubmit'
,
// uri: '/hdtool/recon/ngame/ngameSubmit',
// uri: '/hdtool/recon/ngame/ngameSubmit',
...
...
egret/resource/skins/PrizeSkin.exml
View file @
1db12f0e
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
</e:skinName>
</e:skinName>
</e:Button>
</e:Button>
<e:Group
width=
"511"
height=
"239"
x=
"121"
y=
"530"
anchorOffsetX=
"0"
anchorOffsetY=
"0"
>
<e:Group
width=
"511"
height=
"239"
x=
"121"
y=
"530"
anchorOffsetX=
"0"
anchorOffsetY=
"0"
>
<e:Image
id=
"img"
touchEnabled=
"true"
source=
"{data.img}"
scaleX=
"1"
scaleY=
"1"
horizontalCenter=
"0"
verticalCenter=
"0"
fillMode=
"scale"
width=
"370"
height=
"230"
/>
<e:Image
id=
"img"
touchEnabled=
"true"
source=
"{data.img}"
scaleX=
"1"
scaleY=
"1"
horizontalCenter=
"0"
verticalCenter=
"0"
fillMode=
"scale"
/>
</e:Group>
</e:Group>
<e:Label
text=
"{data.name}"
y=
"789"
horizontalCenter=
"0"
width=
"508"
textAlign=
"center"
size=
"28"
textColor=
"0x9f3804"
/>
<e:Label
text=
"{data.name}"
y=
"789"
horizontalCenter=
"0"
width=
"508"
textAlign=
"center"
size=
"28"
textColor=
"0x9f3804"
/>
<e:Label
y=
"360"
horizontalCenter=
"0"
width=
"508"
textAlign=
"center"
size=
"40"
text=
"{data.score}"
textColor=
"0xff3e02"
verticalAlign=
"middle"
/>
<e:Label
y=
"360"
horizontalCenter=
"0"
width=
"508"
textAlign=
"center"
size=
"40"
text=
"{data.score}"
textColor=
"0xff3e02"
verticalAlign=
"middle"
/>
...
...
egret/src/playScene/PlayScene.ts
View file @
1db12f0e
...
@@ -110,6 +110,8 @@ export default class PlayScene extends Scene {
...
@@ -110,6 +110,8 @@ export default class PlayScene extends Scene {
createSpecialRegTriangle
(
this
,
232
,
1351
-
3
-
5
-
3
,
400
,
30
);
//2块斜面地面2
createSpecialRegTriangle
(
this
,
232
,
1351
-
3
-
5
-
3
,
400
,
30
);
//2块斜面地面2
createSpecialRegTriangle
(
this
,
750
-
232
,
1351
-
3
-
5
-
3
,
400
,
-
30
);
//2块斜面地面2
createSpecialRegTriangle
(
this
,
750
-
232
,
1351
-
3
-
5
-
3
,
400
,
-
30
);
//2块斜面地面2
// this.gameOver();
}
}
private
startGame
()
{
private
startGame
()
{
...
...
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