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
60f42201
Commit
60f42201
authored
Aug 23, 2019
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l
parent
7bc95486
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
30 deletions
+79
-30
MainScene.ts
egret/src/mainScene/MainScene.ts
+36
-24
Chapters.ts
egret/src/something/Chapters.ts
+35
-6
BonusTime.ts
egret/src/something/uis/BonusTime.ts
+8
-0
No files found.
egret/src/mainScene/MainScene.ts
View file @
60f42201
...
@@ -68,16 +68,16 @@ const baseScore = 20;
...
@@ -68,16 +68,16 @@ const baseScore = 20;
* 炸弹+炸弹(L+L) 4.0倍
* 炸弹+炸弹(L+L) 4.0倍
* 魔力鸟+魔力鸟(5+5) 5.0倍
* 魔力鸟+魔力鸟(5+5) 5.0倍
*/
*/
const
effectBaseTimes
=
[
const
effectBaseTimes
=
{
1.5
,
0
:
1.5
,
1.5
,
1
:
1
.5
,
2
,
2
:
2
,
2.5
,
3
:
2.5
,
3
,
4
:
3
,
3.5
,
5
:
3.5
,
4
,
6
:
4
,
5
7
:
5
]
}
...
@@ -660,7 +660,6 @@ export default class MainScene extends Scene {
...
@@ -660,7 +660,6 @@ export default class MainScene extends Scene {
// }, PropType.CHANCE_NUM)
// }, PropType.CHANCE_NUM)
}
}
}
}
//使用道具逻辑
//使用道具逻辑
useProp
(
prop
:
PropType
)
{
useProp
(
prop
:
PropType
)
{
//去掉移动提示侦听
//去掉移动提示侦听
...
@@ -684,9 +683,12 @@ export default class MainScene extends Scene {
...
@@ -684,9 +683,12 @@ export default class MainScene extends Scene {
}
}
let
fun
:
Function
;
let
fun
:
Function
;
this
.
elementContainer
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_BEGIN
,
fun
=
function
(
e
)
{
this
.
elementContainer
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_BEGIN
,
fun
=
function
(
e
)
{
if
(
e
.
target
.
parent
instanceof
Element
&&
e
.
target
.
parent
.
type
!=
ElementType
.
ROCK
)
{
var
ele
=
e
.
target
.
parent
if
(
ele
instanceof
Element
&&
ele
.
type
!=
ElementType
.
ROCK
&&
ele
.
type
!=
ElementType
.
LOLLIPOP
)
{
this
.
elementContainer
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_BEGIN
,
fun
,
this
);
this
.
elementContainer
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_BEGIN
,
fun
,
this
);
var
index
=
e
.
target
.
parent
.
index
;
var
index
=
e
le
.
index
;
this
.
sendPropUse
(
prop
,
index
);
this
.
sendPropUse
(
prop
,
index
);
}
}
},
this
)
},
this
)
...
@@ -729,6 +731,7 @@ export default class MainScene extends Scene {
...
@@ -729,6 +731,7 @@ export default class MainScene extends Scene {
for
(
var
i
=
0
;
i
<
this
.
lattices
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
this
.
lattices
.
length
;
i
++
)
{
var
lat
=
this
.
lattices
[
i
];
var
lat
=
this
.
lattices
[
i
];
if
(
Tool
.
judgeEliminate
(
lat
)
&&
(
lat
.
row
==
rc
[
0
]
||
lat
.
column
==
rc
[
1
]))
{
if
(
Tool
.
judgeEliminate
(
lat
)
&&
(
lat
.
row
==
rc
[
0
]
||
lat
.
column
==
rc
[
1
]))
{
if
(
this
.
eliminatedElements
.
indexOf
(
i
)
==
-
1
)
{
this
.
eliminatedElements
.
push
(
i
);
this
.
eliminatedElements
.
push
(
i
);
if
(
!
lat
.
element
.
isLock
)
{
if
(
!
lat
.
element
.
isLock
)
{
//3倍
//3倍
...
@@ -736,12 +739,17 @@ export default class MainScene extends Scene {
...
@@ -736,12 +739,17 @@ export default class MainScene extends Scene {
}
}
}
}
}
}
setTimeout
(()
=>
{
}
setTimeout
(()
=>
{
this
.
eliminate
();
this
.
eliminate
();
},
200
)
},
200
)
break
;
break
;
case
PropType
.
HAMMER
:
case
PropType
.
HAMMER
:
this
.
eliminatedElements
.
push
(
index
);
this
.
eliminatedElements
.
push
(
index
);
this
.
pushScoreAni
(
baseScore
*
1
*
(
effectBaseTimes
[
this
.
lattices
[
index
].
element
.
effectType
]
||
1
),
Tool
.
getPositionByIndex
(
index
)
)
this
.
eliminate
();
this
.
eliminate
();
break
;
break
;
case
PropType
.
CHANCE_NUM
:
case
PropType
.
CHANCE_NUM
:
...
@@ -1946,11 +1954,15 @@ export default class MainScene extends Scene {
...
@@ -1946,11 +1954,15 @@ export default class MainScene extends Scene {
bonusShootAni
.
play
(
r
*
180
/
Math
.
PI
,
[
ele
.
x
,
ele
.
y
],
()
=>
{
bonusShootAni
.
play
(
r
*
180
/
Math
.
PI
,
[
ele
.
x
,
ele
.
y
],
()
=>
{
ele
.
effectType
=
Math
.
random
()
>
0.5
?
EffectType
.
HORIZONTAL
:
EffectType
.
VERTICAL
;
ele
.
effectType
=
Math
.
random
()
>
0.5
?
EffectType
.
HORIZONTAL
:
EffectType
.
VERTICAL
;
count
++
;
count
++
;
this
.
eliminatedElements
.
push
(
ele
.
index
)
this
.
eliminatedElements
.
push
(
ele
.
index
);
this
.
pushScoreAni
(
baseScore
*
1
*
1.5
,
[
ele
.
x
,
ele
.
y
])
if
(
count
==
countAll
)
{
if
(
count
==
countAll
)
{
this
.
eliminate
();
this
.
eliminate
();
//如果还有步数就置0
//如果还有步数就置0
if
(
this
.
steps
)
this
.
steps
=
0
;
if
(
this
.
steps
)
{
this
.
score
+=
500
*
this
.
steps
;
this
.
steps
=
0
;
}
}
}
})
})
},
150
*
deltaCount
)
},
150
*
deltaCount
)
...
@@ -1980,15 +1992,15 @@ export default class MainScene extends Scene {
...
@@ -1980,15 +1992,15 @@ export default class MainScene extends Scene {
var
sv
:
string
;
var
sv
:
string
;
if
(
this
.
oneStepScore
>
5000
)
{
if
(
this
.
oneStepScore
>
5000
)
{
playSound
(
SoundType
.
toast
);
playSound
(
SoundType
.
toast
);
sv
=
"wonderful"
sv
=
"wonderful"
;
}
}
else
if
(
this
.
oneStepScore
>
3000
)
{
else
if
(
this
.
oneStepScore
>
3000
)
{
playSound
(
SoundType
.
toast
);
playSound
(
SoundType
.
toast
);
sv
=
"
great"
sv
=
"
amazing"
;
}
}
else
if
(
this
.
oneStepScore
>
1000
)
{
else
if
(
this
.
oneStepScore
>
1000
)
{
playSound
(
SoundType
.
toast
);
playSound
(
SoundType
.
toast
);
sv
=
"
amazing"
sv
=
"
great"
;
}
}
if
(
sv
&&
this
.
movieClips
[
sv
])
{
if
(
sv
&&
this
.
movieClips
[
sv
])
{
this
.
addChild
(
this
.
movieClips
[
sv
])
this
.
addChild
(
this
.
movieClips
[
sv
])
...
...
egret/src/something/Chapters.ts
View file @
60f42201
...
@@ -9,17 +9,17 @@ export const Chapters: ChapterData[] = [
...
@@ -9,17 +9,17 @@ export const Chapters: ChapterData[] = [
{
{
map
:
{
map
:
{
lattices
:
[
lattices
:
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
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
,
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
,
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
,
1
,
1
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
],
],
generateLats
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
],
generateLats
:
[
18
,
19
,
20
,
21
,
22
,
23
,
24
,
25
,
26
],
paths
:
[
paths
:
[
{
{
indexs
:
[
"0_l_u"
,
"8_r_u"
,
"80_r_d"
,
"72_l_d"
,
"63_l_u"
,
"63_r_u"
,
"54_r_u"
,
"54_l_u"
],
indexs
:
[
"0_l_u"
,
"8_r_u"
,
"80_r_d"
,
"72_l_d"
,
"63_l_u"
,
"63_r_u"
,
"54_r_u"
,
"54_l_u"
],
...
@@ -597,5 +597,34 @@ export const Chapters: ChapterData[] = [
...
@@ -597,5 +597,34 @@ export const Chapters: ChapterData[] = [
starScores
:
[
11000
,
22000
,
45000
]
starScores
:
[
11000
,
22000
,
45000
]
},
},
//////////////////////
//////////////////////
//第二十一关
{
map
:
{
lattices
:
[
0
,
0
,
0
,
1
,
4
,
1
,
0
,
0
,
0
,
1
,
2
,
5
,
1
,
1
,
1
,
5
,
2
,
1
,
1
,
2
,
5
,
1
,
1
,
1
,
5
,
2
,
1
,
1
,
5
,
5
,
1
,
1
,
1
,
5
,
5
,
1
,
1
,
1
,
2
,
1
,
1
,
1
,
2
,
1
,
1
,
2
,
2
,
2
,
1
,
1
,
1
,
2
,
2
,
2
,
2
,
5
,
5
,
2
,
2
,
2
,
5
,
5
,
2
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
1
,
1
,
1
,
1
,
1
,
0
,
2
,
5
,
2
,
],
generateLats
:
[
3
,
4
,
5
],
},
baseElementTypes
:
[
0
,
1
,
2
,
3
,
4
],
effectInitProbability
:
0.05
,
stepCount
:
46
,
passTarget
:
{
type
:
PassType
.
ELEMENT_TARGET
,
elements
:
[
{
type
:
ElementType
.
ICE
,
count
:
22
}
]
},
starScores
:
[
11000
,
22000
,
45000
]
},
]
]
\ No newline at end of file
egret/src/something/uis/BonusTime.ts
0 → 100644
View file @
60f42201
export
class
BonusTime
extends
egret
.
Bitmap
{
constructor
(
value
?:
egret
.
Texture
){
super
();
new
egret
.
Bitmap
()
}
}
\ 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