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
b9ab907e
Commit
b9ab907e
authored
Feb 17, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
675d34ee
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
17 deletions
+21
-17
Chapter17.ts
egret/src/something/chapters/Chapter17.ts
+3
-3
getChapter.ts
egret/src/something/chapters/getChapter.ts
+2
-0
Element.ts
egret/src/something/class/Element.ts
+1
-1
HoneyPot.ts
egret/src/something/class/HoneyPot.ts
+6
-12
HoneyPotElement.ts
egret/src/something/class/HoneyPotElement.ts
+9
-1
No files found.
egret/src/something/chapters/Chapter17.ts
View file @
b9ab907e
...
@@ -20,7 +20,7 @@ export const Chapters17: ChapterData[] = [
...
@@ -20,7 +20,7 @@ export const Chapters17: ChapterData[] = [
starScores
:
[
1000
,
5000
,
10000
],
starScores
:
[
1000
,
5000
,
10000
],
map
:
{
map
:
{
lattices
:
[
lattices
:
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
1
,
1
,
1
,
0
,
1
,
1
,
1
,
0
,
0
,
1
,
1
,
1
,
0
,
1
,
1
,
1
,
0
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
...
@@ -36,11 +36,11 @@ export const Chapters17: ChapterData[] = [
...
@@ -36,11 +36,11 @@ export const Chapters17: ChapterData[] = [
],
],
// connectedLats: [[0, 18], [1, 19], [2, 20]],
// connectedLats: [[0, 18], [1, 19], [2, 20]],
elements
:
[
elements
:
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
16
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
1
,
1
,
1
,
0
,
1
,
1
,
1
,
0
,
0
,
1
,
1
,
1
,
0
,
1
,
1
,
1
,
0
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
6
,
1
,
1
,
1
,
1
,
0
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
0
,
0
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
0
,
0
,
0
,
1
,
1
,
1
,
1
,
1
,
0
,
0
,
0
,
0
,
1
,
1
,
1
,
1
,
1
,
0
,
0
,
0
,
0
,
0
,
1
,
1
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
1
,
1
,
0
,
0
,
0
,
...
...
egret/src/something/chapters/getChapter.ts
View file @
b9ab907e
...
@@ -18,6 +18,7 @@ import { PassType } from "../enum/PassType";
...
@@ -18,6 +18,7 @@ import { PassType } from "../enum/PassType";
import
{
submitTran
}
from
"../enum/ElementType"
;
import
{
submitTran
}
from
"../enum/ElementType"
;
import
{
Chapters15
}
from
"./Chapter15"
;
import
{
Chapters15
}
from
"./Chapter15"
;
import
{
Chapters16
}
from
"./Chapter16"
;
import
{
Chapters16
}
from
"./Chapter16"
;
import
{
Chapters17
}
from
"./Chapter17"
;
//所有的关卡
//所有的关卡
const
chapters
:
ChapterData
[]
=
[].
concat
(
const
chapters
:
ChapterData
[]
=
[].
concat
(
...
@@ -37,6 +38,7 @@ const chapters: ChapterData[] = [].concat(
...
@@ -37,6 +38,7 @@ const chapters: ChapterData[] = [].concat(
Chapters14
,
Chapters14
,
Chapters15
,
Chapters15
,
Chapters16
,
Chapters16
,
Chapters17
,
)
)
// console.log(chapters)
// console.log(chapters)
chapters
.
forEach
((
chapter
,
index
)
=>
{
chapters
.
forEach
((
chapter
,
index
)
=>
{
...
...
egret/src/something/class/Element.ts
View file @
b9ab907e
...
@@ -253,7 +253,7 @@ export class Element extends eui.Component {
...
@@ -253,7 +253,7 @@ export class Element extends eui.Component {
/**
/**
* 显示的图片,直接改source,"ele"+type
* 显示的图片,直接改source,"ele"+type
*/
*/
pr
ivate
showImage
:
eui
.
Image
;
pr
otected
showImage
:
eui
.
Image
;
temEffectType
:
EffectType
=
null
;
temEffectType
:
EffectType
=
null
;
/**
/**
...
...
egret/src/something/class/HoneyPot.ts
View file @
b9ab907e
...
@@ -22,15 +22,15 @@ export class HoneyPot extends eui.Component {
...
@@ -22,15 +22,15 @@ export class HoneyPot extends eui.Component {
}
}
}
}
hide
(){
hide
()
{
this
.
_mv
.
scaleX
=
this
.
_mv
.
scaleY
=
0
;
this
.
_mv
.
scaleX
=
this
.
_mv
.
scaleY
=
0
;
}
}
resetStatus
()
{
resetStatus
()
{
this
.
addEvents
();
this
.
addEvents
();
this
.
_statusNum
=
0
;
this
.
_statusNum
=
0
;
this
.
_mv
.
gotoAndPlay
(
1
);
this
.
_mv
.
gotoAndPlay
(
1
);
egret
.
Tween
.
get
(
this
.
_mv
).
to
({
scaleY
:
1
,
scaleX
:
1
},
500
,
egret
.
Ease
.
backOut
).
call
(()
=>
{
egret
.
Tween
.
get
(
this
.
_mv
).
to
({
scaleY
:
1
,
scaleX
:
1
},
500
,
egret
.
Ease
.
backOut
).
call
(()
=>
{
this
.
changeSource
();
this
.
changeSource
();
})
})
}
}
...
@@ -43,22 +43,16 @@ export class HoneyPot extends eui.Component {
...
@@ -43,22 +43,16 @@ export class HoneyPot extends eui.Component {
* 状态变化 0,1,2,3
* 状态变化 0,1,2,3
*/
*/
private
_statusNum
:
number
;
private
_statusNum
:
number
;
res
:
ElementType
;
_mv
;
_mv
;
getRes
()
{
constructor
(
n
:
number
=
0
)
{
return
`ele
${
this
.
res
}
_
${
this
.
_statusNum
}
_png`
;
}
type
;
constructor
(
res
:
ElementType
,
type
:
number
,
n
:
number
=
0
)
{
super
();
super
();
this
.
res
=
res
;
this
.
type
=
type
;
this
.
_statusNum
=
n
;
this
.
_statusNum
=
n
;
this
.
initSvga
();
this
.
initSvga
();
}
}
async
initSvga
()
{
async
initSvga
()
{
const
mv
:
any
=
await
loadSvga
(
getResPath
()
+
'resource/assets/svgas/monster
'
+
this
.
type
+
'
.svga'
);
const
mv
:
any
=
await
loadSvga
(
getResPath
()
+
'resource/assets/svgas/monster
0
.svga'
);
this
.
_mv
=
mv
;
this
.
_mv
=
mv
;
this
.
addChild
(
mv
);
this
.
addChild
(
mv
);
mv
.
anchorOffsetX
=
87
/
2
;
mv
.
anchorOffsetX
=
87
/
2
;
...
...
egret/src/something/class/HoneyPotElement.ts
View file @
b9ab907e
import
{
Element
}
from
"./Element"
;
import
{
Element
}
from
"./Element"
;
import
{
ElementType
}
from
"../enum/ElementType"
;
import
{
Monster
}
from
"./Monster"
;
import
{
HoneyPot
}
from
"./HoneyPot"
;
export
default
class
HoneyPotElement
extends
Element
{
export
default
class
HoneyPotElement
extends
Element
{
honeyPot
:
HoneyPot
;
resetView
(){
resetView
(){
const
type
=
ElementType
.
HONEY_POT
;
this
.
honeyPot
=
new
HoneyPot
();
this
.
addChild
(
this
.
honeyPot
);
this
.
showImage
.
alpha
=
0
;
}
}
}
}
\ No newline at end of file
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