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
95074d48
Commit
95074d48
authored
Apr 22, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
性能优化暂存
parent
8bfe8d17
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
11 deletions
+24
-11
MainBase.ts
egret/libs/new_wx/MainBase.ts
+1
-1
MainScene.ts
egret/src/mainScene/MainScene.ts
+16
-4
Element.ts
egret/src/something/class/Element.ts
+6
-5
StartScene.ts
egret/src/startScene/StartScene.ts
+1
-1
No files found.
egret/libs/new_wx/MainBase.ts
View file @
95074d48
...
...
@@ -188,7 +188,7 @@ export default class MainBase extends eui.UILayer {
panels
.
forEach
(
item
=>
PanelCtrl
.
instance
.
registerPanel
(
item
[
0
],
item
[
1
]));
scenes
.
forEach
(
item
=>
SceneCtrl
.
instance
.
registerScene
(
item
[
0
],
item
[
1
]));
console
.
log
(
"sceneCtrl所有的场景"
,
SceneCtrl
.
instance
.
_sceneClassMap
);
//
console.log("sceneCtrl所有的场景",SceneCtrl.instance._sceneClassMap);
// NetManager.ins.onNotSuccess = (msg) => {
// s
// }
...
...
egret/src/mainScene/MainScene.ts
View file @
95074d48
...
...
@@ -381,7 +381,6 @@ export default class MainScene extends Scene {
//初始换道具容器
this
.
propBtnCon
=
new
PropBtnCon
();
this
.
addChild
(
this
.
propBtnCon
);
console
.
log
(
"添加道具group"
,
this
.
propBtnCon
);
this
.
mapContainer
=
new
egret
.
DisplayObjectContainer
();
this
.
addChild
(
this
.
mapContainer
);
...
...
@@ -417,9 +416,7 @@ export default class MainScene extends Scene {
this
.
bonusTime
.
y
=
600
;
}
async
start
(
data
)
{
super
.
start
();
resetMainScene
(){
this
.
emptys
=
new
Array
();
this
.
warningCop
=
new
Array
();
this
.
eliminatedElements
=
new
Array
();
...
...
@@ -430,6 +427,17 @@ export default class MainScene extends Scene {
this
.
cannoEffect
=
new
Array
();
this
.
readyCannoArr
=
new
Array
();
this
.
fireteamCannoArr
=
new
Array
();
this
.
passElements
=
new
Array
();
this
.
noActionCount
=
0
;
this
.
isShowWarning
=
false
;
this
.
magicRotateData
=
new
Array
();
this
.
commonContinuityTimes
=
0
;
this
.
effectContinuityTimes
=
0
;
this
.
lollipopCount
=
0
;
this
.
hasPassed
=
false
;
this
.
isCountingTime
=
false
;
this
.
mapContainer
.
removeChildren
();
this
.
mapupContainer
.
removeChildren
();
...
...
@@ -437,8 +445,12 @@ export default class MainScene extends Scene {
this
.
effectContainer
.
removeChildren
();
this
.
guideContainer
.
removeChildren
();
this
.
festivalContainer
.
removeChildren
();
}
async
start
(
data
)
{
super
.
start
();
this
.
resetMainScene
();
console
.
log
(
"mainscene---------start"
,
data
,
data
.
chapter
);
// window['gm'] = this.gm;
//第几关
...
...
egret/src/something/class/Element.ts
View file @
95074d48
...
...
@@ -86,6 +86,7 @@ export class Element extends eui.Component {
}
fire
(
type
:
ElementType
)
{
// zi hong huang lan lv
console
.
log
(
"烟花绽放"
);
this
.
_fireworksTimer
=
new
Date
().
getTime
();
if
(
type
==
ElementType
.
FIREWORKS_RABBIT
)
//rabbit 紫
this
.
toFireworksAction
(
1
,
90
);
...
...
@@ -110,10 +111,10 @@ export class Element extends eui.Component {
this
.
_fireworks
=
mv
;
mv
.
anchorOffsetX
=
340
/
2
;
mv
.
anchorOffsetY
=
500
;
mv
.
x
=
this
.
x
;
mv
.
y
=
this
.
y
-
38
;
}
}
this
.
_fireworks
.
x
=
this
.
x
;
this
.
_fireworks
.
y
=
this
.
y
-
38
;
thisobj
.
addChild
(
this
.
_fireworks
);
this
.
_fireworks
.
gotoAndStop
(
1
);
...
...
@@ -122,10 +123,10 @@ export class Element extends eui.Component {
const
cb
=
()
=>
{
if
(
this
.
_fireworks
.
currentFrame
==
end
)
{
//向上吹
this
.
_fireworks
.
gotoAndStop
(
start
);
//
this._fireworks.removeEventListener(egret.Event.ENTER_FRAME, cb, this);
this
.
_fireworks
.
removeEventListener
(
egret
.
Event
.
ENTER_FRAME
,
cb
,
this
);
}
};
this
.
_fireworks
.
once
(
egret
.
Event
.
ENTER_FRAME
,
cb
,
this
);
this
.
_fireworks
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
cb
,
this
);
this
.
_fireworks
.
gotoAndPlay
(
start
,
true
);
}
...
...
egret/src/startScene/StartScene.ts
View file @
95074d48
...
...
@@ -54,7 +54,7 @@ export default class StartScene extends Scene {
setGlow
(
this
[
'percentTxt'
],
0xffffff
,
1
);
console
.
log
(
data
);
//
console.log(data);
if
(
data
&&
Array
.
isArray
(
data
))
{
this
[
'container3'
].
addChild
(
data
[
0
]);
this
[
'container2'
].
addChild
(
data
[
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