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
4368020e
Commit
4368020e
authored
Dec 26, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
123fdc42
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
15 deletions
+42
-15
index.html
egret/index.html
+1
-1
startscenebg.jpg
egret/resource/assets/startScene/startscenebg.jpg
+0
-0
BoxSkin.exml
egret/resource/skins/BoxSkin.exml
+1
-1
MainScene.ts
egret/src/mainScene/MainScene.ts
+27
-0
Chapter13.ts
egret/src/something/chapters/Chapter13.ts
+13
-13
No files found.
egret/index.html
View file @
4368020e
...
...
@@ -19,7 +19,7 @@
background-color
:
#000
;
background-size
:
100%
;
background-position
:
top
;
background-image
:
url("https://yun.duiba.com.cn/db_games/activity/game/157
3121232
/resource/assets/startScene/startscenebg.jpg")
;
background-image
:
url("https://yun.duiba.com.cn/db_games/activity/game/157
7351394
/resource/assets/startScene/startscenebg.jpg")
;
padding
:
0
;
border
:
0
;
margin
:
0
;
...
...
egret/resource/assets/startScene/startscenebg.jpg
View replaced file @
123fdc42
View file @
4368020e
This diff is collapsed.
Click to expand it.
egret/resource/skins/BoxSkin.exml
View file @
4368020e
...
...
@@ -12,7 +12,7 @@
<e:Label
id=
"propnums"
text=
"X8"
size=
"22"
horizontalCenter=
"0"
verticalCenter=
"0"
verticalAlign=
"middle"
textAlign=
"center"
/>
</e:Group>
<e:Label
id=
"propnums2"
text=
"30"
textColor=
"0x885037"
bold=
"true"
y=
"564.95"
width=
"75"
textAlign=
"right"
x=
"287.16"
visible=
"false"
/>
<e:Button
id=
"closeBtn"
label=
""
x=
"
604.96"
y=
"250
.18"
>
<e:Button
id=
"closeBtn"
label=
""
x=
"
588.96"
y=
"264
.18"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"closeCommonBtn_png"
source.down=
"closeCommonBtn_png"
source.disabled=
"closeCommonBtn_png"
/>
...
...
egret/src/mainScene/MainScene.ts
View file @
4368020e
...
...
@@ -281,6 +281,7 @@ export default class MainScene extends Scene {
this
.
initLattices
();
//初始化回收口,如果是棒棒糖关卡,那么在地图底部增加棒棒糖洞,用到map
this
.
initRecycle
();
this
.
initConnectedLats
();
//初始化元素
this
.
initElement
();
//重置基础元素类型及特效
...
...
@@ -481,6 +482,32 @@ export default class MainScene extends Scene {
}
}
initConnectedLats
(){
if
(
!
this
.
chapterData
.
map
.
connectedLats
)
return
;
for
(
let
index
=
0
;
index
<
this
.
chapterData
.
map
.
connectedLats
.
length
;
index
++
)
{
const
[
p1
,
p2
]
=
this
.
chapterData
.
map
.
connectedLats
[
index
];
console
.
log
(
index
,
p1
,
p2
);
var
p
=
Tool
.
getPositionByIndex
(
p1
);
const
texture
:
egret
.
Texture
=
RES
.
getRes
(
'main_mapbottom_png'
);
const
img
=
new
eui
.
Image
(
texture
);
img
.
anchorOffsetX
=
texture
.
textureWidth
/
2
;
img
.
anchorOffsetY
=
texture
.
textureHeight
/
2
;
img
.
x
=
p
[
0
];
img
.
y
=
p
[
1
]
+
40
+
texture
.
textureHeight
/
2
;
this
.
map
.
addChild
(
img
);
var
pp
=
Tool
.
getPositionByIndex
(
p2
);
const
texture2
:
egret
.
Texture
=
RES
.
getRes
(
'main_mapbottom_png'
);
const
img2
=
new
eui
.
Image
(
texture2
);
img2
.
anchorOffsetX
=
texture2
.
textureWidth
/
2
;
img2
.
anchorOffsetY
=
texture2
.
textureHeight
/
2
;
img2
.
x
=
pp
[
0
];
img2
.
y
=
pp
[
1
]
-
40
-
texture2
.
textureHeight
/
2
;
this
.
map
.
addChild
(
img2
);
}
}
initRecycle
()
{
//以防万一,初始化下。不排除,目标元素不是棒棒糖的,但是元素里有棒棒糖的情况;
this
.
recycleIndexs
=
[];
...
...
egret/src/something/chapters/Chapter13.ts
View file @
4368020e
This diff is collapsed.
Click to expand it.
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