Commit b4735776 authored by haiyoucuv's avatar haiyoucuv

1

parent 2c8b7486
......@@ -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="1595387386693">
<state x="558" y="183" width="884" height="891" key="CommitChangelistDialog2" timestamp="1595388353114">
<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="1595387386693" />
<state width="873" 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="1595388353114" />
<state width="887" 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="873" height="321" key="GridCell.Tab.0.bottom/31.23.1889.1177@31.23.1889.1177" timestamp="1595386044593" />
<state width="873" height="321" key="GridCell.Tab.0.center" timestamp="1595386044592">
<state width="887" height="321" key="GridCell.Tab.0.bottom/31.23.1889.1177@31.23.1889.1177" timestamp="1595555453222" />
<state width="887" 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="873" height="321" key="GridCell.Tab.0.center/31.23.1889.1177@31.23.1889.1177" timestamp="1595386044592" />
<state width="873" height="321" key="GridCell.Tab.0.left" timestamp="1595386044591">
<state width="887" height="321" key="GridCell.Tab.0.center/31.23.1889.1177@31.23.1889.1177" timestamp="1595555453221" />
<state width="887" 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="873" height="321" key="GridCell.Tab.0.left/31.23.1889.1177@31.23.1889.1177" timestamp="1595386044591" />
<state width="873" height="321" key="GridCell.Tab.0.right" timestamp="1595386044592">
<state width="887" height="321" key="GridCell.Tab.0.left/31.23.1889.1177@31.23.1889.1177" timestamp="1595555453219" />
<state width="887" height="321" key="GridCell.Tab.0.right" timestamp="1595555453222">
<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="873" height="321" key="GridCell.Tab.0.right/31.23.1889.1177@31.23.1889.1177" timestamp="1595386044592" />
<state width="887" height="321" key="GridCell.Tab.0.right/31.23.1889.1177@31.23.1889.1177" timestamp="1595555453222" />
<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="1595387387849">
<state x="92" y="351" key="Vcs.Push.Dialog.v2" timestamp="1595388354092">
<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="1595387387849" />
<state x="92" y="351" key="Vcs.Push.Dialog.v2/31.23.1889.1177@31.23.1889.1177" timestamp="1595388354092" />
<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="1594712635697">
<state x="157" y="286" key="run.anything.popup" timestamp="1595475548860">
<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="1594712635697" />
<state x="640" y="288" width="670" height="676" key="search.everywhere.popup" timestamp="1595387031010">
<state x="157" y="286" key="run.anything.popup/31.23.1889.1177@31.23.1889.1177" timestamp="1595475548860" />
<state x="640" y="288" width="670" height="676" key="search.everywhere.popup" timestamp="1595574402812">
<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="1595387031010" />
<state x="640" y="288" width="670" height="676" key="search.everywhere.popup/31.23.1889.1177@31.23.1889.1177" timestamp="1595574402812" />
</component>
</project>
\ No newline at end of file
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);
......@@ -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
}
......@@ -53,8 +53,8 @@
"power": 3,
"tools": {
"HAMMERS": 1,
"STEPS": 0,
"BOOMS": 0
"STEPS": 1,
"BOOMS": 1
},
"topAward": ""
},
......
......@@ -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;
}
}
});
......
......@@ -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;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment