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
5806944f
Commit
5806944f
authored
Aug 16, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
893c6673
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
17 deletions
+33
-17
index.do.json
project/mock/webNet/dazzle/index.do.json
+3
-3
cost.ts
project/src/panels/cost.ts
+1
-0
getTimes.ts
project/src/panels/getTimes.ts
+4
-0
timesNotEnough.ts
project/src/panels/timesNotEnough.ts
+3
-6
BoxGroup.ts
project/src/scenes/BoxGroup.ts
+18
-6
IndexScene.ts
project/src/scenes/IndexScene.ts
+4
-2
No files found.
project/mock/webNet/dazzle/index.do.json
View file @
5806944f
{
"code"
:
null
,
"data"
:
{
"surplusCount"
:
0
,
"surplusCount"
:
1
0
,
"credits"
:
235
,
"needCredits"
:
10
,
"type"
:
1
,
"needCredits"
:
1
1
0
,
"type"
:
2
,
"isMember"
:
1
},
"message"
:
null
,
...
...
project/src/panels/cost.ts
View file @
5806944f
...
...
@@ -18,6 +18,7 @@ export class CostPanel extends Panel {
const
cost
=
1234567890
;
getObject
(
this
,
"cost_tips"
).
text
=
`消耗
${
cost
}
积分拆开1个盲盒`
;
}
cost_open
()
{
sendLog
(
"click"
,
1
);
this
.
dispatchEvent
(
"stopIndexEnterFrame"
,
{
});
...
...
project/src/panels/getTimes.ts
View file @
5806944f
...
...
@@ -10,6 +10,10 @@ import { SharePanel } from "./share";
let
section
;
export
class
getTimesPanel
extends
Panel
{
hidePanel
(){
this
.
stage
.
dispatchEvent
(
"restartEnterFrame"
,{});
super
.
hidePanel
();
}
click_getTimes_go
()
{
sendLog
(
"click"
,
7
);
this
.
hidePanel
();
...
...
project/src/panels/timesNotEnough.ts
View file @
5806944f
...
...
@@ -7,9 +7,9 @@ import { sendLog } from "../WebNet";
let
section
;
export
class
timesNotEnoughPanel
extends
Panel
{
share_share_go
(){
sendLog
(
"exposure"
,
8
);
console
.
log
(
'timesNotEnough'
);
hidePanel
(){
this
.
stage
.
dispatchEvent
(
"restartEnterFrame"
,{}
);
super
.
hidePanel
(
);
}
get
groupNames
()
{
return
[
"timesNotEnough"
]
}
...
...
@@ -20,16 +20,13 @@ export class timesNotEnoughPanel extends Panel {
sendLog
(
"click"
,
8
);
var
skin
=
RES
.
getSkinDataByName
(
this
.
skinName
);
this
.
position
.
set
(
skin
.
x
,
skin
.
y
);
// centerTextField(getObject(this,'cost_tips'),496);
}
initEvents
()
{
super
.
initEvents
();
// getObject(this, 'share_fail_btn').addEventListener(FYGE.MouseEvent.CLICK, this.share_share_go, this);
}
removeEvents
()
{
super
.
removeEvents
();
// getObject(this, 'share_fail_btn').removeEventListener(FYGE.MouseEvent.CLICK, this.share_share_go, this);
}
protected
get
closeBtns
():
any
[]
{
...
...
project/src/scenes/BoxGroup.ts
View file @
5806944f
...
...
@@ -2,7 +2,9 @@ import { showPanel } from "../../module/ctrls";
import
{
RES
}
from
"../../module/RES"
;
import
{
delayClick
}
from
"../common/delayClick"
;
import
{
CostPanel
}
from
"../panels/cost"
;
import
{
getTimesPanel
}
from
"../panels/getTimes"
;
import
{
notEnoughMoneyPanel
}
from
"../panels/notEnoughMoney"
;
import
{
timesNotEnoughPanel
}
from
"../panels/timesNotEnough"
;
import
{
getWebData
}
from
"../WebNet"
;
import
{
WebNetName
}
from
"../WebNetName"
;
import
{
Box
}
from
"./Box"
;
...
...
@@ -78,17 +80,27 @@ export class BoxGroup extends FYGE.Sprite {
handleClick
(
e
)
{
delayClick
(
e
.
target
.
stage
);
const
indexsvga
=
this
.
indexsvga
=
new
FYGE
.
MovieClip
(
RES
.
getRes
(
'盲盒选中-输出.svga'
));
this
.
dispatchEvent
(
"stopIndexEnterFrame"
,
{
});
this
.
dispatchEvent
(
"stopIndexEnterFrame"
,
{});
indexsvga
.
mouseChildren
=
indexsvga
.
mouseEnable
=
false
;
indexsvga
.
position
.
set
(
e
.
target
.
x
-
200
,
e
.
target
.
y
-
190
)
indexsvga
.
position
.
set
(
e
.
target
.
x
-
200
,
e
.
target
.
y
-
190
)
this
.
addChild
(
indexsvga
);
indexsvga
.
startAniRange
(
1
,
indexsvga
.
totalFrames
,
1
,
()
=>
{
const
result
=
getWebData
(
WebNetName
.
index
);
if
(
result
.
data
.
surplusCount
<=
0
)
{
if
(
result
.
data
.
type
==
2
)
showPanel
(
timesNotEnoughPanel
)
else
showPanel
(
getTimesPanel
);
}
else
{
if
(
result
.
data
.
needCredits
>
result
.
data
.
credits
)
{
showPanel
(
notEnoughMoneyPanel
);
}
else
{
showPanel
(
CostPanel
);
}
}
});
}
}
project/src/scenes/IndexScene.ts
View file @
5806944f
...
...
@@ -114,7 +114,9 @@ export class IndexScene extends Scene {
}
onRestartFrame
()
{
if
(
boxGroup
.
indexsvga
.
parent
)
boxGroup
.
removeChild
(
boxGroup
.
indexsvga
);
if
(
!
this
.
hasEventListener
(
FYGE
.
Event
.
ENTER_FRAME
))
this
.
addEventListener
(
FYGE
.
Event
.
ENTER_FRAME
,
this
.
onEnterFrame
,
this
);
}
...
...
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