Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wfc13
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
wildfirecode13
wfc13
Commits
27ce5e84
Commit
27ce5e84
authored
Aug 13, 2021
by
shunx 马
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
8be616ad
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
79 additions
and
808 deletions
+79
-808
SkinJson copy.ts.bak
project/src/SkinJson copy.ts.bak
+0
-779
SkinJson.ts
project/src/SkinJson.ts
+1
-9
cost.ts
project/src/panels/cost.ts
+16
-9
noprize.ts
project/src/panels/noprize.ts
+22
-1
prize.ts
project/src/panels/prize.ts
+24
-4
BoxGroup.ts
project/src/scenes/BoxGroup.ts
+4
-2
IndexScene.ts
project/src/scenes/IndexScene.ts
+12
-4
No files found.
project/src/SkinJson copy.ts.bak
deleted
100644 → 0
View file @
8be616ad
This diff is collapsed.
Click to expand it.
project/src/SkinJson.ts
View file @
27ce5e84
...
...
@@ -728,15 +728,7 @@ export const SkinJson ={
"y"
:
0
,
"type"
:
"container"
,
"children"
:
[
{
"name"
:
"prize_bg2"
,
"x"
:
0
,
"y"
:
0
,
"type"
:
"sprite"
,
"props"
:
{
"source"
:
"prize_bg2.png"
}
},
{
"name"
:
"prize_bg"
,
"x"
:
78
,
...
...
project/src/panels/cost.ts
View file @
27ce5e84
import
{
showPanel
}
from
"../../module/ctrls"
;
import
{
RES
}
from
"../../module/RES"
;
import
{
Panel
}
from
"../../module/views/Panel"
;
import
centerTextField
from
"../common/centerTextField"
;
import
getObject
from
"../common/getObject"
;
import
{
PrizePanel
}
from
"./prize"
;
let
section
;
export
class
CostPanel
extends
Panel
{
...
...
@@ -11,13 +13,9 @@ export class CostPanel extends Panel {
getObject
(
this
,
"cost_tips"
).
text
=
`消耗
${
cost
}
积分拆开1个盲盒`
;
}
cost_open
()
{
const
indexsvga
=
new
FYGE
.
MovieClip
(
RES
.
getRes
(
"盲盒开启-打开-输出.svga"
));
indexsvga
.
mouseChildren
=
indexsvga
.
mouseEnable
=
false
;
// indexsvga.position.set(100,100)
this
.
addChild
(
indexsvga
);
indexsvga
.
startAniRange
(
1
,
indexsvga
.
totalFrames
,
1
,
()
=>
{
});
this
.
dispatchEvent
(
"stopIndexEnterFrame"
,
{
});
this
.
hidePanel
();
showPanel
(
PrizePanel
)
}
get
groupNames
()
{
...
...
@@ -41,6 +39,11 @@ export class CostPanel extends Panel {
this
.
cost_open
,
this
);
getObject
(
this
,
"cost_close"
).
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
closePop
,
this
)
}
removeEvents
()
{
...
...
@@ -52,7 +55,11 @@ export class CostPanel extends Panel {
);
}
protected
get
closeBtns
():
any
[]
{
return
[
getObject
(
this
,
"cost_close"
)];
closePop
()
{
this
.
stage
.
dispatchEvent
(
"restartEnterFrame"
,
{})
this
.
hidePanel
();
}
}
project/src/panels/noprize.ts
View file @
27ce5e84
...
...
@@ -13,11 +13,32 @@ export class NoPrizePanel extends Panel {
get
groupNames
()
{
return
[
"noprize"
]
}
get
skinName
()
{
return
"noprize"
}
prizeContainer
:
FYGE
.
Sprite
;
initUi
()
{
super
.
initUi
();
var
skin
=
RES
.
getSkinDataByName
(
this
.
skinName
);
this
.
position
.
set
(
skin
.
x
,
skin
.
y
);
// centerTextField(getObject(this,'prize_name'),731);
centerTextField
(
getObject
(
this
,
'prize_name'
),
731
);
centerTextField
(
getObject
(
this
,
'prize_tips'
),
731
);
const
prizePop
=
getObject
(
this
,
"prizeInner"
);
prizePop
.
visible
=
false
;
const
indexsvga
=
new
FYGE
.
MovieClip
(
RES
.
getRes
(
'盲盒开启-打开-输出.svga'
));
const
container
=
this
.
prizeContainer
=
prizePop
.
addChild
(
new
FYGE
.
Sprite
);
container
.
position
.
set
(
286
,
276
);
indexsvga
.
mouseChildren
=
indexsvga
.
mouseEnable
=
false
;
indexsvga
.
position
.
set
(
731
/
2
-
750
/
2
,
720
/
2
-
1624
/
2
)
this
.
addChild
(
indexsvga
);
this
.
addChild
(
prizePop
)
indexsvga
.
addEventListener
(
FYGE
.
Event
.
ENTER_FRAME
,
()
=>
{
if
(
indexsvga
.
currentFrame
==
indexsvga
.
totalFrames
-
10
)
{
prizePop
.
visible
=
true
;
}
},
this
)
indexsvga
.
startAniRange
(
1
,
indexsvga
.
totalFrames
,
1
,
()
=>
{
this
.
removeChild
(
indexsvga
)
});
}
initEvents
()
{
...
...
project/src/panels/prize.ts
View file @
27ce5e84
...
...
@@ -2,8 +2,10 @@ import { RES } from "../../module/RES";
import
{
Panel
}
from
"../../module/views/Panel"
;
import
centerTextField
from
"../common/centerTextField"
;
import
{
createMask
}
from
"../common/createMask"
;
import
{
showPanel
}
from
"../../module/ctrls"
;
import
{
getImage
}
from
"../common/getImage"
;
import
getObject
from
"../common/getObject"
;
import
{
CostPanel
}
from
"./cost"
;
let
section
;
export
class
PrizePanel
extends
Panel
{
...
...
@@ -20,7 +22,7 @@ export class PrizePanel extends Panel {
}
click_prize_open
()
{
console
.
log
(
'click_prize_open'
)
;
console
.
log
(
'click_prize_open'
)
}
get
groupNames
()
{
return
[
"prize"
]
}
...
...
@@ -33,10 +35,23 @@ export class PrizePanel extends Panel {
this
.
position
.
set
(
skin
.
x
,
skin
.
y
);
centerTextField
(
getObject
(
this
,
'prize_name'
),
731
);
centerTextField
(
getObject
(
this
,
'prize_tips'
),
731
);
const
container
=
this
.
prizeContainer
=
this
.
addChild
(
new
FYGE
.
Sprite
);
const
prizePop
=
getObject
(
this
,
"prizeInner"
);
prizePop
.
visible
=
false
;
const
indexsvga
=
new
FYGE
.
MovieClip
(
RES
.
getRes
(
'盲盒开启-打开-输出.svga'
));
const
container
=
this
.
prizeContainer
=
prizePop
.
addChild
(
new
FYGE
.
Sprite
);
container
.
position
.
set
(
286
,
276
);
window
[
'q'
]
=
container
;
indexsvga
.
mouseChildren
=
indexsvga
.
mouseEnable
=
false
;
indexsvga
.
position
.
set
(
731
/
2
-
750
/
2
,
720
/
2
-
1624
/
2
)
this
.
addChild
(
indexsvga
);
this
.
addChild
(
prizePop
)
indexsvga
.
addEventListener
(
FYGE
.
Event
.
ENTER_FRAME
,
()
=>
{
if
(
indexsvga
.
currentFrame
==
indexsvga
.
totalFrames
-
13
)
{
prizePop
.
visible
=
true
;
}
},
this
)
indexsvga
.
startAniRange
(
1
,
indexsvga
.
totalFrames
,
1
,
()
=>
{
this
.
removeChild
(
indexsvga
)
});
}
initEvents
()
{
...
...
@@ -48,6 +63,11 @@ export class PrizePanel extends Panel {
getObject
(
this
,
'prize_open'
).
removeEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
click_prize_open
,
this
);
}
hidePanel
()
{
this
.
stage
.
dispatchEvent
(
"restartEnterFrame"
,{})
super
.
hidePanel
();
}
protected
get
closeBtns
():
any
[]
{
return
[
getObject
(
this
,
'prize_close'
)]
}
...
...
project/src/scenes/BoxGroup.ts
View file @
27ce5e84
...
...
@@ -12,9 +12,11 @@ let boxGroupDown = [];
let
boxGroupUpRight
=
[];
export
class
BoxGroup
extends
FYGE
.
Sprite
{
indexsvga
;
constructor
()
{
super
();
this
.
initBox
();
}
...
...
@@ -70,8 +72,8 @@ export class BoxGroup extends FYGE.Sprite {
}
handleClick
(
e
)
{
const
indexsvga
=
new
FYGE
.
MovieClip
(
RES
.
getRes
(
'盲盒选中-输出.svga'
));
this
.
dispatchEvent
(
"stopIndexEnterFrame"
,
{
isMove
:
false
});
const
indexsvga
=
this
.
indexsvga
=
new
FYGE
.
MovieClip
(
RES
.
getRes
(
'盲盒选中-输出.svga'
));
this
.
dispatchEvent
(
"stopIndexEnterFrame"
,
{
});
indexsvga
.
mouseChildren
=
indexsvga
.
mouseEnable
=
false
;
indexsvga
.
position
.
set
(
e
.
target
.
x
-
200
,
e
.
target
.
y
-
190
)
this
.
addChild
(
indexsvga
);
...
...
project/src/scenes/IndexScene.ts
View file @
27ce5e84
...
...
@@ -18,7 +18,7 @@ import { sendWebNet } from "../WebNet";
import
{
WebNetName
}
from
"../WebNetName"
;
let
boxGroup
;
let
boxGroup
:
BoxGroup
;
let
boxArea
;
export
class
IndexScene
extends
Scene
{
...
...
@@ -32,15 +32,19 @@ export class IndexScene extends Scene {
start
()
{
super
.
start
();
this
.
getIndex
();
// showPanel(SharePanel);
getObject
(
this
,
'index_sharetips'
).
visible
=
false
;
this
.
initContainer
();
this
.
initmask
();
const
limit
=
getObject
(
this
,
'index_timestips2'
);
limit
.
position
.
set
(
255
,
1129
);
const
credits
=
getObject
(
this
,
'index_moneytips2'
);
credits
.
position
.
set
(
608
,
1129
);
const
list
=
new
FYGE
.
ScrollList
(
ScrollItem
,
131
+
20
,
131
,
620
,
154
,
false
);
const
array
=
[
'//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png'
,
'//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png'
,
'//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png'
,
'//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png'
,
'//yun.duiba.com.cn/spark/assets/1398924a1b804f0f20f9d3e16ed3158c2b3d686b.png'
];
list
.
updateData
(
array
);
list
.
position
.
set
(
80
,
1240
+
30
);
this
.
addChild
(
list
);
this
.
stage
.
addEventListener
(
"restartEnterFrame"
,
this
.
onRestartFrame
,
this
);
}
initContainer
()
{
...
...
@@ -64,6 +68,7 @@ export class IndexScene extends Scene {
initEvents
()
{
super
.
initEvents
();
this
.
addEventListener
(
FYGE
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
this
.
addEventListener
(
"restartEnterFrame"
,
this
.
onRestartFrame
,
this
);
const
rulePop
=
getObject
(
this
,
'index_rule'
);
rulePop
&&
rulePop
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
toRule
,
this
);
}
...
...
@@ -73,13 +78,17 @@ export class IndexScene extends Scene {
boxGroup
.
addEventListener
(
"stopIndexEnterFrame"
,
this
.
removeEvent
,
this
);
}
onRestartFrame
()
{
boxGroup
.
removeChild
(
boxGroup
.
indexsvga
);
this
.
addEventListener
(
FYGE
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
}
toRule
()
{
showPanel
(
RulePanel
);
}
removeEvent
()
{
this
.
removeEventListener
(
FYGE
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
}
getIndex
=
async
()
=>
{
...
...
@@ -95,6 +104,5 @@ export class IndexScene extends Scene {
}
}
}
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