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
e4e3157b
Commit
e4e3157b
authored
Mar 28, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
炮台石头移除特效
parent
94f27fa6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
MainScene.ts
egret/src/mainScene/MainScene.ts
+19
-1
No files found.
egret/src/mainScene/MainScene.ts
View file @
e4e3157b
...
@@ -413,6 +413,8 @@ export default class MainScene extends Scene {
...
@@ -413,6 +413,8 @@ export default class MainScene extends Scene {
var
svgas
=
[
"amazing"
,
"great"
,
"wonderful"
,
"bonusTime"
];
var
svgas
=
[
"amazing"
,
"great"
,
"wonderful"
,
"bonusTime"
];
//如果有节日的加
//如果有节日的加
if
(
this
.
festivalTarget
)
svgas
.
push
(
"redBombLight"
);
if
(
this
.
festivalTarget
)
svgas
.
push
(
"redBombLight"
);
//到时候用炮台石头的替换todo
svgas
.
push
(
"canno"
);
for
(
let
i
=
0
;
i
<
svgas
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
svgas
.
length
;
i
++
)
{
if
(
movieClips
[
svgas
[
i
]])
continue
;
if
(
movieClips
[
svgas
[
i
]])
continue
;
...
@@ -421,10 +423,14 @@ export default class MainScene extends Scene {
...
@@ -421,10 +423,14 @@ export default class MainScene extends Scene {
svgaParser
.
load
(
resPath
+
'resource/assets/svgas/'
+
svgas
[
i
]
+
".svga"
,
(
videoItem
)
=>
{
svgaParser
.
load
(
resPath
+
'resource/assets/svgas/'
+
svgas
[
i
]
+
".svga"
,
(
videoItem
)
=>
{
var
mv
=
new
window
[
"SVGA"
].
EgretMovieClip
(
videoItem
);
var
mv
=
new
window
[
"SVGA"
].
EgretMovieClip
(
videoItem
);
mv
.
lockStep
=
true
;
mv
.
lockStep
=
true
;
if
(
svgas
[
i
]
!=
"bonusTime"
)
{
if
(
svgas
[
i
]
==
"canno"
){
}
else
if
(
svgas
[
i
]
!=
"bonusTime"
)
{
mv
.
x
=
(
750
-
520
)
/
2
;
mv
.
x
=
(
750
-
520
)
/
2
;
mv
.
y
=
500
;
mv
.
y
=
500
;
}
}
mv
.
stop
();
mv
.
stop
();
let
fun
;
let
fun
;
mv
.
addEventListener
(
egret
.
Event
.
COMPLETE
,
fun
=
function
(
e
)
{
mv
.
addEventListener
(
egret
.
Event
.
COMPLETE
,
fun
=
function
(
e
)
{
...
@@ -3715,6 +3721,18 @@ export default class MainScene extends Scene {
...
@@ -3715,6 +3721,18 @@ export default class MainScene extends Scene {
removeCannoBlock
(
index
:
number
){
removeCannoBlock
(
index
:
number
){
this
.
removeOperation
(
index
);
this
.
removeOperation
(
index
);
//炮台石头的动效
//炮台石头的动效
var
blockmv
=
movieClips
[
"canno"
];
if
(
blockmv
){
console
.
log
(
"播放炮台石头的动效"
);
var
blpos
=
Tool
.
getPositionByIndex
(
index
);
var
bwpos
=
this
.
elementContainer
.
localToGlobal
(
blpos
[
0
],
blpos
[
1
]);
var
blockwid
=
116
;
var
blockhei
=
116
;
blockmv
.
x
=
bwpos
.
x
-
blockwid
/
2
;
blockmv
.
y
=
bwpos
.
y
-
blockhei
/
2
;
this
.
addChild
(
blockmv
);
blockmv
.
gotoAndPlay
(
1
,
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