Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
babycare_xiaoxiao
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
翁阳
babycare_xiaoxiao
Commits
8dea5a23
Commit
8dea5a23
authored
Aug 03, 2020
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
e94f4a88
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
182 additions
and
8409 deletions
+182
-8409
workspace.xml
.idea/workspace.xml
+15
-13
babycare.getIndex.json
mock/miniTb/babycare.getIndex.json
+1
-1
guide_tip.png
resource/map/guide_tip.png
+0
-0
res.json
resource/res.json
+53
-53
ResJson.ts
src/ResJson.ts
+61
-8338
MapUI.ts
src/scene/map/MapUI.ts
+52
-4
No files found.
.idea/workspace.xml
View file @
8dea5a23
...
...
@@ -3,6 +3,8 @@
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"9cef0552-af3c-4a1c-be1f-dc41ebe5b6db"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/mock/miniTb/babycare.getIndex.json"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/mock/miniTb/babycare.getIndex.json"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/resource/map/guide_tip.png"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/resource/map/guide_tip.png"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/scene/map/MapUI.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/scene/map/MapUI.ts"
afterDir=
"false"
/>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
...
...
@@ -62,7 +64,7 @@
<recent
name=
"$PROJECT_DIR$/resource/SuccessPrizePanel"
/>
</key>
</component>
<component
name=
"RunManager"
selected=
"npm.
dev
"
>
<component
name=
"RunManager"
selected=
"npm.
flushRes
"
>
<configuration
name=
"dev"
type=
"js.build_tools.npm"
temporary=
"true"
nameIsGenerated=
"true"
>
<package-json
value=
"$PROJECT_DIR$/package.json"
/>
<command
value=
"run"
/>
...
...
@@ -86,8 +88,8 @@
</configuration>
<recent_temporary>
<list>
<item
itemvalue=
"npm.dev"
/>
<item
itemvalue=
"npm.flushRes"
/>
<item
itemvalue=
"npm.dev"
/>
</list>
</recent_temporary>
</component>
...
...
@@ -128,7 +130,7 @@
<workItem
from=
"1596079283722"
duration=
"2448000"
/>
<workItem
from=
"1596185145914"
duration=
"75000"
/>
<workItem
from=
"1596187812585"
duration=
"636000"
/>
<workItem
from=
"1596418925126"
duration=
"
3396
000"
/>
<workItem
from=
"1596418925126"
duration=
"
4681
000"
/>
</task>
<task
id=
"LOCAL-00001"
summary=
"111"
>
<created>
1594122339119
</created>
...
...
@@ -447,28 +449,28 @@
<screen
x=
"30"
y=
"23"
width=
"1890"
height=
"1177"
/>
</state>
<state
x=
"131"
y=
"123"
width=
"730"
height=
"977"
key=
"DiffContextDialog/30.23.1890.1177@30.23.1890.1177"
timestamp=
"1596165868169"
/>
<state
width=
"888"
height=
"321"
key=
"GridCell.Tab.0.bottom"
timestamp=
"159643
2717906
"
>
<state
width=
"888"
height=
"321"
key=
"GridCell.Tab.0.bottom"
timestamp=
"159643
3522647
"
>
<screen
x=
"30"
y=
"23"
width=
"1890"
height=
"1177"
/>
</state>
<state
width=
"888"
height=
"321"
key=
"GridCell.Tab.0.bottom/30.23.1890.1177@30.23.1890.1177"
timestamp=
"159643
2717906
"
/>
<state
width=
"888"
height=
"321"
key=
"GridCell.Tab.0.bottom/30.23.1890.1177@30.23.1890.1177"
timestamp=
"159643
3522647
"
/>
<state
width=
"1041"
height=
"321"
key=
"GridCell.Tab.0.bottom/31.23.1649.1027@31.23.1649.1027"
timestamp=
"1595590577198"
/>
<state
width=
"1041"
height=
"321"
key=
"GridCell.Tab.0.bottom/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1595579918465"
/>
<state
width=
"888"
height=
"321"
key=
"GridCell.Tab.0.center"
timestamp=
"159643
2717905
"
>
<state
width=
"888"
height=
"321"
key=
"GridCell.Tab.0.center"
timestamp=
"159643
3522643
"
>
<screen
x=
"30"
y=
"23"
width=
"1890"
height=
"1177"
/>
</state>
<state
width=
"888"
height=
"321"
key=
"GridCell.Tab.0.center/30.23.1890.1177@30.23.1890.1177"
timestamp=
"159643
2717905
"
/>
<state
width=
"888"
height=
"321"
key=
"GridCell.Tab.0.center/30.23.1890.1177@30.23.1890.1177"
timestamp=
"159643
3522643
"
/>
<state
width=
"1041"
height=
"321"
key=
"GridCell.Tab.0.center/31.23.1649.1027@31.23.1649.1027"
timestamp=
"1595590577198"
/>
<state
width=
"1041"
height=
"321"
key=
"GridCell.Tab.0.center/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1595579918464"
/>
<state
width=
"888"
height=
"321"
key=
"GridCell.Tab.0.left"
timestamp=
"159643
2717905
"
>
<state
width=
"888"
height=
"321"
key=
"GridCell.Tab.0.left"
timestamp=
"159643
3522641
"
>
<screen
x=
"30"
y=
"23"
width=
"1890"
height=
"1177"
/>
</state>
<state
width=
"888"
height=
"321"
key=
"GridCell.Tab.0.left/30.23.1890.1177@30.23.1890.1177"
timestamp=
"159643
2717905
"
/>
<state
width=
"888"
height=
"321"
key=
"GridCell.Tab.0.left/30.23.1890.1177@30.23.1890.1177"
timestamp=
"159643
3522641
"
/>
<state
width=
"1041"
height=
"321"
key=
"GridCell.Tab.0.left/31.23.1649.1027@31.23.1649.1027"
timestamp=
"1595590577197"
/>
<state
width=
"1041"
height=
"321"
key=
"GridCell.Tab.0.left/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1595579918463"
/>
<state
width=
"888"
height=
"321"
key=
"GridCell.Tab.0.right"
timestamp=
"159643
2717905
"
>
<state
width=
"888"
height=
"321"
key=
"GridCell.Tab.0.right"
timestamp=
"159643
3522646
"
>
<screen
x=
"30"
y=
"23"
width=
"1890"
height=
"1177"
/>
</state>
<state
width=
"888"
height=
"321"
key=
"GridCell.Tab.0.right/30.23.1890.1177@30.23.1890.1177"
timestamp=
"159643
2717905
"
/>
<state
width=
"888"
height=
"321"
key=
"GridCell.Tab.0.right/30.23.1890.1177@30.23.1890.1177"
timestamp=
"159643
3522646
"
/>
<state
width=
"1041"
height=
"321"
key=
"GridCell.Tab.0.right/31.23.1649.1027@31.23.1649.1027"
timestamp=
"1595590577198"
/>
<state
width=
"1041"
height=
"321"
key=
"GridCell.Tab.0.right/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1595579918465"
/>
<state
x=
"82"
y=
"353"
key=
"IDE.errors.dialog"
timestamp=
"1594777965326"
>
...
...
@@ -516,10 +518,10 @@
</state>
<state
x=
"156"
y=
"286"
key=
"run.anything.popup/30.23.1890.1177@30.23.1890.1177"
timestamp=
"1596432664001"
/>
<state
x=
"157"
y=
"286"
key=
"run.anything.popup/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1595475548860"
/>
<state
x=
"639"
y=
"288"
width=
"671"
height=
"676"
key=
"search.everywhere.popup"
timestamp=
"15964
19278423
"
>
<state
x=
"639"
y=
"288"
width=
"671"
height=
"676"
key=
"search.everywhere.popup"
timestamp=
"15964
33751950
"
>
<screen
x=
"30"
y=
"23"
width=
"1890"
height=
"1177"
/>
</state>
<state
x=
"639"
y=
"288"
width=
"671"
height=
"676"
key=
"search.everywhere.popup/30.23.1890.1177@30.23.1890.1177"
timestamp=
"15964
19278423
"
/>
<state
x=
"639"
y=
"288"
width=
"671"
height=
"676"
key=
"search.everywhere.popup/30.23.1890.1177@30.23.1890.1177"
timestamp=
"15964
33751950
"
/>
<state
x=
"640"
y=
"288"
width=
"670"
height=
"676"
key=
"search.everywhere.popup/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1595584259535"
/>
</component>
</project>
\ No newline at end of file
mock/miniTb/babycare.getIndex.json
View file @
8dea5a23
...
...
@@ -28,7 +28,7 @@
"sendAwardType"
:
"prize"
}
],
"isFristLogin"
:
fals
e
,
"isFristLogin"
:
tru
e
,
"topAward"
:
{
"openPrizeStatus"
:
true
,
"prize"
:
{
...
...
resource/map/guide_tip.png
View replaced file @
e94f4a88
View file @
8dea5a23
16.2 KB
|
W:
|
H:
21.1 KB
|
W:
|
H:
2-up
Swipe
Onion skin
resource/res.json
View file @
8dea5a23
This diff is collapsed.
Click to expand it.
src/ResJson.ts
View file @
8dea5a23
This diff is collapsed.
Click to expand it.
src/scene/map/MapUI.ts
View file @
8dea5a23
...
...
@@ -15,6 +15,7 @@ import Texture = FYGE.Texture;
import
{
LotteryScene
}
from
"../LotteryScene"
;
import
{
GDispatcher
}
from
"../../Main"
;
import
{
G_EVENT
}
from
"../../common/G_EVENT"
;
import
Tween
=
FYGE
.
Tween
;
export
default
class
MapUI
extends
Container
{
public
energyBox
:
EnergyBox
=
null
;
...
...
@@ -99,7 +100,6 @@ export default class MapUI extends Container {
this
.
energyBox
=
this
.
addChild
(
new
EnergyBox
({}));
this
.
creditsBox
=
this
.
addChild
(
new
CreditsBox
({}));
this
.
prizeBox
=
this
.
addChild
(
new
PrizeBox
({}));
}
public
updateUI
()
{
...
...
@@ -207,6 +207,7 @@ class CreditsBox extends Container {
/**
* 连续闯关礼盒
*/
// @ts-ignore
class
PrizeBox
extends
Button
{
private
checkTip
:
TextField
=
null
;
...
...
@@ -214,6 +215,51 @@ class PrizeBox extends Button {
private
prizeImg
:
Sprite
=
null
;
public
initButton
()
{
let
s
:
any
=
this
;
s
.
mouseChildren
=
false
;
s
.
addEventListener
(
"onMouseDown"
,
s
.
_mouseEvent
,
s
);
s
.
addEventListener
(
"onMouseUp"
,
s
.
_mouseEvent
,
s
);
s
.
addEventListener
(
"onMouseOut"
,
s
.
_mouseEvent
,
s
);
s
.
texture
=
s
.
textureUp
;
}
/**
* @method _mouseEvent
* @param e
* @private
*/
protected
_mouseEvent
(
e
:
any
):
void
{
let
s
=
this
;
// @ts-ignore
if
(
!
s
.
_clicked
)
{
if
(
e
.
type
==
MouseEvent
.
MOUSE_DOWN
)
{
//如果是点下
// @ts-ignore
if
(
s
.
textureDown
)
{
// @ts-ignore
s
.
texture
=
s
.
textureDown
}
else
{
this
[
"frames"
]
=
null
// s.scale.x = s.scale.y = 0.9
Tween
.
removeTweens
(
this
);
Tween
.
get
(
this
).
to
({
scaleX
:
1
,
scaleY
:
1
},
50
);
}
}
else
{
// @ts-ignore
if
(
s
.
textureDown
)
{
// @ts-ignore
s
.
texture
=
s
.
textureUp
}
else
{
this
[
"frames"
]
=
this
[
"framesOri"
]
// s.scale.x = s.scale.y = 1
Tween
.
removeTweens
(
this
);
Tween
.
get
(
this
).
to
({
scaleX
:
1.2
,
scaleY
:
1.2
},
50
);
}
}
}
};
constructor
(
data
)
{
super
(
RES
.
getRes
(
'map_prizeBox.png'
));
this
.
initUi
(
data
);
...
...
@@ -221,7 +267,8 @@ class PrizeBox extends Button {
}
private
initUi
(
data
)
{
this
.
position
.
set
(
558
,
269
);
this
.
position
.
set
(
553
,
289
);
this
.
scale
.
set
(
1.2
,
1.2
);
this
.
checkTip
=
this
.
addChild
(
Tools
.
getText
(
'再闯XXX关'
,
22
,
...
...
@@ -240,8 +287,9 @@ class PrizeBox extends Button {
// 490*180
this
.
prizeImg
.
width
=
98
;
this
.
prizeImg
.
height
=
36
;
this
.
prizeImg
.
x
=
this
.
width
/
2
;
this
.
prizeImg
.
anchorTexture
.
x
=
0.5
;
this
.
prizeImg
.
scale
.
set
(
1.2
,
1.2
);
this
.
prizeImg
.
x
=
(
this
.
width
-
98
)
/
2
-
15
;
// this.prizeImg.anchorTexture.x = 0.5;
this
.
prizeImg
.
y
-=
11
;
const
prizes
=
Tools
.
gameData
.
prizes
;
...
...
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