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
de570a1c
Commit
de570a1c
authored
Apr 08, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
ccdd1e88
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
13 deletions
+61
-13
InviteSkin.exml
egret/resource/skins/InviteSkin.exml
+2
-2
MainScene.ts
egret/src/mainScene/MainScene.ts
+11
-0
ShareCodePanel.ts
egret/src/panels/ShareCodePanel.ts
+2
-1
Turntable.ts
egret/src/panels/TurntablePanel/Turntable.ts
+45
-9
Element.ts
egret/src/something/class/Element.ts
+1
-1
No files found.
egret/resource/skins/InviteSkin.exml
View file @
de570a1c
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
</e:Skin>
</e:Skin>
</e:skinName>
</e:skinName>
</e:Button>
</e:Button>
<e:Label
id=
"numLabel"
text=
"仅差3人可获得"
y=
"822"
size=
"28"
horizontalCenter=
"0"
textColor=
"0xc17343"
/>
<e:Label
id=
"numLabel"
text=
"仅差3人可获得"
y=
"822"
size=
"28"
horizontalCenter=
"0"
textColor=
"0xc17343"
fontFamily=
"FZY3JW"
/>
<e:Label
id=
"cutTimeLabel"
text=
"将在23:43:21后失效"
y=
"1023"
size=
"28"
textColor=
"0xffffff"
horizontalCenter=
"0"
fontFamily=
"FZY3JW"
/>
<e:Label
id=
"cutTimeLabel"
text=
"将在23:43:21后失效"
y=
"1023"
size=
"28"
textColor=
"0xffffff"
horizontalCenter=
"0"
fontFamily=
"FZY3JW"
/>
<e:Scroller
width=
"545"
height=
"90"
y=
"906"
anchorOffsetX=
"0"
anchorOffsetY=
"0"
horizontalCenter=
"0.5"
>
<e:Scroller
width=
"545"
height=
"90"
y=
"906"
anchorOffsetX=
"0"
anchorOffsetY=
"0"
horizontalCenter=
"0.5"
>
<e:Group
anchorOffsetX=
"0"
>
<e:Group
anchorOffsetX=
"0"
>
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
</e:layout>
</e:layout>
</e:Group>
</e:Group>
</e:Scroller>
</e:Scroller>
<e:Group
id=
"wxShareTip"
width=
"750"
height=
"1624"
y=
"0"
x=
"0"
>
<e:Group
id=
"wxShareTip"
width=
"750"
height=
"1624"
y=
"0"
x=
"0"
visible=
"false"
>
<e:Rect
fillAlpha=
"0.7"
left=
"0"
top=
"0"
right=
"0"
bottom=
"0"
/>
<e:Rect
fillAlpha=
"0.7"
left=
"0"
top=
"0"
right=
"0"
bottom=
"0"
/>
<e:Image
source=
"invite_wx_tip_png"
x=
"458"
y=
"0"
/>
<e:Image
source=
"invite_wx_tip_png"
x=
"458"
y=
"0"
/>
</e:Group>
</e:Group>
...
...
egret/src/mainScene/MainScene.ts
View file @
de570a1c
...
@@ -161,6 +161,7 @@ let svgaParser;
...
@@ -161,6 +161,7 @@ let svgaParser;
//三个toast和bonusTime
//三个toast和bonusTime
const
movieClips
:
any
=
{};
const
movieClips
:
any
=
{};
let
cannomvdata
:
any
=
null
;
//红包炸弹弹框名字
//红包炸弹弹框名字
const
redBombPanelName
=
"RedBombAlert"
;
const
redBombPanelName
=
"RedBombAlert"
;
...
@@ -458,6 +459,16 @@ export default class MainScene extends Scene {
...
@@ -458,6 +459,16 @@ export default class MainScene extends Scene {
// alert(error.message);
// alert(error.message);
})
})
}
}
//炮台的动画数据
if
(
cannomvdata
){
}
else
{
svgaParser
.
load
(
resPath
+
'resource/assets/svgas/canno1.svga'
,(
videoItem
)
=>
{
cannomvdata
=
videoItem
;
})
}
}
}
/**
/**
* 一个炮台有三个附属动画
* 一个炮台有三个附属动画
...
...
egret/src/panels/ShareCodePanel.ts
View file @
de570a1c
...
@@ -304,7 +304,8 @@ export const showShareCodePanel = (channel: CodeChannels, shareCode?: string, ad
...
@@ -304,7 +304,8 @@ export const showShareCodePanel = (channel: CodeChannels, shareCode?: string, ad
* @param shareCode 分享加体力暂时没有分享码(27号版本要加上),排行榜邀请一起玩也没有分享码,默认传0
* @param shareCode 分享加体力暂时没有分享码(27号版本要加上),排行榜邀请一起玩也没有分享码,默认传0
*/
*/
function
generateCode
(
callback
:
Function
,
channel
:
CodeChannels
,
shareCode
:
string
=
"0"
)
{
function
generateCode
(
callback
:
Function
,
channel
:
CodeChannels
,
shareCode
:
string
=
"0"
)
{
var
activityCode
=
getParamString
(
"snactCode"
)
||
"ACT0000002664"
;
//上线必须改回来,动态获取
// var activityCode = getParamString("snactCode") || "ACT0000002664";//上线必须改回来,动态获取
var
activityCode
=
"ACT0000002664"
;
var
sceneCode
=
channel
;
var
sceneCode
=
channel
;
var
token
=
shareCode
||
"0"
;
var
token
=
shareCode
||
"0"
;
window
[
'$'
].
ajax
({
window
[
'$'
].
ajax
({
...
...
egret/src/panels/TurntablePanel/Turntable.ts
View file @
de570a1c
...
@@ -21,6 +21,8 @@ import SceneCtrl from "../../../libs/new_wx/ctrls/sceneCtrl";
...
@@ -21,6 +21,8 @@ import SceneCtrl from "../../../libs/new_wx/ctrls/sceneCtrl";
// callback(mv);
// callback(mv);
// })
// })
// }
// }
let
svgaParser
;
let
handmoveclip
=
null
;
export
default
class
Turntable
extends
Panel
{
export
default
class
Turntable
extends
Panel
{
public
panel
:
eui
.
Group
;
public
panel
:
eui
.
Group
;
public
start_btn
:
eui
.
Button
;
public
start_btn
:
eui
.
Button
;
...
@@ -38,18 +40,15 @@ export default class Turntable extends Panel {
...
@@ -38,18 +40,15 @@ export default class Turntable extends Panel {
this
.
data
=
data
;
this
.
data
=
data
;
}
}
hand
;
//
hand;
async
start
(
data
?)
{
async
start
(
data
?)
{
super
.
start
();
super
.
start
();
NetManager
.
ins
.
showLog
(
getlogItem
(
45
));
NetManager
.
ins
.
showLog
(
getlogItem
(
45
));
// this['container'].addChild(this.data.mv);
// this['container'].addChild(this.data.mv);
this
.
hand
=
await
loadSvga
(
getResPath
()
+
'resource/assets/svgas/hand.svga'
,
this
[
'container2'
])
var
startpy
=
this
[
"start_btn"
].
y
;
// this.hand = await loadSvga(getResPath() + 'resource/assets/svgas/hand.svga', this['container2']);
startpy
=
281
;
var
whandy
=
this
[
"start_btn"
].
parent
.
localToGlobal
(
0
,
startpy
).
y
;
var
handy
=
this
[
'container2'
].
globalToLocal
(
0
,
whandy
).
y
-
1334
/
2
;
this
.
hand
.
y
=
handy
;
// console.log("hand位置",startpy,whandy,this.stage.stageHeight/2,this.height/2,this['container2'].y);
// console.log("hand位置",startpy,whandy,this.stage.stageHeight/2,this.height/2,this['container2'].y);
this
[
'container2'
].
touchEnabled
=
false
;
this
[
'container2'
].
touchEnabled
=
false
;
...
@@ -58,10 +57,22 @@ export default class Turntable extends Panel {
...
@@ -58,10 +57,22 @@ export default class Turntable extends Panel {
this
[
'btnLabel'
].
text
=
""
;
this
[
'btnLabel'
].
text
=
""
;
this
.
initUI
();
this
.
initUI
();
}
}
public
onShowAnim
(){
public
async
onShowAnim
(){
let
targetY
:
number
;
let
targetY
:
number
;
targetY
=
0
;
targetY
=
0
;
egret
.
Tween
.
get
(
this
).
set
({
y
:
-
200
}).
to
({
y
:
targetY
},
500
,
egret
.
Ease
.
quartOut
);
egret
.
Tween
.
get
(
this
).
set
({
y
:
-
200
}).
to
({
y
:
targetY
},
500
,
egret
.
Ease
.
quartOut
)
.
call
(()
=>
{
// var startpy = this["start_btn"].y;
// startpy = 281;
// var whandy = this["start_btn"].parent.localToGlobal(0,startpy).y;
// var handy = this['container2'].globalToLocal(0,whandy).y-1334/2;
// this.hand.y = handy;
this
.
initSvgas
();
},
this
);
}
}
rulebtn
;
rulebtn
;
...
@@ -287,4 +298,29 @@ export default class Turntable extends Panel {
...
@@ -287,4 +298,29 @@ export default class Turntable extends Panel {
});
});
// console.log(RotaryData);
// console.log(RotaryData);
}
}
initSvgas
(){
var
resPath
=
getResPath
();
if
(
!
svgaParser
)
svgaParser
=
new
window
[
"SVGA"
].
Parser
();
if
(
handmoveclip
){
this
.
addHandMv
();
}
else
{
svgaParser
.
load
(
resPath
+
'resource/assets/svgas/hand.svga'
,
(
videoItem
)
=>
{
var
mv
=
new
window
[
"SVGA"
].
EgretMovieClip
(
videoItem
);
handmoveclip
=
mv
;
this
.
addHandMv
();
});
}
}
addHandMv
(){
if
(
handmoveclip
){
var
startpy
=
this
[
"start_btn"
].
y
;
startpy
=
281
;
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
.
y
=
handy
;
}
}
}
}
\ No newline at end of file
egret/src/something/class/Element.ts
View file @
de570a1c
...
@@ -521,7 +521,7 @@ export class Element extends eui.Component {
...
@@ -521,7 +521,7 @@ export class Element extends eui.Component {
return
;
return
;
}
}
if
(
!
svgaParser
)
svgaParser
=
new
window
[
"SVGA"
].
Parser
();
if
(
!
svgaParser
)
svgaParser
=
new
window
[
"SVGA"
].
Parser
();
var
svgas
=
[
"canno1"
]
//,"cannofire","cannoparticle","cannolight"];
var
svgas
=
[
"canno1"
]
for
(
let
i
=
0
;
i
<
svgas
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
svgas
.
length
;
i
++
){
let
mvname
=
svgas
[
i
];
let
mvname
=
svgas
[
i
];
svgaParser
.
load
(
resPath
+
'resource/assets/svgas/'
+
mvname
+
'.svga'
,(
videoItem
)
=>
{
svgaParser
.
load
(
resPath
+
'resource/assets/svgas/'
+
mvname
+
'.svga'
,(
videoItem
)
=>
{
...
...
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