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
d07baf53
Commit
d07baf53
authored
Apr 08, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整大炮,转盘手指的资源加载
parent
f9995ad1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
24 deletions
+34
-24
MainScene.ts
egret/src/mainScene/MainScene.ts
+11
-0
Turntable.ts
egret/src/panels/TurntablePanel/Turntable.ts
+4
-0
Element.ts
egret/src/something/class/Element.ts
+19
-24
No files found.
egret/src/mainScene/MainScene.ts
View file @
d07baf53
...
...
@@ -1055,6 +1055,17 @@ export default class MainScene extends Scene {
});
var
dirType
=
Tool
.
getCannoDir
(
elements
[
i
]);
canno
.
resetToCannoView
(
dirType
,
this
);
//添加大炮
if
(
cannomvdata
){
canno
.
createCanno
(
cannomvdata
);
}
else
{
if
(
!
svgaParser
)
svgaParser
=
new
window
[
"SVGA"
].
Parser
();
svgaParser
.
load
(
resPath
+
'resource/assets/svgas/canno1.svga'
,(
videoItem
)
=>
{
cannomvdata
=
videoItem
;
canno
.
createCanno
(
cannomvdata
);
})
}
break
;
case
ElementConfigType
.
CANNO_BLOCK
:
let
canno_block
:
Element
=
Tool
.
getElement
(
ElementType
.
CANNO_BLOCK
);
...
...
egret/src/panels/TurntablePanel/Turntable.ts
View file @
d07baf53
...
...
@@ -56,6 +56,9 @@ export default class Turntable extends Panel {
this
[
'nums'
].
text
=
`我的元宝:
${
getHomeData
().
wealth
}
`
;
this
[
'btnLabel'
].
text
=
""
;
this
.
initUI
();
if
(
handmoveclip
&&
handmoveclip
.
parent
){
handmoveclip
.
parent
.
removeChild
(
handmoveclip
);
}
}
public
async
onShowAnim
(){
let
targetY
:
number
;
...
...
@@ -320,6 +323,7 @@ export default class Turntable extends Panel {
var
whandy
=
this
[
"start_btn"
].
parent
.
localToGlobal
(
0
,
startpy
).
y
;
var
handy
=
this
[
'container2'
].
globalToLocal
(
0
,
whandy
).
y
-
1334
/
2
;
this
[
'container2'
].
addChild
(
handmoveclip
);
handmoveclip
.
gotoAndPlay
(
1
);
handmoveclip
.
y
=
handy
;
}
}
...
...
egret/src/something/class/Element.ts
View file @
d07baf53
...
...
@@ -509,26 +509,25 @@ export class Element extends eui.Component {
}
this
.
addChild
(
this
.
festivalEle
)
}
this
.
createCanno
();
}
//添加炮台
createCanno
(){
if
(
this
.
type
==
ElementType
.
CANNO
){
createCanno
(
videoItem
:
any
){
if
(
this
.
type
==
ElementType
.
CANNO
&&
videoItem
){
if
(
this
.
cannoMoveClip
){
if
(
this
.
cannoMoveClip
.
parent
){
this
.
cannoMoveClip
.
parent
.
removeChild
(
this
.
cannoMoveClip
);
}
this
.
initCannoMoveClidp
();
return
;
}
if
(
!
svgaParser
)
svgaParser
=
new
window
[
"SVGA"
].
Parser
();
var
svgas
=
[
"canno1"
]
for
(
let
i
=
0
;
i
<
svgas
.
length
;
i
++
){
let
mvname
=
svgas
[
i
];
svgaParser
.
load
(
resPath
+
'resource/assets/svgas/'
+
mvname
+
'.svga'
,(
videoItem
)
=>
{
if
(
mvname
==
"canno1"
){
else
{
this
.
cannoMoveClip
=
new
window
[
"SVGA"
].
EgretMovieClip
(
videoItem
);
// this.cannoMoveClip.lockStep = true;
this
.
initCannoMoveClidp
();
}
}
}
initCannoMoveClidp
(){
var
mvwidth
=
82
;
var
mvheight
=
132
;
this
.
cannoMoveClip
.
x
=
(
this
.
cannoboxwid
-
mvwidth
)
/
2
;
...
...
@@ -537,10 +536,6 @@ export class Element extends eui.Component {
this
.
cannoMoveClip
.
gotoAndStop
(
1
);
this
.
cannoMoveClip
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
toFrameAni
,
this
);
}
});
}
}
}
stopFrame
:
number
;
/**
* 炮台动画停止
...
...
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