Commit e8f46f03 authored by wjf's avatar wjf

Merge branch 'master' of gitlab2.dui88.com:MrKwon/babycare_xiaoxiao

parents 2903b311 825947b5
......@@ -3,7 +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$/src/scene/map/MapScene.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/scene/map/MapScene.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/panels/StartPanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/StartPanel.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/panels/StartPanelPrize.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/StartPanelPrize.ts" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -15,6 +16,7 @@
<list>
<option value="JsonFile" />
<option value="TypeScript File" />
<option value="JavaScript File" />
</list>
</option>
</component>
......@@ -34,7 +36,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 +48,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 +55,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 +87,8 @@
</configuration>
<recent_temporary>
<list>
<item itemvalue="npm.flushRes" />
<item itemvalue="npm.dev" />
<item itemvalue="npm.flushRes" />
</list>
</recent_temporary>
</component>
......@@ -112,7 +114,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="9548000" />
</task>
<task id="LOCAL-00001" summary="111">
<created>1594122339119</created>
......@@ -324,7 +328,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 +361,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="1085" height="321" key="GridCell.Tab.0.bottom" timestamp="1595574626482">
<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="1085" height="321" key="GridCell.Tab.0.bottom/31.23.1889.1177@31.23.1889.1177" timestamp="1595574626482" />
<state width="1085" height="321" key="GridCell.Tab.0.center" timestamp="1595574626481">
<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="1085" height="321" key="GridCell.Tab.0.center/31.23.1889.1177@31.23.1889.1177" timestamp="1595574626481" />
<state width="1085" height="321" key="GridCell.Tab.0.left" timestamp="1595574626481">
<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="1085" height="321" key="GridCell.Tab.0.left/31.23.1889.1177@31.23.1889.1177" timestamp="1595574626481" />
<state width="1085" height="321" key="GridCell.Tab.0.right" timestamp="1595574626482">
<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="1085" height="321" key="GridCell.Tab.0.right/31.23.1889.1177@31.23.1889.1177" timestamp="1595574626482" />
<state x="82" y="353" key="IDE.errors.dialog" timestamp="1594777965326">
<screen x="31" y="23" width="1889" height="1177" />
</state>
......@@ -386,10 +397,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 +421,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="1595579540134">
<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="1595579540134" />
</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": ""
},
......
......@@ -45,12 +45,14 @@ export class StartPanel extends Panel {
this.checkTex.x = 0;
this.checkTex.text = `第\t${this.data.level}\t关`;
this.startBtn.visible = (this.data.stars < 3);
this.startBtn2.visible = (this.data.stars >= 3);
this.tipsTex.visible = (this.data.stars < 3);
this.startBtn.visible = !this.data.isPlayed;
this.startBtn2.visible = this.data.isPlayed;
this.tipsTex.visible = !this.data.isPlayed;
this.addChild(new StartTarget(this.data.level))
.position.set(0, 682);
// console.log(this.data);
}
start(data) {
......@@ -58,7 +60,7 @@ export class StartPanel extends Panel {
}
private startGame() {
if (this.data.stars < 3 && Tools.gameData.power <= 0) {// 体力不足
if (!this.data.isPlayed && Tools.gameData.power <= 0) {// 体力不足
showPanel(NoEnergyPanel);
return;
}
......
......@@ -46,8 +46,8 @@ export class StartPanelPrize extends Panel {
this.checkTex.x = 0;
this.checkTex.text = `第\t${this.data.level}\t关`;
this.startBtn.visible = (this.data.stars < 3);
this.startBtn2.visible = (this.data.stars >= 3);
this.startBtn.visible = !this.data.isPlayed;
this.startBtn2.visible = this.data.isPlayed;
this.addChild(new StartTarget(this.data.level))
.position.set(0, 682);
......@@ -62,7 +62,7 @@ export class StartPanelPrize extends Panel {
}
private startGame() {
if (this.data.stars < 3 && Tools.gameData.power <= 0) {// 体力不足
if (!this.data.isPlayed && Tools.gameData.power <= 0) {// 体力不足
showPanel(NoEnergyPanel);
return;
}
......
......@@ -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;
}
}
......
......@@ -246,6 +246,7 @@ class PrizeBox extends Button {
this.checkTip.text = `再闯${dLevel}关`;
this.tip.text = '';
this.prizeImg.texture = Texture.fromUrl(Tools.baseInfo.levelPrize[`level_${upLevel}`]);
this.prizeImg.y -= 20;
} else if (prizes.length == 1 && +prizes[0].level == 120) {
this.checkTip.text = `等待开奖`;
......
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