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
e70af9c8
Commit
e70af9c8
authored
Aug 13, 2021
by
shunx 马
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
7840f124
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
108 additions
and
37 deletions
+108
-37
settings.json
project/.vscode/settings.json
+35
-0
res.json
project/resource/res.json
+4
-0
ResJson.ts
project/src/ResJson.ts
+4
-0
cost.ts
project/src/panels/cost.ts
+46
-29
BoxGroup.ts
project/src/scenes/BoxGroup.ts
+17
-3
IndexScene.ts
project/src/scenes/IndexScene.ts
+2
-5
No files found.
project/.vscode/settings.json
0 → 100644
View file @
e70af9c8
{
"editor.formatOnSave"
:
true
,
"brace_style"
:
"none,preserve-inline"
,
"indent_size"
:
2
,
"indent_char"
:
" "
,
"jslint_happy"
:
true
,
"unformatted"
:
[
""
],
"css"
:
{
"indent_size"
:
2
},
"beautify.language"
:
{
"js"
:
{
"type"
:
[
"javascript"
,
"json"
,
"jsonc"
],
"filename"
:
[
".jshintrc"
,
".jsbeautifyrc"
]
},
"css"
:
[
"css"
,
"less"
,
"scss"
],
"html"
:
[
"htm"
,
"html"
,
"react"
]
}
}
\ No newline at end of file
project/resource/res.json
View file @
e70af9c8
...
...
@@ -56,6 +56,10 @@
"keys"
:
"share_bg.png,share_close.png,share_go.png"
,
"name"
:
"share"
},
{
"keys"
:
"盲盒开启-打开-输出.svga,盲盒选中-输出.svga,首页元素循环-输出.svga"
,
"name"
:
"svga"
},
{
"keys"
:
"timesNotEnough_bg.png,timesNotEnough_close.png,timesNotEnough_ok.png"
,
"name"
:
"timesNotEnough"
...
...
project/src/ResJson.ts
View file @
e70af9c8
...
...
@@ -56,6 +56,10 @@ export const ResJson = {
"keys"
:
"share_bg.png,share_close.png,share_go.png"
,
"name"
:
"share"
},
{
"keys"
:
"盲盒开启-打开-输出.svga,盲盒选中-输出.svga,首页元素循环-输出.svga"
,
"name"
:
"svga"
},
{
"keys"
:
"timesNotEnough_bg.png,timesNotEnough_close.png,timesNotEnough_ok.png"
,
"name"
:
"timesNotEnough"
...
...
project/src/panels/cost.ts
View file @
e70af9c8
...
...
@@ -5,37 +5,54 @@ import getObject from "../common/getObject";
let
section
;
export
class
CostPanel
extends
Panel
{
start
(){
start
()
{
super
.
start
();
const
cost
=
1234567890
;
getObject
(
this
,
'cost_tips'
).
text
=
`消耗
${
cost
}
积分拆开1个盲盒`
getObject
(
this
,
"cost_tips"
).
text
=
`消耗
${
cost
}
积分拆开1个盲盒`
;
}
cost_open
(){
console
.
log
(
'cost_open'
);
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
,
()
=>
{
});
}
get
groupNames
()
{
return
[
"cost"
]
}
get
skinName
()
{
return
"cost"
}
get
groupNames
()
{
return
[
"cost"
];
}
get
skinName
()
{
return
"cost"
;
}
initUi
()
{
super
.
initUi
();
var
skin
=
RES
.
getSkinDataByName
(
this
.
skinName
);
this
.
position
.
set
(
skin
.
x
,
skin
.
y
);
centerTextField
(
getObject
(
this
,
'cost_tips'
),
496
);
centerTextField
(
getObject
(
this
,
"cost_tips"
),
496
);
}
initEvents
()
{
super
.
initEvents
();
getObject
(
this
,
'cost_open'
).
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
cost_open
,
this
);
getObject
(
this
,
"cost_open"
).
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
cost_open
,
this
);
}
removeEvents
()
{
super
.
removeEvents
();
getObject
(
this
,
'cost_open'
).
removeEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
cost_open
,
this
);
getObject
(
this
,
"cost_open"
).
removeEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
cost_open
,
this
);
}
protected
get
closeBtns
():
any
[]
{
return
[
getObject
(
this
,
'cost_close'
)]
return
[
getObject
(
this
,
"cost_close"
)];
}
}
project/src/scenes/BoxGroup.ts
View file @
e70af9c8
import
{
showPanel
}
from
"../../module/ctrls"
;
import
{
RES
}
from
"../../module/RES"
;
import
{
CostPanel
}
from
"../panels/cost"
;
import
{
Box
}
from
"./Box"
;
export
interface
Move
{
...
...
@@ -18,19 +21,22 @@ export class BoxGroup extends FYGE.Sprite {
initBox
()
{
for
(
let
i
=
0
;
i
<
4
;
i
++
)
{
let
box
=
new
Box
();
box
.
position
.
set
(
40
,
0
+
i
*
238
);
box
.
position
.
set
(
40
,
0
+
i
*
238
);
box
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
handleClick
,
this
);
this
.
addChild
(
box
);
boxGroupUpLeft
.
push
(
box
);
}
for
(
let
i
=
0
;
i
<
4
;
i
++
)
{
let
box
=
new
Box
();
box
.
position
.
set
(
230
,
0
+
i
*
238
);
box
.
position
.
set
(
230
,
0
+
i
*
238
);
box
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
handleClick
,
this
);
this
.
addChild
(
box
);
boxGroupDown
.
push
(
box
);
}
for
(
let
i
=
0
;
i
<
4
;
i
++
)
{
let
box
=
new
Box
();
box
.
position
.
set
(
427
,
0
+
i
*
238
);
box
.
position
.
set
(
427
,
0
+
i
*
238
);
box
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
handleClick
,
this
);
this
.
addChild
(
box
);
boxGroupUpRight
.
push
(
box
);
}
...
...
@@ -62,4 +68,12 @@ export class BoxGroup extends FYGE.Sprite {
boxGroupUpRight
.
push
(
popBox
);
}
}
handleClick
()
{
// const indexsvga = new FYGE.MovieClip(RES.getRes('盲盒开启-打开-输出.svga'));
// indexsvga.mouseChildren = indexsvga.mouseEnable = false;
// // indexsvga.position.set(100,100)
// this.addChild(indexsvga);
showPanel
(
CostPanel
);
}
}
project/src/scenes/IndexScene.ts
View file @
e70af9c8
...
...
@@ -31,13 +31,8 @@ export class IndexScene extends Scene {
start
()
{
super
.
start
();
<<<<<<<
HEAD
this
.
getIndex
();
// showPanel(SharePanel);
=======
showPanel
(
PrizePanel
);
>>>>>>>
4445
b545174f45bdb5de86ca86be78b8f149ecec
getObject
(
this
,
'index_sharetips'
).
visible
=
false
;
this
.
initContainer
();
this
.
initmask
();
...
...
@@ -94,4 +89,6 @@ 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