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
a83746cb
Commit
a83746cb
authored
Apr 08, 2020
by
邱旭
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://gitlab2.dui88.com/wanghongyuan/xiaoxiaole
into dev
parents
3961f05f
d07baf53
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
94 additions
and
36 deletions
+94
-36
InviteSkin.exml
egret/resource/skins/InviteSkin.exml
+2
-2
MainScene.ts
egret/src/mainScene/MainScene.ts
+22
-0
ShareCodePanel.ts
egret/src/panels/ShareCodePanel.ts
+2
-1
Turntable.ts
egret/src/panels/TurntablePanel/Turntable.ts
+49
-9
Element.ts
egret/src/something/class/Element.ts
+19
-24
No files found.
egret/resource/skins/InviteSkin.exml
View file @
a83746cb
...
...
@@ -28,7 +28,7 @@
</e:Skin>
</e:skinName>
</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:Scroller
width=
"545"
height=
"90"
y=
"906"
anchorOffsetX=
"0"
anchorOffsetY=
"0"
horizontalCenter=
"0.5"
>
<e:Group
anchorOffsetX=
"0"
>
...
...
@@ -42,7 +42,7 @@
</e:layout>
</e:Group>
</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:Image
source=
"invite_wx_tip_png"
x=
"458"
y=
"0"
/>
</e:Group>
...
...
egret/src/mainScene/MainScene.ts
View file @
a83746cb
...
...
@@ -161,6 +161,7 @@ let svgaParser;
//三个toast和bonusTime
const
movieClips
:
any
=
{};
let
cannomvdata
:
any
=
null
;
//红包炸弹弹框名字
const
redBombPanelName
=
"RedBombAlert"
;
...
...
@@ -458,6 +459,16 @@ export default class MainScene extends Scene {
// alert(error.message);
})
}
//炮台的动画数据
if
(
cannomvdata
){
}
else
{
svgaParser
.
load
(
resPath
+
'resource/assets/svgas/canno1.svga'
,(
videoItem
)
=>
{
cannomvdata
=
videoItem
;
})
}
}
/**
* 一个炮台有三个附属动画
...
...
@@ -1044,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/ShareCodePanel.ts
View file @
a83746cb
...
...
@@ -304,7 +304,8 @@ export const showShareCodePanel = (channel: CodeChannels, shareCode?: string, ad
* @param shareCode 分享加体力暂时没有分享码(27号版本要加上),排行榜邀请一起玩也没有分享码,默认传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
token
=
shareCode
||
"0"
;
window
[
'$'
].
ajax
({
...
...
egret/src/panels/TurntablePanel/Turntable.ts
View file @
a83746cb
...
...
@@ -21,6 +21,8 @@ import SceneCtrl from "../../../libs/new_wx/ctrls/sceneCtrl";
// callback(mv);
// })
// }
let
svgaParser
;
let
handmoveclip
=
null
;
export
default
class
Turntable
extends
Panel
{
public
panel
:
eui
.
Group
;
public
start_btn
:
eui
.
Button
;
...
...
@@ -38,18 +40,15 @@ export default class Turntable extends Panel {
this
.
data
=
data
;
}
hand
;
//
hand;
async
start
(
data
?)
{
super
.
start
();
NetManager
.
ins
.
showLog
(
getlogItem
(
45
));
// this['container'].addChild(this.data.mv);
this
.
hand
=
await
loadSvga
(
getResPath
()
+
'resource/assets/svgas/hand.svga'
,
this
[
'container2'
])
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.hand = await loadSvga(getResPath() + 'resource/assets/svgas/hand.svga', this['container2']);
// console.log("hand位置",startpy,whandy,this.stage.stageHeight/2,this.height/2,this['container2'].y);
this
[
'container2'
].
touchEnabled
=
false
;
...
...
@@ -57,11 +56,26 @@ 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
onShowAnim
(){
public
async
onShowAnim
(){
let
targetY
:
number
;
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
;
...
...
@@ -287,4 +301,30 @@ export default class Turntable extends Panel {
});
// 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
.
gotoAndPlay
(
1
);
handmoveclip
.
y
=
handy
;
}
}
}
\ No newline at end of file
egret/src/something/class/Element.ts
View file @
a83746cb
...
...
@@ -509,38 +509,33 @@ 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"
]
//,"cannofire","cannoparticle","cannolight"];
for
(
let
i
=
0
;
i
<
svgas
.
length
;
i
++
){
let
mvname
=
svgas
[
i
];
svgaParser
.
load
(
resPath
+
'resource/assets/svgas/'
+
mvname
+
'.svga'
,(
videoItem
)
=>
{
if
(
mvname
==
"canno1"
){
this
.
cannoMoveClip
=
new
window
[
"SVGA"
].
EgretMovieClip
(
videoItem
);
// this.cannoMoveClip.lockStep = true;
var
mvwidth
=
82
;
var
mvheight
=
132
;
this
.
cannoMoveClip
.
x
=
(
this
.
cannoboxwid
-
mvwidth
)
/
2
;
this
.
cannoMoveClip
.
y
=
-
mvheight
/
4
;
this
.
cannobox
.
addChild
(
this
.
cannoMoveClip
);
this
.
cannoMoveClip
.
gotoAndStop
(
1
);
this
.
cannoMoveClip
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
this
.
toFrameAni
,
this
);
}
});
}
else
{
this
.
cannoMoveClip
=
new
window
[
"SVGA"
].
EgretMovieClip
(
videoItem
);
this
.
initCannoMoveClidp
();
}
}
}
initCannoMoveClidp
(){
var
mvwidth
=
82
;
var
mvheight
=
132
;
this
.
cannoMoveClip
.
x
=
(
this
.
cannoboxwid
-
mvwidth
)
/
2
;
this
.
cannoMoveClip
.
y
=
-
mvheight
/
4
;
this
.
cannobox
.
addChild
(
this
.
cannoMoveClip
);
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