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
8166e310
Commit
8166e310
authored
Feb 17, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
ebbe3280
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
430 additions
and
67 deletions
+430
-67
index.html
egret/index.html
+2
-2
MainScene.ts
egret/src/mainScene/MainScene.ts
+9
-0
Tool.ts
egret/src/something/Tool.ts
+8
-1
Chapter16 copy.ts
egret/src/something/chapters/Chapter16 copy.ts
+0
-63
Chapter17.ts
egret/src/something/chapters/Chapter17.ts
+63
-0
Element.ts
egret/src/something/class/Element.ts
+1
-0
HoneyPot.ts
egret/src/something/class/HoneyPot.ts
+88
-0
HoneyPotElement.ts
egret/src/something/class/HoneyPotElement.ts
+7
-0
ElementConfigType.ts
egret/src/something/enum/ElementConfigType.ts
+1
-0
home.json
mock/happyclear/home.json
+125
-0
homemax.json
mock/happyclear/homemax.json
+126
-1
No files found.
egret/index.html
View file @
8166e310
...
@@ -138,8 +138,8 @@
...
@@ -138,8 +138,8 @@
// localStorage.clear();
// localStorage.clear();
window
[
'imgver'
]
=
'11112'
;
window
[
'imgver'
]
=
'11112'
;
//top 8 ,repeat 22 , bottom 3
//top 8 ,repeat 22 , bottom 3
window
[
'total_level'
]
=
8
+
3
+
22
*
2
0
;
window
[
'total_level'
]
=
8
+
3
+
22
*
2
1
;
window
[
'last_level'
]
=
4
25
;
window
[
'last_level'
]
=
4
50
;
var
sharePic
=
document
.
getElementById
(
'pic'
);
var
sharePic
=
document
.
getElementById
(
'pic'
);
...
...
egret/src/mainScene/MainScene.ts
View file @
8166e310
...
@@ -96,6 +96,7 @@ import { NetManager } from './../../libs/tw/manager/NetManager';
...
@@ -96,6 +96,7 @@ import { NetManager } from './../../libs/tw/manager/NetManager';
import
doMonsterAI
from
'./doMonsterAI'
;
import
doMonsterAI
from
'./doMonsterAI'
;
import
jellyMonsterAI
from
'./jellyMonsterAI'
;
import
jellyMonsterAI
from
'./jellyMonsterAI'
;
import
doFishAI
from
'./doFishAI'
;
import
doFishAI
from
'./doFishAI'
;
import
HoneyPotElement
from
'../something/class/HoneyPotElement'
;
const
aniClass
=
{
const
aniClass
=
{
"BoomAni"
:
BoomAni
,
"BoomAni"
:
BoomAni
,
...
@@ -760,6 +761,14 @@ export default class MainScene extends Scene {
...
@@ -760,6 +761,14 @@ export default class MainScene extends Scene {
this
.
lattices
[
i
].
element
=
monster
;
this
.
lattices
[
i
].
element
=
monster
;
monster
.
resetMonster
();
monster
.
resetMonster
();
break
;
break
;
case
ElementConfigType
.
HONEY_POT
:
let
honeyPot
:
Element
=
Tool
.
getElement
(
ElementType
.
HONEY_POT
);
honeyPot
.
x
=
p
[
0
];
honeyPot
.
y
=
p
[
1
];
this
.
elementContainer
.
addChild
(
honeyPot
);
this
.
lattices
[
i
].
element
=
honeyPot
;
honeyPot
.
resetView
();
break
;
//烟花
//烟花
case
ElementConfigType
.
FIREWORKS
:
case
ElementConfigType
.
FIREWORKS
:
let
fireworks
:
Element
=
Tool
.
getElement
(
ElementType
.
FIREWORKS_SHOOTER
)
let
fireworks
:
Element
=
Tool
.
getElement
(
ElementType
.
FIREWORKS_SHOOTER
)
...
...
egret/src/something/Tool.ts
View file @
8166e310
...
@@ -8,6 +8,7 @@ import { StateType } from "./enum/StateType";
...
@@ -8,6 +8,7 @@ import { StateType } from "./enum/StateType";
import
{
FallType
}
from
"./interface/FallAniData"
;
import
{
FallType
}
from
"./interface/FallAniData"
;
import
{
GenerateLatData
}
from
"./interface/GenerateLatData"
;
import
{
GenerateLatData
}
from
"./interface/GenerateLatData"
;
import
{
Pool
}
from
"./Pool"
;
import
{
Pool
}
from
"./Pool"
;
import
HoneyPotElement
from
"./class/HoneyPotElement"
;
//两种,0无棒棒糖,1有
//两种,0无棒棒糖,1有
const
offsetYTwo
:
number
[]
=
[];
const
offsetYTwo
:
number
[]
=
[];
...
@@ -1077,8 +1078,14 @@ export class Tool {
...
@@ -1077,8 +1078,14 @@ export class Tool {
* @param type
* @param type
*/
*/
public
static
getElement
(
type
:
ElementType
):
Element
{
public
static
getElement
(
type
:
ElementType
):
Element
{
const
clsMap
=
{};
clsMap
[
ElementType
.
HONEY_POT
]
=
HoneyPotElement
;
const
cls
=
clsMap
[
type
];
let
obj
:
Element
=
Pool
.
takeOut
(
RecoverName
.
ELEMENT
);
let
obj
:
Element
=
Pool
.
takeOut
(
RecoverName
.
ELEMENT
);
if
(
!
obj
)
{
if
(
!
obj
)
{
if
(
cls
)
obj
=
new
cls
(
type
);
else
obj
=
new
Element
(
type
)
obj
=
new
Element
(
type
)
}
else
{
}
else
{
obj
.
reset
(
type
)
obj
.
reset
(
type
)
...
...
egret/src/something/chapters/Chapter16 copy.ts
deleted
100644 → 0
View file @
ebbe3280
import
{
ChapterData
}
from
"../interface/ChapterData"
;
import
{
PassType
}
from
"../enum/PassType"
;
import
{
ElementType
}
from
"../enum/ElementType"
;
//401-425
export
const
Chapters16
:
ChapterData
[]
=
[
//1引导基本消除
{
baseElementTypes
:
[
0
,
1
,
2
,
3
],
bubbleProbability
:
0
,
stepCount
:
25
,
passTarget
:
{
type
:
PassType
.
ELEMENT_TARGET
,
elements
:
[
{
type
:
ElementType
.
CHICKEN
,
count
:
45
,
},
],
},
starScores
:
[
1000
,
5000
,
10000
],
map
:
{
lattices
:
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
1
,
0
,
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
,
0
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
0
,
0
,
0
,
1
,
1
,
1
,
1
,
1
,
0
,
0
,
0
,
0
,
0
,
1
,
1
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
],
generateLats
:
[
{
index
:
11
,
type
:
[
0
],
cus
:
[]
},
{
index
:
15
,
type
:
[
0
],
cus
:
[]
},
],
// connectedLats: [[0, 18], [1, 19], [2, 20]],
elements
:
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
1
,
1
,
1
,
0
,
1
,
1
,
1
,
0
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
15
,
1
,
1
,
1
,
1
,
0
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
0
,
0
,
0
,
1
,
1
,
1
,
1
,
1
,
0
,
0
,
0
,
0
,
0
,
1
,
1
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
],
baseElements
:
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
20
,
0
,
0
,
0
,
20
,
0
,
0
,
0
,
20
,
10
,
20
,
0
,
20
,
10
,
20
,
0
,
20
,
10
,
20
,
10
,
20
,
10
,
20
,
10
,
20
,
20
,
10
,
20
,
20
,
10
,
20
,
20
,
10
,
20
,
0
,
20
,
10
,
20
,
10
,
20
,
10
,
20
,
0
,
0
,
0
,
20
,
10
,
20
,
10
,
20
,
0
,
0
,
0
,
0
,
0
,
20
,
10
,
20
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
20
,
0
,
0
,
0
,
0
,
],
// recycles: [70, 71, 72, 73]
},
},
]
\ No newline at end of file
egret/src/something/chapters/Chapter17.ts
0 → 100644
View file @
8166e310
import
{
ChapterData
}
from
"../interface/ChapterData"
;
import
{
PassType
}
from
"../enum/PassType"
;
import
{
ElementType
}
from
"../enum/ElementType"
;
//426-450
export
const
Chapters17
:
ChapterData
[]
=
[
//426
{
baseElementTypes
:
[
0
,
1
,
2
,
3
],
bubbleProbability
:
0
,
stepCount
:
25
,
passTarget
:
{
type
:
PassType
.
ELEMENT_TARGET
,
elements
:
[
{
type
:
ElementType
.
CHICKEN
,
count
:
45
,
},
],
},
starScores
:
[
1000
,
5000
,
10000
],
map
:
{
lattices
:
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
1
,
0
,
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
,
0
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
0
,
0
,
0
,
1
,
1
,
1
,
1
,
1
,
0
,
0
,
0
,
0
,
0
,
1
,
1
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
],
generateLats
:
[
{
index
:
11
,
type
:
[
0
],
cus
:
[]
},
{
index
:
15
,
type
:
[
0
],
cus
:
[]
},
],
// connectedLats: [[0, 18], [1, 19], [2, 20]],
elements
:
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
1
,
0
,
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
,
0
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
0
,
0
,
0
,
1
,
1
,
1
,
1
,
1
,
0
,
0
,
0
,
0
,
0
,
1
,
1
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
],
baseElements
:
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
20
,
0
,
0
,
0
,
20
,
0
,
0
,
0
,
20
,
10
,
20
,
0
,
20
,
10
,
20
,
0
,
20
,
10
,
20
,
10
,
20
,
10
,
20
,
10
,
20
,
20
,
10
,
20
,
20
,
10
,
20
,
20
,
10
,
20
,
0
,
20
,
10
,
20
,
10
,
20
,
10
,
20
,
0
,
0
,
0
,
20
,
10
,
20
,
10
,
20
,
0
,
0
,
0
,
0
,
0
,
20
,
10
,
20
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
20
,
0
,
0
,
0
,
0
,
],
// recycles: [70, 71, 72, 73]
},
}
]
\ No newline at end of file
egret/src/something/class/Element.ts
View file @
8166e310
...
@@ -667,4 +667,5 @@ export class Element extends eui.Component {
...
@@ -667,4 +667,5 @@ export class Element extends eui.Component {
return
ele
return
ele
}
}
get
candy
()
{
return
this
.
_candy
}
get
candy
()
{
return
this
.
_candy
}
resetView
(){}
}
}
\ No newline at end of file
egret/src/something/class/HoneyPot.ts
0 → 100644
View file @
8166e310
import
{
ElementType
}
from
"../enum/ElementType"
;
import
{
loadSvga
}
from
"../../loadSvga"
;
import
getResPath
from
"../../../libs/new_tc/getResPath"
;
import
{
createMonsterStatusAni
}
from
"../../effect/createMonsterStatusAni"
;
const
frames
=
[
[
1
,
120
],
[
121
,
360
],
[
361
,
600
],
[
601
,
960
],
];
export
class
HoneyPot
extends
eui
.
Component
{
async
nextStatus
()
{
this
.
_statusNum
++
;
if
(
this
.
_statusNum
>
4
)
{
this
.
_statusNum
=
4
;
this
.
removeEvents
();
}
//播放动画,动画时间要短200ms以内
if
(
this
.
_statusNum
<=
3
)
{
createMonsterStatusAni
(
this
.
x
,
this
.
y
,
this
.
parent
);
this
.
changeSource
();
}
}
hide
(){
this
.
_mv
.
scaleX
=
this
.
_mv
.
scaleY
=
0
;
}
resetStatus
()
{
this
.
addEvents
();
this
.
_statusNum
=
0
;
this
.
_mv
.
gotoAndPlay
(
1
);
egret
.
Tween
.
get
(
this
.
_mv
).
to
({
scaleY
:
1
,
scaleX
:
1
},
500
,
egret
.
Ease
.
backOut
).
call
(()
=>
{
this
.
changeSource
();
})
}
get
active
():
boolean
{
return
this
.
_statusNum
==
4
;
}
/**
* 状态变化 0,1,2,3
*/
private
_statusNum
:
number
;
res
:
ElementType
;
_mv
;
getRes
()
{
return
`ele
${
this
.
res
}
_
${
this
.
_statusNum
}
_png`
;
}
type
;
constructor
(
res
:
ElementType
,
type
:
number
,
n
:
number
=
0
)
{
super
();
this
.
res
=
res
;
this
.
type
=
type
;
this
.
_statusNum
=
n
;
this
.
initSvga
();
}
async
initSvga
()
{
const
mv
:
any
=
await
loadSvga
(
getResPath
()
+
'resource/assets/svgas/monster'
+
this
.
type
+
'.svga'
);
this
.
_mv
=
mv
;
this
.
addChild
(
mv
);
mv
.
anchorOffsetX
=
87
/
2
;
mv
.
anchorOffsetY
=
92
/
2
;
this
.
addEvents
();
this
.
changeSource
();
}
private
addEvents
()
{
this
.
_mv
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
}
onEnterFrame
()
{
if
(
this
.
_statusNum
<=
3
&&
this
.
_mv
.
currentFrame
==
frames
[
this
.
_statusNum
][
1
])
{
this
.
_mv
.
gotoAndPlay
(
frames
[
this
.
_statusNum
][
0
]);
}
}
removeEvents
()
{
this
.
_mv
.
removeEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
}
changeSource
()
{
if
(
this
.
_mv
)
this
.
_mv
.
gotoAndPlay
(
frames
[
this
.
_statusNum
][
0
]);
}
}
\ No newline at end of file
egret/src/something/class/HoneyPotElement.ts
0 → 100644
View file @
8166e310
import
{
Element
}
from
"./Element"
;
export
default
class
HoneyPotElement
extends
Element
{
resetView
(){
}
}
\ No newline at end of file
egret/src/something/enum/ElementConfigType.ts
View file @
8166e310
...
@@ -65,4 +65,5 @@ export enum ElementConfigType {
...
@@ -65,4 +65,5 @@ export enum ElementConfigType {
* 汽鼓鱼
* 汽鼓鱼
*/
*/
FISH
=
15
,
FISH
=
15
,
HONEY_POT
=
16
,
}
}
\ No newline at end of file
mock/happyclear/home.json
View file @
8166e310
...
@@ -2137,6 +2137,131 @@
...
@@ -2137,6 +2137,131 @@
"levelNum"
:
425
,
"levelNum"
:
425
,
"maxScore"
:
47440
,
"maxScore"
:
47440
,
"stars"
:
1
"stars"
:
1
},
{
"levelNum"
:
426
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
427
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
428
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
429
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
430
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
431
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
432
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
433
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
434
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
435
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
436
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
437
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
438
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
439
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
440
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
441
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
442
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
443
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
444
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
445
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
446
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
447
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
448
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
449
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
450
,
"maxScore"
:
47440
,
"stars"
:
1
}
}
],
],
...
...
mock/happyclear/homemax.json
View file @
8166e310
...
@@ -2137,6 +2137,131 @@
...
@@ -2137,6 +2137,131 @@
"levelNum"
:
425
,
"levelNum"
:
425
,
"maxScore"
:
47440
,
"maxScore"
:
47440
,
"stars"
:
1
"stars"
:
1
},
{
"levelNum"
:
426
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
427
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
428
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
429
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
430
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
431
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
432
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
433
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
434
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
435
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
436
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
437
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
438
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
439
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
440
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
441
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
442
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
443
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
444
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
445
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
446
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
447
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
448
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
449
,
"maxScore"
:
47440
,
"stars"
:
1
},
{
"levelNum"
:
450
,
"maxScore"
:
47440
,
"stars"
:
1
}
}
],
],
...
...
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