Commit b2b9e0d4 authored by haiyoucuv's avatar haiyoucuv

BirthEffect Position Fix

parent c51de7e9
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="31be0130-d27d-4740-b668-956a8050e1bf" name="Default Changelist" comment="getEffect"> <list default="true" id="31be0130-d27d-4740-b668-956a8050e1bf" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/resource/svga/浇水动效.svga" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/index.html" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/parts/Game/Effects/BirthEffect.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/parts/Game/Effects/BirthEffect.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Tools.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/Tools.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/parts/Game/Land.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/parts/Game/Land.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/scenes/LoadingScene.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/scenes/LoadingScene.ts" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
...@@ -57,7 +53,7 @@ ...@@ -57,7 +53,7 @@
<recent name="$PROJECT_DIR$/resource/exRecord" /> <recent name="$PROJECT_DIR$/resource/exRecord" />
</key> </key>
</component> </component>
<component name="RunManager" selected="npm.handleRes"> <component name="RunManager" selected="npm.dev">
<configuration name="dev" type="js.build_tools.npm" temporary="true" nameIsGenerated="true"> <configuration name="dev" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" /> <package-json value="$PROJECT_DIR$/package.json" />
<command value="run" /> <command value="run" />
...@@ -90,9 +86,9 @@ ...@@ -90,9 +86,9 @@
</configuration> </configuration>
<recent_temporary> <recent_temporary>
<list> <list>
<item itemvalue="npm.dev" />
<item itemvalue="npm.handleRes" /> <item itemvalue="npm.handleRes" />
<item itemvalue="npm.flushRes" /> <item itemvalue="npm.flushRes" />
<item itemvalue="npm.dev" />
</list> </list>
</recent_temporary> </recent_temporary>
</component> </component>
...@@ -117,7 +113,8 @@ ...@@ -117,7 +113,8 @@
<workItem from="1591321317628" duration="18063000" /> <workItem from="1591321317628" duration="18063000" />
<workItem from="1591438071338" duration="597000" /> <workItem from="1591438071338" duration="597000" />
<workItem from="1591581198126" duration="7855000" /> <workItem from="1591581198126" duration="7855000" />
<workItem from="1591594488054" duration="16845000" /> <workItem from="1591594488054" duration="16883000" />
<workItem from="1591667441623" duration="983000" />
</task> </task>
<task id="LOCAL-00001" summary="1"> <task id="LOCAL-00001" summary="1">
<created>1591003912929</created> <created>1591003912929</created>
...@@ -294,7 +291,14 @@ ...@@ -294,7 +291,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1591609610340</updated> <updated>1591609610340</updated>
</task> </task>
<option name="localTasksCounter" value="26" /> <task id="LOCAL-00026" summary="getEffect">
<created>1591621851460</created>
<option name="number" value="00026" />
<option name="presentableId" value="LOCAL-00026" />
<option name="project" value="LOCAL" />
<updated>1591621851460</updated>
</task>
<option name="localTasksCounter" value="27" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
...@@ -332,36 +336,36 @@ ...@@ -332,36 +336,36 @@
<screen x="37" y="23" width="1643" height="1027" /> <screen x="37" y="23" width="1643" height="1027" />
</state> </state>
<state x="671" y="259" key="#com.intellij.ide.util.MemberChooser/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591344864454" /> <state x="671" y="259" key="#com.intellij.ide.util.MemberChooser/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591344864454" />
<state x="467" y="108" key="CommitChangelistDialog2" timestamp="1591609616568"> <state x="467" y="108" key="CommitChangelistDialog2" timestamp="1591621851021">
<screen x="37" y="23" width="1643" height="1027" /> <screen x="37" y="23" width="1643" height="1027" />
</state> </state>
<state x="466" y="108" key="CommitChangelistDialog2/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1591003912498" /> <state x="466" y="108" key="CommitChangelistDialog2/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1591003912498" />
<state x="2182" y="-102" key="CommitChangelistDialog2/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189619717" /> <state x="2182" y="-102" key="CommitChangelistDialog2/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189619717" />
<state x="467" y="108" key="CommitChangelistDialog2/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591609616568" /> <state x="467" y="108" key="CommitChangelistDialog2/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591621851021" />
<state width="290" height="907" key="GridCell.Tab.0.bottom" timestamp="1591609624063"> <state width="290" height="907" key="GridCell.Tab.0.bottom" timestamp="1591621858411">
<screen x="37" y="23" width="1643" height="1027" /> <screen x="37" y="23" width="1643" height="1027" />
</state> </state>
<state width="499" height="907" key="GridCell.Tab.0.bottom/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1591065953118" /> <state width="499" height="907" key="GridCell.Tab.0.bottom/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1591065953118" />
<state width="257" height="1057" key="GridCell.Tab.0.bottom/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189627828" /> <state width="257" height="1057" key="GridCell.Tab.0.bottom/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189627828" />
<state width="290" height="907" key="GridCell.Tab.0.bottom/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591609624063" /> <state width="290" height="907" key="GridCell.Tab.0.bottom/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591621858411" />
<state width="290" height="907" key="GridCell.Tab.0.center" timestamp="1591609624061"> <state width="290" height="907" key="GridCell.Tab.0.center" timestamp="1591621858410">
<screen x="37" y="23" width="1643" height="1027" /> <screen x="37" y="23" width="1643" height="1027" />
</state> </state>
<state width="499" height="907" key="GridCell.Tab.0.center/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1591065953116" /> <state width="499" height="907" key="GridCell.Tab.0.center/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1591065953116" />
<state width="257" height="1057" key="GridCell.Tab.0.center/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189627827" /> <state width="257" height="1057" key="GridCell.Tab.0.center/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189627827" />
<state width="290" height="907" key="GridCell.Tab.0.center/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591609624061" /> <state width="290" height="907" key="GridCell.Tab.0.center/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591621858410" />
<state width="290" height="907" key="GridCell.Tab.0.left" timestamp="1591609624061"> <state width="290" height="907" key="GridCell.Tab.0.left" timestamp="1591621858410">
<screen x="37" y="23" width="1643" height="1027" /> <screen x="37" y="23" width="1643" height="1027" />
</state> </state>
<state width="499" height="907" key="GridCell.Tab.0.left/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1591065953114" /> <state width="499" height="907" key="GridCell.Tab.0.left/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1591065953114" />
<state width="257" height="1057" key="GridCell.Tab.0.left/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189627825" /> <state width="257" height="1057" key="GridCell.Tab.0.left/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189627825" />
<state width="290" height="907" key="GridCell.Tab.0.left/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591609624061" /> <state width="290" height="907" key="GridCell.Tab.0.left/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591621858410" />
<state width="290" height="907" key="GridCell.Tab.0.right" timestamp="1591609624062"> <state width="290" height="907" key="GridCell.Tab.0.right" timestamp="1591621858410">
<screen x="37" y="23" width="1643" height="1027" /> <screen x="37" y="23" width="1643" height="1027" />
</state> </state>
<state width="499" height="907" key="GridCell.Tab.0.right/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1591065953118" /> <state width="499" height="907" key="GridCell.Tab.0.right/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1591065953118" />
<state width="257" height="1057" key="GridCell.Tab.0.right/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189627828" /> <state width="257" height="1057" key="GridCell.Tab.0.right/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189627828" />
<state width="290" height="907" key="GridCell.Tab.0.right/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591609624062" /> <state width="290" height="907" key="GridCell.Tab.0.right/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591621858410" />
<state x="446" y="278" key="IDE.errors.dialog" timestamp="1591150813027"> <state x="446" y="278" key="IDE.errors.dialog" timestamp="1591150813027">
<screen x="37" y="23" width="1643" height="1027" /> <screen x="37" y="23" width="1643" height="1027" />
</state> </state>
...@@ -371,11 +375,11 @@ ...@@ -371,11 +375,11 @@
</state> </state>
<state x="614" y="245" key="RollbackChangesDialog/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1590993046653" /> <state x="614" y="245" key="RollbackChangesDialog/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1590993046653" />
<state x="615" y="245" key="RollbackChangesDialog/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591077661188" /> <state x="615" y="245" key="RollbackChangesDialog/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591077661188" />
<state x="457" y="276" key="Vcs.Push.Dialog.v2" timestamp="1591608887845"> <state x="457" y="276" key="Vcs.Push.Dialog.v2" timestamp="1591621853192">
<screen x="37" y="23" width="1643" height="1027" /> <screen x="37" y="23" width="1643" height="1027" />
</state> </state>
<state x="2171" y="91" key="Vcs.Push.Dialog.v2/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189622538" /> <state x="2171" y="91" key="Vcs.Push.Dialog.v2/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189622538" />
<state x="457" y="276" key="Vcs.Push.Dialog.v2/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591608887845" /> <state x="457" y="276" key="Vcs.Push.Dialog.v2/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591621853192" />
<state x="417" y="141" key="com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser" timestamp="1591269112575"> <state x="417" y="141" key="com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser" timestamp="1591269112575">
<screen x="37" y="23" width="1643" height="1027" /> <screen x="37" y="23" width="1643" height="1027" />
</state> </state>
...@@ -388,11 +392,11 @@ ...@@ -388,11 +392,11 @@
<screen x="35" y="23" width="1645" height="1027" /> <screen x="35" y="23" width="1645" height="1027" />
</state> </state>
<state x="586" y="314" key="refactoring.ChangeSignatureDialog/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1590980819551" /> <state x="586" y="314" key="refactoring.ChangeSignatureDialog/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1590980819551" />
<state x="523" y="250" width="670" height="676" key="search.everywhere.popup" timestamp="1591612057298"> <state x="523" y="250" width="670" height="676" key="search.everywhere.popup" timestamp="1591667670512">
<screen x="37" y="23" width="1643" height="1027" /> <screen x="37" y="23" width="1643" height="1027" />
</state> </state>
<state x="522" y="250" width="670" height="676" key="search.everywhere.popup/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1591066027960" /> <state x="522" y="250" width="670" height="676" key="search.everywhere.popup/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1591066027960" />
<state x="2248" y="61" width="783" height="775" key="search.everywhere.popup/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591608455312" /> <state x="2248" y="61" width="783" height="775" key="search.everywhere.popup/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591608455312" />
<state x="523" y="250" width="670" height="676" key="search.everywhere.popup/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591612057298" /> <state x="523" y="250" width="670" height="676" key="search.everywhere.popup/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591667670512" />
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -27,19 +27,20 @@ export class BirthEffect extends Container implements IEffect { ...@@ -27,19 +27,20 @@ export class BirthEffect extends Container implements IEffect {
this._state = state; this._state = state;
const pos = [ const pos = [
[93, 78], [100, 105],
[205, 43], [205, 70],
[290, 95], [290, 122],
[180, 134], [180, 161],
]; ];
[0, 1, 2, 3].forEach((v) => { [0, 1, 2, 3].forEach((v) => {
const n = this.addChild(Tool.getSprite(`${type}_${state}_0.png`)); const n = this.addChild(Tool.getSprite(`${type}_${state}_0.png`));
(PLANT_TYPE.Peanut == type && (PLANT_STATE.STATE2 == state || PLANT_STATE.STATE3 == state)) // (PLANT_TYPE.Peanut == type && (PLANT_STATE.STATE2 == state || PLANT_STATE.STATE3 == state))
? n.anchorTexture.set(0.5, 0.6) // ? n.anchorTexture.set(0.5, 0.6)
: n.anchorTexture.set(0.5, 0.95); // : n.anchorTexture.set(0.5, 0.95);
n.anchorTexture.set(0.5, 0.95);
n.position.set(pos[v][0], pos[v][1]); n.position.set(pos[v][0], pos[v][1]);
n.scale.set(0, 0); n.scale.set(0, 0);
this.sprites.push(n); this.sprites.push(n);
...@@ -47,7 +48,6 @@ export class BirthEffect extends Container implements IEffect { ...@@ -47,7 +48,6 @@ export class BirthEffect extends Container implements IEffect {
} }
public play(loop: boolean = false) { public play(loop: boolean = false) {
// 中心点在树根下方,每次记得对一下
// 缩放:0s(0%,0%)-0.23s(110%,110%)-0.33s(100%,100%); // 缩放:0s(0%,0%)-0.23s(110%,110%)-0.33s(100%,100%);
// 位置:0s(原位)-0.23s(上移10px)-0.33s(下移10px至原位); // 位置:0s(原位)-0.23s(上移10px)-0.33s(下移10px至原位);
this.stop(); this.stop();
......
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