Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaole
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
xiaoxiaole
Commits
7dbf98a1
Commit
7dbf98a1
authored
Aug 28, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
03d04ea9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
19 deletions
+33
-19
NoPrizePanel.ts
egret/libs/new_wx/components/NoPrizePanel.ts
+2
-1
PrizePanel.ts
egret/libs/new_wx/components/PrizePanel.ts
+3
-1
getShowOffPic.ts
egret/src/getShowOffPic.ts
+18
-13
MapScene.ts
egret/src/mapScene/MapScene.ts
+5
-0
Prize2Panel.ts
egret/src/panels/Prize2Panel.ts
+2
-1
home.json
mock/happyclear/home.json
+3
-3
No files found.
egret/libs/new_wx/components/NoPrizePanel.ts
View file @
7dbf98a1
...
...
@@ -6,6 +6,7 @@ import SceneCtrl from "../ctrls/sceneCtrl";
import
{
ModuleTypes
}
from
"../types/sceneTypes"
;
import
{
createData
}
from
"../../../src/startScene/StartScene"
;
import
{
DataManager
}
from
"../../tw/manager/DataManager"
;
import
getShowOffPic
from
"../../../src/getShowOffPic"
;
export
default
class
NoPrizePanel
extends
Panel
{
_level
;
start
(
data
)
{
...
...
@@ -14,7 +15,7 @@ export default class NoPrizePanel extends Panel {
this
.
_level
=
parseInt
(
data
.
level
+
''
);
this
[
'shareBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
16
));
getShowOffPic
(
this
.
stage
);
},
this
);
this
.
showlog
();
NetManager
.
ins
.
hc_home
(()
=>
{
},
window
[
'collectRuleId'
]);
...
...
egret/libs/new_wx/components/PrizePanel.ts
View file @
7dbf98a1
...
...
@@ -5,6 +5,8 @@ import { NetManager } from "../../tw/manager/NetManager";
import
SceneCtrl
from
"../ctrls/sceneCtrl"
;
import
{
ModuleTypes
}
from
"../types/sceneTypes"
;
import
Panel
from
"./Panel"
;
import
{
callShareApi
}
from
"../../../src/shareCtrl"
;
import
getShowOffPic
from
"../../../src/getShowOffPic"
;
export
default
class
PrizePanel
extends
Panel
{
_level
;
start
(
data
)
{
...
...
@@ -24,7 +26,7 @@ export default class PrizePanel extends Panel {
this
[
'shareBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
15
));
getShowOffPic
(
this
.
stage
);
},
this
);
this
[
'goBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
.
hidePanel
();
...
...
egret/src/getShowOffPic.ts
View file @
7dbf98a1
...
...
@@ -2,6 +2,8 @@ import ComponentBase from "../libs/new_wx/components/ComponentBase";
import
getHomeData
from
"./getHomeData"
;
import
{
NetManager
}
from
"../libs/tw/manager/NetManager"
;
import
{
DataManager
}
from
"../libs/tw/manager/DataManager"
;
import
{
iswx
}
from
"./iswx"
;
import
{
callShareApi
}
from
"./shareCtrl"
;
class
ShowOff
extends
ComponentBase
{
start
()
{
...
...
@@ -18,18 +20,21 @@ export const getPrintScreenData = (scene, startX, startY, width, height) => {
const
imageData
=
renderTexture
.
toDataURL
(
"image/jpg"
);
return
imageData
;
}
export
default
async
(
parent
?:
egret
.
DisplayObjectContainer
)
=>
{
return
new
Promise
(
async
(
r
)
=>
{
const
pic
:
egret
.
Texture
=
await
RES
.
getResAsync
(
'showoff_jpg'
);
const
showoff
=
new
ShowOff
();
showoff
.
loadSkin
();
showoff
.
start
();
if
(
parent
)
parent
.
addChild
(
showoff
);
const
base64
=
getPrintScreenData
(
showoff
,
0
,
0
,
pic
.
textureWidth
,
parent
.
stage
.
stageHeight
);
NetManager
.
ins
.
imgUrl
((
success
)
=>
{
const
data
=
DataManager
.
ins
.
getData
(
'imgURL'
);
r
(
data
.
data
)
},
base64
);
})
export
default
async
(
stage
,
parent
?:
egret
.
DisplayObjectContainer
,
)
=>
{
// return new Promise(async (r) => {
const
pic
:
egret
.
Texture
=
await
RES
.
getResAsync
(
'showoff_jpg'
);
const
showoff
=
new
ShowOff
();
showoff
.
loadSkin
();
showoff
.
start
();
if
(
parent
)
parent
.
addChild
(
showoff
);
const
base64
=
getPrintScreenData
(
showoff
,
0
,
0
,
pic
.
textureWidth
,
stage
.
stageHeight
);
NetManager
.
ins
.
imgUrl
((
success
)
=>
{
const
data
=
DataManager
.
ins
.
getData
(
'imgURL'
);
// r(data.data);
if
(
!
iswx
())
{
callShareApi
(
data
.
data
,
1
);
}
},
base64
);
// })
}
egret/src/mapScene/MapScene.ts
View file @
7dbf98a1
...
...
@@ -12,6 +12,7 @@ import { playBg, toggleBg, toggleSound } from "../soundCtrl";
import
MapBottomPart
from
"./MapBottomPart"
;
import
MapRpeatPart
from
"./MapRpeatPart"
;
import
MapTopPart
from
"./MapTopPart"
;
import
getShowOffPic
from
"../getShowOffPic"
;
export
default
class
MapScene
extends
Scene
{
scrollGroup
:
eui
.
Group
;
...
...
@@ -24,6 +25,10 @@ export default class MapScene extends Scene {
_data
;
async
start
(
data
?)
{
super
.
start
();
// setTimeout(() => {
// getShowOffPic(this.stage,this)
// }, 3000);
this
.
_data
=
data
;
//滚动的背景变黑
this
[
'rectbg'
].
height
=
this
.
stage
.
stageHeight
;
...
...
egret/src/panels/Prize2Panel.ts
View file @
7dbf98a1
...
...
@@ -5,6 +5,7 @@ import { getlogItem } from "../Main";
import
SceneCtrl
from
"../../libs/new_wx/ctrls/sceneCtrl"
;
import
{
ModuleTypes
}
from
"../../libs/new_wx/types/sceneTypes"
;
import
setGray
from
"../setGray"
;
import
getShowOffPic
from
"../getShowOffPic"
;
export
default
class
Prize2Panel
extends
Panel
{
_level
;
...
...
@@ -19,7 +20,7 @@ export default class Prize2Panel extends Panel {
this
[
'tips'
].
text
=
`本次获得元宝:
${
submitdata
.
prizeResponse
.
changeMoney
}
`
;
this
[
'shareBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
15
));
getShowOffPic
(
this
.
stage
);
},
this
);
this
[
'goBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
...
...
mock/happyclear/home.json
View file @
7dbf98a1
...
...
@@ -11,15 +11,15 @@
"remainProp"
:
[
{
"type"
:
2
,
"num"
:
1
"num"
:
0
},
{
"type"
:
3
,
"num"
:
8
"num"
:
0
},
{
"type"
:
4
,
"num"
:
1
0
"num"
:
0
}
],
"remainEnargy"
:
9979
,
...
...
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