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
b4735776
Commit
b4735776
authored
Jul 24, 2020
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
2c8b7486
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
136 additions
and
35 deletions
+136
-35
workspace.xml
.idea/workspace.xml
+41
-27
answer.js
answer.js
+86
-0
babycare.consumerTools.json
mock/miniTb/babycare.consumerTools.json
+3
-3
babycare.getGameInfo.json
mock/miniTb/babycare.getGameInfo.json
+2
-2
SuccessNoPrizePanel.ts
src/panels/SuccessNoPrizePanel.ts
+2
-2
MapScene.ts
src/scene/map/MapScene.ts
+2
-1
No files found.
.idea/workspace.xml
View file @
b4735776
...
...
@@ -2,7 +2,11 @@
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"9cef0552-af3c-4a1c-be1f-dc41ebe5b6db"
name=
"Default Changelist"
comment=
""
>
<change
afterPath=
"$PROJECT_DIR$/answer.js"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/mock/miniTb/babycare.consumerTools.json"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/mock/miniTb/babycare.consumerTools.json"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/mock/miniTb/babycare.getGameInfo.json"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/mock/miniTb/babycare.getGameInfo.json"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/panels/SuccessNoPrizePanel.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/panels/SuccessNoPrizePanel.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/scene/map/MapScene.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/scene/map/MapScene.ts"
afterDir=
"false"
/>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
...
...
@@ -15,6 +19,7 @@
<list>
<option
value=
"JsonFile"
/>
<option
value=
"TypeScript File"
/>
<option
value=
"JavaScript File"
/>
</list>
</option>
</component>
...
...
@@ -34,7 +39,7 @@
<property
name=
"RunOnceActivity.OpenProjectViewOnStart"
value=
"true"
/>
<property
name=
"RunOnceActivity.ShowReadmeOnStart"
value=
"true"
/>
<property
name=
"WebServerToolWindowFactoryState"
value=
"false"
/>
<property
name=
"last_opened_file_path"
value=
"$PROJECT_DIR$
/resource/common
"
/>
<property
name=
"last_opened_file_path"
value=
"$PROJECT_DIR$"
/>
<property
name=
"node.js.detected.package.tslint"
value=
"true"
/>
<property
name=
"node.js.path.for.package.tslint"
value=
"project"
/>
<property
name=
"node.js.selected.package.tslint"
value=
"(autodetect)"
/>
...
...
@@ -46,13 +51,6 @@
<property
name=
"ts.external.directory.path"
value=
"$PROJECT_DIR$/node_modules/typescript/lib"
/>
</component>
<component
name=
"RecentsManager"
>
<key
name=
"CopyFile.RECENT_KEYS"
>
<recent
name=
"$PROJECT_DIR$/resource/common"
/>
<recent
name=
"$PROJECT_DIR$/resource/map"
/>
<recent
name=
"$PROJECT_DIR$/resource/SuccessPanel"
/>
<recent
name=
"$PROJECT_DIR$/resource/starLight"
/>
<recent
name=
"$PROJECT_DIR$/resource/SuccessPrizePanel"
/>
</key>
<key
name=
"MoveFile.RECENT_KEYS"
>
<recent
name=
"$PROJECT_DIR$/resource/PrizePanel"
/>
<recent
name=
"$PROJECT_DIR$/resource/common"
/>
...
...
@@ -60,6 +58,13 @@
<recent
name=
"$PROJECT_DIR$/resource/SuccessPrizePanel"
/>
<recent
name=
"$PROJECT_DIR$/resource/mapWhaleEffect"
/>
</key>
<key
name=
"CopyFile.RECENT_KEYS"
>
<recent
name=
"$PROJECT_DIR$"
/>
<recent
name=
"$PROJECT_DIR$/resource/common"
/>
<recent
name=
"$PROJECT_DIR$/resource/map"
/>
<recent
name=
"$PROJECT_DIR$/resource/SuccessPanel"
/>
<recent
name=
"$PROJECT_DIR$/resource/starLight"
/>
</key>
</component>
<component
name=
"RunManager"
selected=
"npm.dev"
>
<configuration
name=
"dev"
type=
"js.build_tools.npm"
temporary=
"true"
nameIsGenerated=
"true"
>
...
...
@@ -85,8 +90,8 @@
</configuration>
<recent_temporary>
<list>
<item
itemvalue=
"npm.flushRes"
/>
<item
itemvalue=
"npm.dev"
/>
<item
itemvalue=
"npm.flushRes"
/>
</list>
</recent_temporary>
</component>
...
...
@@ -112,7 +117,9 @@
<workItem
from=
"1595209499266"
duration=
"21574000"
/>
<workItem
from=
"1595296313180"
duration=
"16175000"
/>
<workItem
from=
"1595382049907"
duration=
"765000"
/>
<workItem
from=
"1595382857407"
duration=
"5079000"
/>
<workItem
from=
"1595382857407"
duration=
"11007000"
/>
<workItem
from=
"1595468598356"
duration=
"15042000"
/>
<workItem
from=
"1595555429502"
duration=
"5974000"
/>
</task>
<task
id=
"LOCAL-00001"
summary=
"111"
>
<created>
1594122339119
</created>
...
...
@@ -324,7 +331,14 @@
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1595387386892
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"31"
/>
<task
id=
"LOCAL-00031"
summary=
"Success Panel Effect!"
>
<created>
1595388353249
</created>
<option
name=
"number"
value=
"00031"
/>
<option
name=
"presentableId"
value=
"LOCAL-00031"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1595388353249
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"32"
/>
<servers
/>
</component>
<component
name=
"TypeScriptGeneratedFilesManager"
>
...
...
@@ -350,30 +364,30 @@
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
</state>
<state
x=
"251"
y=
"471"
key=
"ANALYSIS_DLG_com.intellij.analysis.BaseAnalysisAction$1/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1594113080922"
/>
<state
x=
"558"
y=
"183"
width=
"884"
height=
"891"
key=
"CommitChangelistDialog2"
timestamp=
"159538
7386693
"
>
<state
x=
"558"
y=
"183"
width=
"884"
height=
"891"
key=
"CommitChangelistDialog2"
timestamp=
"159538
8353114
"
>
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
</state>
<state
x=
"558"
y=
"183"
width=
"884"
height=
"891"
key=
"CommitChangelistDialog2/31.23.1889.1177@31.23.1889.1177"
timestamp=
"159538
7386693
"
/>
<state
width=
"8
73"
height=
"321"
key=
"GridCell.Tab.0.bottom"
timestamp=
"1595386044593
"
>
<state
x=
"558"
y=
"183"
width=
"884"
height=
"891"
key=
"CommitChangelistDialog2/31.23.1889.1177@31.23.1889.1177"
timestamp=
"159538
8353114
"
/>
<state
width=
"8
87"
height=
"321"
key=
"GridCell.Tab.0.bottom"
timestamp=
"1595555453222
"
>
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
</state>
<state
width=
"866"
height=
"321"
key=
"GridCell.Tab.0.bottom/31.23.1649.1027@31.23.1649.1027"
timestamp=
"1595348373239"
/>
<state
width=
"8
73"
height=
"321"
key=
"GridCell.Tab.0.bottom/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1595386044593
"
/>
<state
width=
"8
73"
height=
"321"
key=
"GridCell.Tab.0.center"
timestamp=
"1595386044592
"
>
<state
width=
"8
87"
height=
"321"
key=
"GridCell.Tab.0.bottom/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1595555453222
"
/>
<state
width=
"8
87"
height=
"321"
key=
"GridCell.Tab.0.center"
timestamp=
"1595555453221
"
>
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
</state>
<state
width=
"866"
height=
"321"
key=
"GridCell.Tab.0.center/31.23.1649.1027@31.23.1649.1027"
timestamp=
"1595348373238"
/>
<state
width=
"8
73"
height=
"321"
key=
"GridCell.Tab.0.center/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1595386044592
"
/>
<state
width=
"8
73"
height=
"321"
key=
"GridCell.Tab.0.left"
timestamp=
"1595386044591
"
>
<state
width=
"8
87"
height=
"321"
key=
"GridCell.Tab.0.center/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1595555453221
"
/>
<state
width=
"8
87"
height=
"321"
key=
"GridCell.Tab.0.left"
timestamp=
"1595555453219
"
>
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
</state>
<state
width=
"866"
height=
"321"
key=
"GridCell.Tab.0.left/31.23.1649.1027@31.23.1649.1027"
timestamp=
"1595348373237"
/>
<state
width=
"8
73"
height=
"321"
key=
"GridCell.Tab.0.left/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1595386044591
"
/>
<state
width=
"8
73"
height=
"321"
key=
"GridCell.Tab.0.right"
timestamp=
"159538604459
2"
>
<state
width=
"8
87"
height=
"321"
key=
"GridCell.Tab.0.left/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1595555453219
"
/>
<state
width=
"8
87"
height=
"321"
key=
"GridCell.Tab.0.right"
timestamp=
"159555545322
2"
>
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
</state>
<state
width=
"866"
height=
"321"
key=
"GridCell.Tab.0.right/31.23.1649.1027@31.23.1649.1027"
timestamp=
"1595348373239"
/>
<state
width=
"8
73"
height=
"321"
key=
"GridCell.Tab.0.right/31.23.1889.1177@31.23.1889.1177"
timestamp=
"159538604459
2"
/>
<state
width=
"8
87"
height=
"321"
key=
"GridCell.Tab.0.right/31.23.1889.1177@31.23.1889.1177"
timestamp=
"159555545322
2"
/>
<state
x=
"82"
y=
"353"
key=
"IDE.errors.dialog"
timestamp=
"1594777965326"
>
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
</state>
...
...
@@ -386,10 +400,10 @@
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
</state>
<state
x=
"300"
y=
"248"
key=
"SettingsEditor/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1594798992724"
/>
<state
x=
"92"
y=
"351"
key=
"Vcs.Push.Dialog.v2"
timestamp=
"159538
7387849
"
>
<state
x=
"92"
y=
"351"
key=
"Vcs.Push.Dialog.v2"
timestamp=
"159538
8354092
"
>
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
</state>
<state
x=
"92"
y=
"351"
key=
"Vcs.Push.Dialog.v2/31.23.1889.1177@31.23.1889.1177"
timestamp=
"159538
7387849
"
/>
<state
x=
"92"
y=
"351"
key=
"Vcs.Push.Dialog.v2/31.23.1889.1177@31.23.1889.1177"
timestamp=
"159538
8354092
"
/>
<state
x=
"87"
y=
"216"
key=
"com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser"
timestamp=
"1594705166397"
>
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
</state>
...
...
@@ -410,13 +424,13 @@
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
</state>
<state
x=
"222"
y=
"390"
key=
"refactoring.ChangeSignatureDialog/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1594631868193"
/>
<state
x=
"157"
y=
"286"
key=
"run.anything.popup"
timestamp=
"159
4712635697
"
>
<state
x=
"157"
y=
"286"
key=
"run.anything.popup"
timestamp=
"159
5475548860
"
>
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
</state>
<state
x=
"157"
y=
"286"
key=
"run.anything.popup/31.23.1889.1177@31.23.1889.1177"
timestamp=
"159
4712635697
"
/>
<state
x=
"640"
y=
"288"
width=
"670"
height=
"676"
key=
"search.everywhere.popup"
timestamp=
"1595
387031010
"
>
<state
x=
"157"
y=
"286"
key=
"run.anything.popup/31.23.1889.1177@31.23.1889.1177"
timestamp=
"159
5475548860
"
/>
<state
x=
"640"
y=
"288"
width=
"670"
height=
"676"
key=
"search.everywhere.popup"
timestamp=
"1595
574402812
"
>
<screen
x=
"31"
y=
"23"
width=
"1889"
height=
"1177"
/>
</state>
<state
x=
"640"
y=
"288"
width=
"670"
height=
"676"
key=
"search.everywhere.popup/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1595
387031010
"
/>
<state
x=
"640"
y=
"288"
width=
"670"
height=
"676"
key=
"search.everywhere.popup/31.23.1889.1177@31.23.1889.1177"
timestamp=
"1595
574402812
"
/>
</component>
</project>
\ No newline at end of file
answer.js
0 → 100644
View file @
b4735776
function
ListNode
(
value
,
next
,
last
)
{
this
.
value
=
value
;
this
.
next
=
next
;
this
.
last
=
last
;
}
ListNode
.
prototype
.
value
=
null
;
ListNode
.
prototype
.
next
=
null
;
ListNode
.
prototype
.
last
=
null
;
function
List
()
{
}
List
.
prototype
.
head
=
null
;
List
.
prototype
.
tail
=
null
;
List
.
prototype
.
length
=
null
;
List
.
prototype
.
getNodeByIndex
=
function
(
index
=
0
)
{
if
(
index
<
-
this
.
length
||
index
>=
this
.
length
)
{
console
.
error
(
'out of range'
);
return
null
;
}
if
(
index
===
0
||
index
===
-
this
.
length
)
{
return
this
.
head
;
}
else
if
(
index
===
this
.
length
-
1
||
index
===
-
1
)
{
return
this
.
tail
;
}
else
if
(
index
>
0
)
{
let
last
=
this
.
head
;
for
(
let
i
=
1
;
i
<=
index
;
i
++
)
{
last
=
last
.
next
;
}
return
last
;
}
else
if
(
index
<
0
)
{
let
next
=
this
.
tail
;
for
(
let
i
=
-
2
;
i
>=
index
;
i
--
)
{
next
=
next
.
last
;
}
return
next
;
}
}
List
.
prototype
.
increase
=
function
(
value
,
index
=
this
.
length
-
1
)
{
const
opNode
=
this
.
getNodeByIndex
(
index
);
if
(
!
opNode
)
{
return
;
}
opNode
.
value
+=
value
;
if
(
opNode
.
value
>=
10
)
{
const
out
=
~~
(
opNode
.
value
/
10
);
opNode
.
value
=
opNode
.
value
%
10
;
this
.
increase
(
out
,
index
-
1
);
}
}
List
.
createList
=
function
(...
value
)
{
const
newList
=
new
List
();
let
last
=
new
ListNode
(
value
[
0
],
null
,
null
);
newList
.
head
=
last
;
for
(
let
i
=
1
;
i
<
value
.
length
;
i
++
)
{
let
newNode
=
new
ListNode
(
value
[
i
],
null
,
last
);
last
.
next
=
newNode
;
last
=
newNode
;
}
newList
.
tail
=
last
;
newList
.
length
=
value
.
length
;
return
newList
;
}
const
list
=
List
.
createList
(
1
,
2
,
3
,
4
);
list
.
increase
(
10
,
2
);
mock/miniTb/babycare.consumerTools.json
View file @
b4735776
...
...
@@ -3,10 +3,10 @@
"data"
:
{
"tools"
:
{
"HAMMERS"
:
1
,
"STEPS"
:
0
,
"BOOMS"
:
0
"STEPS"
:
1
,
"BOOMS"
:
1
}
},
"success"
:
true
,
"message"
:
"成功"
}
\ No newline at end of file
}
mock/miniTb/babycare.getGameInfo.json
View file @
b4735776
...
...
@@ -53,8 +53,8 @@
"power"
:
3
,
"tools"
:
{
"HAMMERS"
:
1
,
"STEPS"
:
0
,
"BOOMS"
:
0
"STEPS"
:
1
,
"BOOMS"
:
1
},
"topAward"
:
""
},
...
...
src/panels/SuccessNoPrizePanel.ts
View file @
b4735776
...
...
@@ -79,9 +79,9 @@ export class SuccessNoPrizePanel extends Panel {
if
(
curLevel
<=
value
&&
d
>=
0
&&
d
<=
dLevel
)
{
upLevel
=
value
;
if
(
curLevel
==
this
.
data
.
level
)
{
dLevel
=
d
+
1
;
}
else
{
dLevel
=
d
;
}
else
{
dLevel
=
d
+
1
;
}
}
});
...
...
src/scene/map/MapScene.ts
View file @
b4735776
...
...
@@ -62,7 +62,8 @@ export class MapScene extends Scene {
let
openPrize
=
GTool
.
readCache
(
'openPrize'
);
if
(
Tools
.
gameData
.
topAward
&&
Tools
.
gameData
.
topAward
.
_id
&&
openPrize
!==
'true'
)
{
GTool
.
writeCache
(
'openPrize'
,
'true'
);
showPanel
(
PrizePanel
,
Tools
.
gameData
.
topAward
);
showPanel
(
PrizePanel
,
JSON
.
parse
(
JSON
.
stringify
(
Tools
.
gameData
.
topAward
)));
Tools
.
gameData
.
topAward
=
null
;
}
}
...
...
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