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
b2527834
Commit
b2527834
authored
Aug 23, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of gitlab2.dui88.com:wanghongyuan/xiaoxiaole into dev
parents
9dfaac5d
60f42201
Changes
3
Hide 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 @
b2527834
...
...
@@ -69,16 +69,16 @@ const baseScore = 20;
* 炸弹+炸弹(L+L) 4.0倍
* 魔力鸟+魔力鸟(5+5) 5.0倍
*/
const
effectBaseTimes
=
[
1.5
,
1.5
,
2
,
2.5
,
3
,
3.5
,
4
,
5
]
const
effectBaseTimes
=
{
0
:
1.5
,
1
:
1
.5
,
2
:
2
,
3
:
2.5
,
4
:
3
,
5
:
3.5
,
6
:
4
,
7
:
5
}
...
...
@@ -661,7 +661,6 @@ export default class MainScene extends Scene {
// }, PropType.CHANCE_NUM)
}
}
//使用道具逻辑
useProp
(
prop
:
PropType
)
{
//去掉移动提示侦听
...
...
@@ -685,9 +684,12 @@ export default class MainScene extends Scene {
}
let
fun
:
Function
;
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
);
var
index
=
e
.
target
.
parent
.
index
;
var
index
=
e
le
.
index
;
this
.
sendPropUse
(
prop
,
index
);
}
},
this
)
...
...
@@ -730,19 +732,25 @@ export default class MainScene extends Scene {
for
(
var
i
=
0
;
i
<
this
.
lattices
.
length
;
i
++
)
{
var
lat
=
this
.
lattices
[
i
];
if
(
Tool
.
judgeEliminate
(
lat
)
&&
(
lat
.
row
==
rc
[
0
]
||
lat
.
column
==
rc
[
1
]))
{
this
.
eliminatedElements
.
push
(
i
);
if
(
!
lat
.
element
.
isLock
)
{
//3倍
this
.
pushScoreAni
(
baseScore
*
1
*
3
,
Tool
.
getPositionByIndex
(
i
))
if
(
this
.
eliminatedElements
.
indexOf
(
i
)
==
-
1
)
{
this
.
eliminatedElements
.
push
(
i
);
if
(
!
lat
.
element
.
isLock
)
{
//3倍
this
.
pushScoreAni
(
baseScore
*
1
*
3
,
Tool
.
getPositionByIndex
(
i
))
}
}
}
}
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
eliminate
();
},
200
)
},
200
)
break
;
case
PropType
.
HAMMER
:
this
.
eliminatedElements
.
push
(
index
);
this
.
pushScoreAni
(
baseScore
*
1
*
(
effectBaseTimes
[
this
.
lattices
[
index
].
element
.
effectType
]
||
1
),
Tool
.
getPositionByIndex
(
index
)
)
this
.
eliminate
();
break
;
case
PropType
.
CHANCE_NUM
:
...
...
@@ -1947,11 +1955,15 @@ export default class MainScene extends Scene {
bonusShootAni
.
play
(
r
*
180
/
Math
.
PI
,
[
ele
.
x
,
ele
.
y
],
()
=>
{
ele
.
effectType
=
Math
.
random
()
>
0.5
?
EffectType
.
HORIZONTAL
:
EffectType
.
VERTICAL
;
count
++
;
this
.
eliminatedElements
.
push
(
ele
.
index
)
this
.
eliminatedElements
.
push
(
ele
.
index
);
this
.
pushScoreAni
(
baseScore
*
1
*
1.5
,
[
ele
.
x
,
ele
.
y
])
if
(
count
==
countAll
)
{
this
.
eliminate
();
//如果还有步数就置0
if
(
this
.
steps
)
this
.
steps
=
0
;
if
(
this
.
steps
)
{
this
.
score
+=
500
*
this
.
steps
;
this
.
steps
=
0
;
}
}
})
},
150
*
deltaCount
)
...
...
@@ -1981,15 +1993,15 @@ export default class MainScene extends Scene {
var
sv
:
string
;
if
(
this
.
oneStepScore
>
5000
)
{
playSound
(
SoundType
.
toast
);
sv
=
"wonderful"
sv
=
"wonderful"
;
}
else
if
(
this
.
oneStepScore
>
3000
)
{
playSound
(
SoundType
.
toast
);
sv
=
"
great"
sv
=
"
amazing"
;
}
else
if
(
this
.
oneStepScore
>
1000
)
{
playSound
(
SoundType
.
toast
);
sv
=
"
amazing"
sv
=
"
great"
;
}
if
(
sv
&&
this
.
movieClips
[
sv
])
{
this
.
addChild
(
this
.
movieClips
[
sv
])
...
...
egret/src/something/Chapters.ts
View file @
b2527834
...
...
@@ -9,17 +9,17 @@ export const Chapters: ChapterData[] = [
{
map
:
{
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
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
],
generateLats
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
],
generateLats
:
[
18
,
19
,
20
,
21
,
22
,
23
,
24
,
25
,
26
],
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"
],
...
...
@@ -597,5 +597,34 @@ export const Chapters: ChapterData[] = [
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 @
b2527834
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