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
4ede4aab
Commit
4ede4aab
authored
Nov 25, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
d809176e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
52 deletions
+55
-52
mainscene.tmproject
egret/resource/TextureMerger/mainscene.tmproject
+1
-1
default.thm.json
egret/resource/default.thm.json
+28
-28
MainScene.ts
egret/src/MainScene.ts
+22
-19
index.json
mock/esports/index.json
+4
-4
No files found.
egret/resource/TextureMerger/mainscene.tmproject
View file @
4ede4aab
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"mainscene","version":5,"files":["../assets/main/main_star.png","../assets/main/main_pic.png","../assets/main/main_icon5.png","../assets/main/main_icon4.png","../assets/main/main_icon3.png","../assets/main/main_icon2.png","../assets/main/main_icon1.png","../assets/main/main_fu3.png","../assets/main/main_fu2.png","../assets/main/main_fu.png","../assets/main/main_fu_bg.png","../assets/main/main_btn3.png","../assets/main/main_btn2.png","../assets/main/main_btn1.png","../assets/main/main_bg2.png","../assets/main/main_bg1.png"]}
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"mainscene","version":5,"files":["../assets/main/main_star.png","../assets/main/main_pic.png","../assets/main/main_icon5.png","../assets/main/main_icon4.png","../assets/main/main_icon3.png","../assets/main/main_icon2.png","../assets/main/main_icon1.png","../assets/main/main_fu3.png","../assets/main/main_fu2.png","../assets/main/main_fu.png","../assets/main/main_fu_bg.png","../assets/main/main_btn3.png","../assets/main/main_btn2.png","../assets/main/main_btn1.png","../assets/main/main_bg2.png","../assets/main/main_bg1.png","../assets/main/main_text.png","../assets/main/main_starbg.png"]}
\ No newline at end of file
\ No newline at end of file
egret/resource/default.thm.json
View file @
4ede4aab
{
{
"skins"
:
{},
"skins"
:
{},
"autoGenerateExmlsList"
:
true
,
"autoGenerateExmlsList"
:
true
,
"exmls"
:
[
"exmls"
:
[
"resource/skins/Star
Skin.exml"
,
"resource/skins/AdminItem
Skin.exml"
,
"resource/skins/AdminItem
Skin.exml"
,
"resource/skins/AdminPanel
Skin.exml"
,
"resource/skins/AdminPanel
Skin.exml"
,
"resource/skins/Admin
Skin.exml"
,
"resource/skins/Admin
Skin.exml"
,
"resource/skins/Cost
Skin.exml"
,
"resource/skins/Cost
Skin.exml"
,
"resource/skins/DreamAdmin
Skin.exml"
,
"resource/skins/DreamAdmin
Skin.exml"
,
"resource/skins/Dream
Skin.exml"
,
"resource/skins/Dream
Skin.exml"
,
"resource/skins/HScrollBar
Skin.exml"
,
"resource/skins/HScrollBar
Skin.exml"
,
"resource/skins/HisDream
Skin.exml"
,
"resource/skins/HisDream
Skin.exml"
,
"resource/skins/Intro
Skin.exml"
,
"resource/skins/Intro
Skin.exml"
,
"resource/skins/ListItem
Skin.exml"
,
"resource/skins/ListItem
Skin.exml"
,
"resource/skins/List
Skin.exml"
,
"resource/skins/List
Skin.exml"
,
"resource/skins/MainScene
Skin.exml"
,
"resource/skins/MainScene
Skin.exml"
,
"resource/skins/MyDream
Skin.exml"
,
"resource/skins/MyDream
Skin.exml"
,
"resource/skins/Pass
Skin.exml"
,
"resource/skins/Pass
Skin.exml"
,
"resource/skins/ReFuse
Skin.exml"
,
"resource/skins/ReFus
eSkin.exml"
,
"resource/skins/Rul
eSkin.exml"
,
"resource/skins/Rule
Skin.exml"
,
"resource/skins/Scroller
Skin.exml"
,
"resource/skins/Scroller
Skin.exml"
,
"resource/skins/ShareDream
Skin.exml"
,
"resource/skins/ShareDream
Skin.exml"
,
"resource/skins/StarAni
Skin.exml"
,
"resource/skins/StarAni
Skin.exml"
,
"resource/skins/Star
Skin.exml"
,
"resource/skins/SuccessSkin.exml"
,
"resource/skins/SuccessSkin.exml"
,
"resource/skins/ToastSkin.exml"
,
"resource/skins/ToastSkin.exml"
,
"resource/skins/VScrollBarSkin.exml"
"resource/skins/VScrollBarSkin.exml"
],
],
"path"
:
"resource/default.thm.json"
"path"
:
"resource/default.thm.json"
}
}
\ No newline at end of file
egret/src/MainScene.ts
View file @
4ede4aab
...
@@ -36,30 +36,32 @@ export default class MainScene extends Scene {
...
@@ -36,30 +36,32 @@ export default class MainScene extends Scene {
}
}
setNormal
(
isNormal
,
rightnow
=
false
)
{
setNormal
(
isNormal
,
rightnow
=
false
)
{
const
join_1_index
:
join_1_index
=
DataManager
.
ins
.
getData
(
'yyh_join1_index'
);
return
new
Promise
((
r
)
=>
{
return
new
Promise
((
r
)
=>
{
this
[
'starWrapper'
][
'isNormal'
]
=
isNormal
;
this
[
'starWrapper'
][
'isNormal'
]
=
isNormal
;
if
(
isNormal
)
{
if
(
isNormal
)
{
this
[
'tips'
].
visible
=
false
;
this
[
'tips'
].
visible
=
false
;
egret
.
Tween
.
get
(
this
[
'starWrapper'
]).
to
({
x
:
374
,
y
:
562
,
scaleY
:
1
,
scaleX
:
1
},
500
,
egret
.
Ease
.
backIn
).
call
(()
=>
{
if
(
this
.
stars
)
this
.
playShakeAni
();
this
.
stars
.
forEach
(
item
=>
{
this
.
stars
.
forEach
((
item
,
index
)
=>
{
egret
.
Tween
.
removeTweens
(
item
);
egret
.
Tween
.
removeTweens
(
item
);
item
.
alpha
=
0
;
egret
.
Tween
.
get
(
item
).
to
({
alpha
:
0
},
300
).
call
(()
=>
{
this
.
removeChild
(
item
)
});
item
.
touchEnabled
=
false
;
});
});
this
.
stars
=
[];
egret
.
Tween
.
get
(
this
[
'starWrapper'
]).
to
({
x
:
374
,
y
:
562
,
scaleY
:
1
,
scaleX
:
1
},
500
,
egret
.
Ease
.
backIn
).
call
(()
=>
{
this
.
playShakeAni
();
});
});
}
else
{
}
else
{
this
.
stopShakeAni
();
this
.
stopShakeAni
();
egret
.
Tween
.
get
(
this
[
'starWrapper'
]).
to
({
x
:
666
+
10
,
y
:
135
+
30
,
scaleX
:
0.15
,
scaleY
:
0.15
},
500
,
egret
.
Ease
.
backIn
).
call
(()
=>
{
this
.
updateStars
(
join_1_index
.
data
.
dreamList
);
egret
.
Tween
.
get
(
this
[
'starWrapper'
]).
to
({
x
:
666
+
10
,
y
:
135
+
30
,
scaleX
:
0.15
,
scaleY
:
0.15
},
rightnow
?
1
:
500
,
egret
.
Ease
.
backIn
).
call
(()
=>
{
this
[
'tips'
].
visible
=
true
;
this
[
'tips'
].
visible
=
true
;
this
.
stars
.
forEach
((
item
,
index
)
=>
{
this
.
stars
.
forEach
((
item
,
index
)
=>
{
wait
(
index
*
1000
).
then
(()
=>
{
wait
(
index
*
1000
).
then
(()
=>
{
item
.
touchEnabled
=
true
;
egret
.
Tween
.
get
(
item
).
set
({
alpha
:
0
}).
to
({
alpha
:
1
},
1000
).
call
(()
=>
{
egret
.
Tween
.
get
(
item
).
to
({
alpha
:
1
},
1000
).
call
(()
=>
{
const
y
=
this
.
pos
[
index
][
1
];
const
y
=
this
.
pos
[
index
][
1
];
const
stren
=
20
;
const
dur
=
2000
;
const
stren
=
20
;
const
dur
=
2000
;
egret
.
Tween
.
get
(
item
,
{
loop
:
true
}).
set
({
y
:
y
}).
to
({
y
:
y
-
stren
},
dur
).
to
({
y
:
y
},
dur
)
egret
.
Tween
.
get
(
item
,
{
loop
:
true
}).
set
({
y
:
y
}).
to
({
y
:
y
-
stren
},
dur
).
to
({
y
:
y
},
dur
)
.
to
({
y
:
y
+
stren
},
dur
).
to
({
y
:
y
},
dur
)
.
to
({
y
:
y
+
stren
},
dur
).
to
({
y
:
y
},
dur
)
});
});
});
});
});
});
...
@@ -82,14 +84,15 @@ export default class MainScene extends Scene {
...
@@ -82,14 +84,15 @@ export default class MainScene extends Scene {
this
.
playStarAni
();
this
.
playStarAni
();
this
.
onResume_mainscene
();
this
.
onResume_mainscene
();
MainBase
.
onResume_mainscene
=
this
.
onResume_mainscene
;
MainBase
.
onResume_mainscene
=
this
.
onResume_mainscene
;
const
join_1_index
:
join_1_index
=
DataManager
.
ins
.
getData
(
'yyh_join1_index'
);
const
join_1_index
:
join_1_index
=
DataManager
.
ins
.
getData
(
'yyh_join1_index'
);
this
.
showPanels
(
join_1_index
.
data
);
this
.
showPanels
(
join_1_index
.
data
);
this
.
updateStars
(
join_1_index
.
data
.
dreamList
);
if
(
isFirstShow
)
{
if
(
isFirstShow
)
{
isFirstShow
=
false
;
isFirstShow
=
false
;
this
.
setNormal
(
1
);
this
.
setNormal
(
1
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -97,6 +100,7 @@ export default class MainScene extends Scene {
...
@@ -97,6 +100,7 @@ export default class MainScene extends Scene {
this
[
'starWrapper'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
ontap_starWrapper
,
this
);
this
[
'starWrapper'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
ontap_starWrapper
,
this
);
},
3000
);
},
3000
);
}
else
{
}
else
{
this
.
setNormal
(
0
,
true
);
this
[
'starWrapper'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
ontap_starWrapper
,
this
);
this
[
'starWrapper'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
ontap_starWrapper
,
this
);
}
}
const
detail
:
any
=
await
updateMyInfo
()
const
detail
:
any
=
await
updateMyInfo
()
...
@@ -104,19 +108,18 @@ export default class MainScene extends Scene {
...
@@ -104,19 +108,18 @@ export default class MainScene extends Scene {
}
}
stars
:
any
[];
stars
:
any
[];
pos
=
[[
70
,
350
],
[
480
,
300
],
[
100
,
800
],
[
300
,
550
],
[
450
,
750
]];
pos
=
[[
70
,
350
],
[
480
,
300
],
[
100
,
800
],
[
300
,
550
],
[
450
,
750
]];
updateStars
(
list
:
any
[])
{
updateStars
(
list
:
any
[])
{
if
(
list
.
length
>
5
)
if
(
list
.
length
>
5
)
list
.
length
=
5
;
list
.
length
=
5
;
this
.
stars
=
[];
this
.
stars
=
[];
list
.
forEach
((
item
,
index
)
=>
{
list
.
forEach
((
item
,
index
)
=>
{
const
star
=
new
StarComp
(
`来自
${
getProvince
(
item
.
address
)}
的梦想`
,
item
.
id
);
const
star
=
new
StarComp
(
`来自
${
getProvince
(
item
.
address
)}
的梦想`
,
item
.
id
);
star
.
x
=
this
.
pos
[
index
][
0
];
star
.
x
=
this
.
pos
[
index
][
0
];
star
.
y
=
this
.
pos
[
index
][
1
];
star
.
y
=
this
.
pos
[
index
][
1
];
this
.
addChild
(
star
);
star
.
alpha
=
0
;
star
.
alpha
=
0
;
this
.
stars
.
push
(
star
);
this
.
stars
.
push
(
star
);
star
.
touchEnabled
=
false
;
this
.
addChild
(
star
)
;
})
})
}
}
...
...
mock/esports/index.json
View file @
4ede4aab
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
"name"
:
"姓名"
,
"name"
:
"姓名"
,
"tel"
:
"13711111111"
,
"tel"
:
"13711111111"
,
"idNumber"
:
"333333333333333333"
,
"idNumber"
:
"333333333333333333"
,
"address"
:
"浙江省,杭州市,上城区"
,
"address"
:
"浙江省
2
,杭州市,上城区"
,
"dreamContent"
:
"梦想内容"
,
"dreamContent"
:
"梦想内容"
,
"dreamPic"
:
"梦想图片"
,
"dreamPic"
:
"梦想图片"
,
"rank"
:
1
,
"rank"
:
1
,
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
"name"
:
"姓名"
,
"name"
:
"姓名"
,
"tel"
:
"13711111111"
,
"tel"
:
"13711111111"
,
"idNumber"
:
"333333333333333333"
,
"idNumber"
:
"333333333333333333"
,
"address"
:
"浙江省,杭州市,上城区"
,
"address"
:
"浙江省
3
,杭州市,上城区"
,
"dreamContent"
:
"梦想内容"
,
"dreamContent"
:
"梦想内容"
,
"dreamPic"
:
"梦想图片"
,
"dreamPic"
:
"梦想图片"
,
"rank"
:
1
,
"rank"
:
1
,
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
"name"
:
"姓名"
,
"name"
:
"姓名"
,
"tel"
:
"13711111111"
,
"tel"
:
"13711111111"
,
"idNumber"
:
"333333333333333333"
,
"idNumber"
:
"333333333333333333"
,
"address"
:
"浙江省,杭州市,上城区"
,
"address"
:
"浙江省
4
,杭州市,上城区"
,
"dreamContent"
:
"梦想内容"
,
"dreamContent"
:
"梦想内容"
,
"dreamPic"
:
"梦想图片"
,
"dreamPic"
:
"梦想图片"
,
"rank"
:
1
,
"rank"
:
1
,
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
"name"
:
"姓名"
,
"name"
:
"姓名"
,
"tel"
:
"13711111111"
,
"tel"
:
"13711111111"
,
"idNumber"
:
"333333333333333333"
,
"idNumber"
:
"333333333333333333"
,
"address"
:
"浙江省,杭州市,上城区"
,
"address"
:
"浙江省
5
,杭州市,上城区"
,
"dreamContent"
:
"梦想内容"
,
"dreamContent"
:
"梦想内容"
,
"dreamPic"
:
"梦想图片"
,
"dreamPic"
:
"梦想图片"
,
"rank"
:
2
,
"rank"
:
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