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
34378a67
Commit
34378a67
authored
Aug 24, 2019
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l
parent
e80745b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
52 deletions
+59
-52
MainScene.ts
egret/src/mainScene/MainScene.ts
+44
-37
Chapters.ts
egret/src/something/Chapters.ts
+15
-15
No files found.
egret/src/mainScene/MainScene.ts
View file @
34378a67
...
...
@@ -693,7 +693,7 @@ export default class MainScene extends Scene {
sendPropUse
(
prop
:
PropType
,
index
?:
number
)
{
Loading2
.
instace
.
show
();
this
.
removeChild
(
this
.
propGuide
);
NetManager
.
ins
.
hc_useProp
((
s
)
=>
{
NetManager
.
ins
.
hc_useProp
((
s
,
data
)
=>
{
Loading2
.
instace
.
hide
();
//还原事件
this
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
...
...
@@ -704,47 +704,54 @@ export default class MainScene extends Scene {
}
else
{
this
.
removeChild
(
this
.
stepCircle
)
}
if
(
!
s
)
return
//成功的
switch
(
prop
)
{
case
PropType
.
BOOM
:
playSound
(
SoundType
.
line
)
var
rc
=
Tool
.
indexToRc
(
index
);
var
p
=
Tool
.
getPositionByIndex
(
index
);
this
.
playAni
(
RecoverName
.
CROSS_ANI
,
p
);
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
]))
{
if
(
this
.
eliminatedElements
.
indexOf
(
i
)
==
-
1
)
{
this
.
eliminatedElements
.
push
(
i
);
if
(
!
lat
.
element
.
isLock
)
{
//3倍
this
.
pushScoreAni
(
baseScore
*
1
*
3
,
Tool
.
getPositionByIndex
(
i
))
if
(
s
)
{
//成功的
switch
(
prop
)
{
case
PropType
.
BOOM
:
playSound
(
SoundType
.
line
)
var
rc
=
Tool
.
indexToRc
(
index
);
var
p
=
Tool
.
getPositionByIndex
(
index
);
this
.
playAni
(
RecoverName
.
CROSS_ANI
,
p
);
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
]))
{
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
)
break
;
case
PropType
.
HAMMER
:
this
.
eliminatedElements
.
push
(
index
);
this
.
pushScoreAni
(
baseScore
*
1
*
(
effectBaseTimes
[
this
.
lattices
[
index
].
element
.
effectType
]
||
1
),
Tool
.
getPositionByIndex
(
index
)
)
this
.
eliminate
();
},
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
:
this
.
steps
+=
5
;
showToast
(
"步数增加成功"
);
break
;
break
;
case
PropType
.
CHANCE_NUM
:
this
.
steps
+=
5
;
showToast
(
"步数增加成功"
);
break
;
}
}
else
{
//失败的话,要继续能点击
this
.
enableMouseEvt
(
true
)
}
if
(
data
)
{
//如果有返回数据,没有说明是网络问题,不发home
//更新道具数量
NetManager
.
ins
.
hc_home
(()
=>
{
this
.
updateScene
();
},
window
[
'collectRuleId'
]);
}
//更新道具数量
NetManager
.
ins
.
hc_home
(()
=>
{
this
.
updateScene
();
},
window
[
'collectRuleId'
]);
},
prop
)
}
mouseDownE
(
e
:
egret
.
TextEvent
)
{
...
...
egret/src/something/Chapters.ts
View file @
34378a67
...
...
@@ -1020,34 +1020,34 @@ export const Chapters: ChapterData[] = [
{
map
:
{
lattices
:
[
1
,
1
,
4
,
1
,
1
,
1
,
1
,
1
,
4
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
0
,
0
,
1
,
0
,
0
,
1
,
1
,
1
,
1
,
0
,
1
,
1
,
1
,
0
,
1
,
1
,
1
,
1
,
0
,
1
,
1
,
1
,
0
,
1
,
1
,
1
,
1
,
0
,
1
,
1
,
1
,
0
,
1
,
1
,
1
,
1
,
0
,
0
,
1
,
0
,
0
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
3
,
3
,
3
,
3
,
3
,
1
,
1
,
0
,
1
,
3
,
3
,
0
,
3
,
3
,
1
,
0
,
1
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
1
,
1
,
3
,
3
,
3
,
0
,
3
,
3
,
3
,
1
,
1
,
3
,
3
,
3
,
0
,
3
,
3
,
3
,
1
,
1
,
3
,
3
,
3
,
0
,
3
,
3
,
3
,
1
,
1
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
1
,
0
,
1
,
3
,
3
,
0
,
3
,
3
,
1
,
0
,
1
,
1
,
3
,
3
,
3
,
3
,
3
,
1
,
1
,
],
generateLats
:
[
0
,
1
,
2
,
3
,
5
,
6
,
7
,
8
],
},
baseElementTypes
:
[
0
,
1
,
2
,
3
,
4
],
effectInitProbability
:
0.05
,
stepCount
:
30
,
stepCount
:
63
,
passTarget
:
{
type
:
PassType
.
ELEMENT_TARGET
,
elements
:
[
{
type
:
ElementType
.
LOLLIPOP
,
count
:
7
type
:
ElementType
.
ICE
,
count
:
50
}
],
},
starScores
:
[
15
000
,
3
0000
,
45
000
60
000
,
12
0000
,
150
000
]
},
]
\ 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