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
80fa00a4
Commit
80fa00a4
authored
Apr 23, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化炮台
parent
251bce34
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
337 additions
and
309 deletions
+337
-309
MainScene.ts
egret/src/mainScene/MainScene.ts
+315
-301
Element.ts
egret/src/something/class/Element.ts
+16
-8
RecoverName.ts
egret/src/something/enum/RecoverName.ts
+6
-0
No files found.
egret/src/mainScene/MainScene.ts
View file @
80fa00a4
This diff is collapsed.
Click to expand it.
egret/src/something/class/Element.ts
View file @
80fa00a4
...
...
@@ -563,6 +563,7 @@ export class Element extends eui.Component {
// }
return
true
;
}
//此处回收
addDisable
(){
if
(
this
.
inPongoPart
&&
this
.
inPongoPart
==
"tl"
){
if
(
this
.
pongoMoveClip
&&
this
.
pongoMoveClip
.
parent
){
...
...
@@ -576,6 +577,15 @@ export class Element extends eui.Component {
}
egret
.
ticker
.
$stopTick
(
this
.
update
,
this
);
}
if
(
this
.
cannoMoveClip
){
if
(
this
.
cannoMoveClip
.
parent
){
this
.
cannoMoveClip
.
parent
.
removeChild
(
this
.
cannoMoveClip
);
}
this
.
cannoMoveClip
.
removeEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
toFrameAni
,
this
);
Pool
.
recover
(
RecoverName
.
CANNO
,
this
.
cannoMoveClip
);
this
.
cannoMoveClip
=
null
;
}
}
...
...
@@ -883,18 +893,16 @@ export class Element extends eui.Component {
this
.
addChild
(
this
.
festivalEle
)
}
}
//大炮编号
cannobianhao
:
number
;
//添加炮台
createCanno
(
videoItem
:
any
){
createCanno
(
videoItem
:
any
,
cannobianhao
:
number
){
this
.
cannobianhao
=
cannobianhao
;
if
(
this
.
type
==
ElementType
.
CANNO
&&
videoItem
){
this
.
cannoMoveClip
=
Pool
.
takeOut
(
RecoverName
.
CANNO
);
if
(
this
.
cannoMoveClip
){
if
(
this
.
cannoMoveClip
.
parent
){
this
.
cannoMoveClip
.
parent
.
removeChild
(
this
.
cannoMoveClip
);
}
this
.
initCannoMoveClidp
();
return
;
}
else
{
}
else
{
this
.
cannoMoveClip
=
new
window
[
"SVGA"
].
EgretMovieClip
(
videoItem
);
this
.
initCannoMoveClidp
();
}
...
...
egret/src/something/enum/RecoverName.ts
View file @
80fa00a4
...
...
@@ -84,4 +84,10 @@ export enum RecoverName {
ICE_BLOCK
=
'ICE_BLOCK'
,
DARK_ICE_BLOCK
=
'DARK_ICE_BLOCK'
,
//部分动画的
CANNOBLOCKANI
=
'CANNOBLOCKANI'
,
//炮台石头破碎
CANNO
=
'CANNO'
,
//炮台
CANNOFIRE
=
'CANNOFIRE'
,
//炮台发射
CANNOLIGHT
=
'CANNOLIGHT'
//炮台聚能
}
\ 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