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
ddd08f47
Commit
ddd08f47
authored
Jun 10, 2020
by
huangwenjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
c0d0d674
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
16 deletions
+39
-16
index.html
egret/index.html
+11
-2
loginBtn.png
egret/resource/assets/alert/loginBtn.png
+0
-0
Main.ts
egret/src/Main.ts
+9
-1
PlayScene.ts
egret/src/playScene/PlayScene.ts
+19
-12
PrizePanel.ts
egret/src/prize/PrizePanel.ts
+0
-1
tt.html
egret/tt.html
+0
-0
No files found.
egret/index.html
View file @
ddd08f47
...
...
@@ -66,7 +66,6 @@
data-show-fps-style=
"x:0,y:0,size:12,textColor:0xffffff,bgAlpha:0.9"
>
</div>
<img
id=
"shareImg"
/>
<script
src=
"libs/svga.egret.min.js"
></script>
<script
src=
"libs/modules/egret/egret.js"
></script>
<script
src=
"libs/modules/egret/egret.web.js"
></script>
<script
src=
"libs/modules/eui/eui.js"
></script>
...
...
@@ -74,6 +73,7 @@
<script
src=
"libs/modules/assetsmanager/assetsmanager.js"
></script>
<script
src=
"libs/modules/tween/tween.js"
></script>
<script
src=
"libs/zepto.min.js"
></script>
<script
src=
"libs/svga.egret.min.js"
></script>
<script
src=
"libs/security.js"
></script>
<script
src=
"libs/downloadApp.js"
></script>
<script>
...
...
@@ -137,7 +137,7 @@
adslotId
:
''
,
consumerId
:
'2972591116'
,
isNotLoginUser
:
false
,
uid
:
'
60e66b21e5777f54e6b0a22f0a4e6bc4-169586076dc
'
,
uid
:
''
,
hdType
:
'duiba'
,
hdToolId
:
'42649'
,
appType
:
'credits'
,
...
...
@@ -285,6 +285,15 @@
media
.
pause
();
}
}
var
oHead
=
document
.
querySelector
(
'body'
);
var
oScript
=
document
.
createElement
(
'script'
);
oScript
.
type
=
'text/javascript'
;
oScript
.
src
=
'//yun.duiba.com.cn/webapp/js/vconsole.min.js'
;
oHead
.
appendChild
(
oScript
);
oScript
.
onload
=
function
()
{
var
vConsole
=
new
VConsole
();
}
</script>
<script
src=
"output.js"
></script>
</body>
...
...
egret/resource/assets/alert/loginBtn.png
View replaced file @
c0d0d674
View file @
ddd08f47
19.9 KB
|
W:
|
H:
19.5 KB
|
W:
|
H:
2-up
Swipe
Onion skin
egret/src/Main.ts
View file @
ddd08f47
...
...
@@ -56,6 +56,14 @@ class Main extends MainBase {
// let mv = await SVGACtrl.instance.load("http://yun.duiba.com.cn/db_games/activity/garbageSorting1.00/guideTips.svga");
// let soundArr = ["numCountDown_mp3", "rightTips_mp3"]
// preloadSound(soundArr);
if
(
!
GameConst
.
getQueryString
(
"first"
))
{
if
(
window
.
location
.
href
.
indexOf
(
"?"
)
>=
0
)
{
window
.
location
.
href
=
window
.
location
.
href
+
"&first=1"
}
else
{
window
.
location
.
href
=
window
.
location
.
href
+
"?first=1"
}
}
}
...
...
@@ -152,7 +160,7 @@ class Main extends MainBase {
window
[
'Main'
]
=
Main
;
egret
.
ImageLoader
.
crossOrigin
=
"anonymous"
;
egret
.
runEgret
({
renderMode
:
"
webgl
"
,
audioType
:
0
,
calculateCanvasScaleFactor
:
function
(
context
:
any
)
{
renderMode
:
"
canvas
"
,
audioType
:
0
,
calculateCanvasScaleFactor
:
function
(
context
:
any
)
{
var
backingStore
=
context
.
backingStorePixelRatio
||
context
.
webkitBackingStorePixelRatio
||
context
.
mozBackingStorePixelRatio
||
...
...
egret/src/playScene/PlayScene.ts
View file @
ddd08f47
...
...
@@ -184,29 +184,36 @@ export default class PlayScene extends Scene {
}
onEnd_guideEle
(
e
)
{
const
condition
:
boolean
=
GameConst
.
contain
(
this
.
recoverableWaste
,
this
.
guideTarget
)
;
const
condition
:
boolean
=
this
.
guideTarget
?
GameConst
.
contain
(
this
.
recoverableWaste
,
this
.
guideTarget
)
:
false
;
if
(
condition
)
{
this
.
guideEle
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_BEGIN
,
this
.
onBegin_guideEle
,
this
);
this
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_MOVE
,
this
.
onMove_guideEle
,
this
);
this
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_CANCEL
,
this
.
onEnd_guideEle
,
this
);
this
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_END
,
this
.
onEnd_guideEle
,
this
);
egret
.
Tween
.
get
(
this
.
guideTarget
)
.
to
({
scaleX
:
0
,
scaleY
:
0
},
200
)
.
call
(()
=>
{
this
.
onTap_guideGroup
();
})
if
(
this
.
guideTarget
)
{
egret
.
Tween
.
get
(
this
.
guideTarget
)
.
to
({
scaleX
:
0
,
scaleY
:
0
},
200
)
.
call
(()
=>
{
this
.
onTap_guideGroup
();
})
}
}
else
{
this
.
guideEle
.
scaleX
=
0
;
this
.
guideEle
.
scaleY
=
0
;
egret
.
Tween
.
get
(
this
.
guideEle
)
.
to
({
scaleX
:
1
,
scaleY
:
1
},
200
)
this
.
guideEle
.
visible
=
true
;
egret
.
Tween
.
get
(
this
.
guideTarget
)
.
to
({
scaleX
:
0
,
scaleY
:
0
},
200
)
.
call
(()
=>
{
this
.
removeChild
(
this
.
guideTarget
);
this
.
guideTarget
=
null
;
})
if
(
this
.
guideTarget
)
{
egret
.
Tween
.
get
(
this
.
guideTarget
)
.
to
({
scaleX
:
0
,
scaleY
:
0
},
200
)
.
call
(()
=>
{
this
.
removeChild
(
this
.
guideTarget
);
this
.
guideTarget
=
null
;
})
}
MovieClipCtrl
.
instance
.
getMovieClipByName
(
"guideTips_0"
).
visible
=
true
;
this
.
guideEle
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_BEGIN
,
this
.
onBegin_guideEle
,
this
);
}
...
...
egret/src/prize/PrizePanel.ts
View file @
ddd08f47
...
...
@@ -89,7 +89,6 @@ export default class PrizePanel extends Panel {
onUse
()
{
if
(
this
.
lottery
.
type
==
LotteryType
.
LUCKY
)
{
window
[
"downloadAppConfig"
]
=
{
openUrl
:
this
.
lottery
.
openUrl
,
...
...
egret/tt.html
0 → 100644
View file @
ddd08f47
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