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
a33792f6
Commit
a33792f6
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
8f3f6e43
b835f9d0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
9 deletions
+36
-9
MainScene.ts
egret/src/mainScene/MainScene.ts
+35
-9
Chapters.ts
egret/src/something/Chapters.ts
+1
-0
No files found.
egret/src/mainScene/MainScene.ts
View file @
a33792f6
...
@@ -58,7 +58,7 @@ const aniClass = {
...
@@ -58,7 +58,7 @@ const aniClass = {
"EleDisAni"
:
EleDisAni
,
"EleDisAni"
:
EleDisAni
,
"MagicLionAni"
:
MagicLionAni
,
"MagicLionAni"
:
MagicLionAni
,
}
}
const
baseScore
=
20
;
const
baseScore
=
20
;
/**
/**
* 直线特效(4) 1.5倍
* 直线特效(4) 1.5倍
* 爆炸特效(L) 2.0倍
* 爆炸特效(L) 2.0倍
...
@@ -683,9 +683,12 @@ export default class MainScene extends Scene {
...
@@ -683,9 +683,12 @@ export default class MainScene extends Scene {
this
.
choosed
.
parent
.
removeChild
(
this
.
choosed
)
this
.
choosed
.
parent
.
removeChild
(
this
.
choosed
)
}
}
let
fun
:
Function
;
let
fun
:
Function
;
this
.
elementContainer
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_BEGIN
,
fun
=
function
()
{
this
.
elementContainer
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_BEGIN
,
fun
=
function
(
e
)
{
if
(
e
.
target
.
parent
instanceof
Element
&&
e
.
target
.
parent
.
type
!=
ElementType
.
ROCK
)
{
this
.
elementContainer
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_BEGIN
,
fun
,
this
);
this
.
elementContainer
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_BEGIN
,
fun
,
this
);
this
.
sendPropUse
(
prop
);
var
index
=
e
.
target
.
parent
.
index
;
this
.
sendPropUse
(
prop
,
index
);
}
},
this
)
},
this
)
}
else
{
}
else
{
if
(
!
this
.
stepCircle
)
{
if
(
!
this
.
stepCircle
)
{
...
@@ -701,7 +704,7 @@ export default class MainScene extends Scene {
...
@@ -701,7 +704,7 @@ export default class MainScene extends Scene {
this
.
addChild
(
this
.
stepCircle
)
this
.
addChild
(
this
.
stepCircle
)
}
}
}
}
sendPropUse
(
prop
:
PropType
)
{
sendPropUse
(
prop
:
PropType
,
index
?:
number
)
{
Loading2
.
instace
.
show
();
Loading2
.
instace
.
show
();
this
.
removeChild
(
this
.
propGuide
);
this
.
removeChild
(
this
.
propGuide
);
NetManager
.
ins
.
hc_useProp
((
s
)
=>
{
NetManager
.
ins
.
hc_useProp
((
s
)
=>
{
...
@@ -709,24 +712,47 @@ export default class MainScene extends Scene {
...
@@ -709,24 +712,47 @@ export default class MainScene extends Scene {
//还原事件
//还原事件
this
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
this
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
if
(
prop
==
PropType
.
BOOM
||
prop
==
PropType
.
HAMMER
)
{
if
(
prop
==
PropType
.
BOOM
||
prop
==
PropType
.
HAMMER
)
{
this
.
enableMouseEvt
(
false
)
this
.
elementContainer
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_BEGIN
,
this
.
mouseDownE
,
this
);
this
.
elementContainer
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_BEGIN
,
this
.
mouseDownE
,
this
);
this
.
elementContainer
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_MOVE
,
this
.
mouseMoveE
,
this
);
this
.
elementContainer
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_MOVE
,
this
.
mouseMoveE
,
this
);
}
else
{
}
else
{
this
.
removeChild
(
this
.
stepCircle
)
this
.
removeChild
(
this
.
stepCircle
)
showToast
(
"步数增加成功"
)
}
}
if
(
!
s
)
return
if
(
!
s
)
return
//成功的
switch
(
prop
)
{
switch
(
prop
)
{
case
PropType
.
BOOM
:
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
]))
{
this
.
eliminatedElements
.
push
(
i
);
if
(
!
lat
.
element
.
isLock
)
{
//3倍
this
.
pushScoreAni
(
baseScore
*
1
*
3
,
Tool
.
getPositionByIndex
(
i
))
}
}
}
setTimeout
(()
=>
{
this
.
eliminate
();
},
200
)
break
;
break
;
case
PropType
.
HAMMER
:
case
PropType
.
HAMMER
:
this
.
eliminatedElements
.
push
(
index
);
this
.
eliminate
();
break
;
break
;
case
PropType
.
CHANCE_NUM
:
case
PropType
.
CHANCE_NUM
:
this
.
steps
+=
5
;
this
.
steps
+=
5
;
showToast
(
"步数增加成功"
);
break
;
break
;
}
}
//更新道具数量
NetManager
.
ins
.
hc_home
(()
=>
{
this
.
updateScene
();
},
window
[
'collectRuleId'
]);
},
prop
)
},
prop
)
}
}
mouseDownE
(
e
:
egret
.
TextEvent
)
{
mouseDownE
(
e
:
egret
.
TextEvent
)
{
...
@@ -2125,7 +2151,7 @@ export default class MainScene extends Scene {
...
@@ -2125,7 +2151,7 @@ export default class MainScene extends Scene {
var
txt
=
codeMsgs
[
data
.
code
]
||
"活动太火爆了
\n
请稍后再来"
;
var
txt
=
codeMsgs
[
data
.
code
]
||
"活动太火爆了
\n
请稍后再来"
;
showToast
(
txt
);
showToast
(
txt
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
MAP_SCENE
,
createData
());
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
MAP_SCENE
,
createData
());
},
1300
)
},
1300
)
}
}
}
}
...
...
egret/src/something/Chapters.ts
View file @
a33792f6
...
@@ -597,4 +597,5 @@ export const Chapters: ChapterData[] = [
...
@@ -597,4 +597,5 @@ export const Chapters: ChapterData[] = [
starScores
:
[
11000
,
22000
,
45000
]
starScores
:
[
11000
,
22000
,
45000
]
},
},
//////////////////////
//////////////////////
]
]
\ 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