Commit dde7d71d authored by haiyoucuv's avatar haiyoucuv

getEffect

parent 58120f8c
...@@ -3,10 +3,8 @@ ...@@ -3,10 +3,8 @@
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="31be0130-d27d-4740-b668-956a8050e1bf" name="Default Changelist" comment=""> <list default="true" id="31be0130-d27d-4740-b668-956a8050e1bf" 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$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/libs/FYGE.d.ts" beforeDir="false" afterPath="$PROJECT_DIR$/libs/FYGE.d.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/parts/Game/GameLayer.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/parts/Game/GameLayer.ts" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/parts/Game/GameLayer.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/parts/Game/GameLayer.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/parts/UI/UILayer.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/parts/UI/UILayer.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/GameScene.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/scenes/GameScene.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" />
...@@ -116,7 +114,7 @@ ...@@ -116,7 +114,7 @@
<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="13317000" /> <workItem from="1591594488054" duration="14053000" />
</task> </task>
<task id="LOCAL-00001" summary="1"> <task id="LOCAL-00001" summary="1">
<created>1591003912929</created> <created>1591003912929</created>
...@@ -279,7 +277,14 @@ ...@@ -279,7 +277,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1591607106108</updated> <updated>1591607106108</updated>
</task> </task>
<option name="localTasksCounter" value="24" /> <task id="LOCAL-00024" summary="getEffect">
<created>1591608886296</created>
<option name="number" value="00024" />
<option name="presentableId" value="LOCAL-00024" />
<option name="project" value="LOCAL" />
<updated>1591608886296</updated>
</task>
<option name="localTasksCounter" value="25" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
...@@ -297,7 +302,6 @@ ...@@ -297,7 +302,6 @@
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<option name="CHECK_NEW_TODO" value="false" /> <option name="CHECK_NEW_TODO" value="false" />
<MESSAGE value="11" />
<MESSAGE value="111" /> <MESSAGE value="111" />
<MESSAGE value="task" /> <MESSAGE value="task" />
<MESSAGE value="panel" /> <MESSAGE value="panel" />
...@@ -309,19 +313,21 @@ ...@@ -309,19 +313,21 @@
<MESSAGE value="重构了种子动画,节省了一点资源" /> <MESSAGE value="重构了种子动画,节省了一点资源" />
<MESSAGE value="重构了出生动画,节省了一些资源" /> <MESSAGE value="重构了出生动画,节省了一些资源" />
<MESSAGE value="1" /> <MESSAGE value="1" />
<option name="LAST_COMMIT_MESSAGE" value="1" /> <MESSAGE value="11" />
<MESSAGE value="getEffect" />
<option name="LAST_COMMIT_MESSAGE" value="getEffect" />
</component> </component>
<component name="WindowStateProjectService"> <component name="WindowStateProjectService">
<state x="671" y="259" key="#com.intellij.ide.util.MemberChooser" timestamp="1591344864454"> <state x="671" y="259" key="#com.intellij.ide.util.MemberChooser" timestamp="1591344864454">
<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="1591607105467"> <state x="467" y="108" key="CommitChangelistDialog2" timestamp="1591608885741">
<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="1591607105467" /> <state x="467" y="108" key="CommitChangelistDialog2/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591608885741" />
<state width="293" height="907" key="GridCell.Tab.0.bottom" timestamp="1591607653535"> <state width="293" height="907" key="GridCell.Tab.0.bottom" timestamp="1591607653535">
<screen x="37" y="23" width="1643" height="1027" /> <screen x="37" y="23" width="1643" height="1027" />
</state> </state>
...@@ -355,11 +361,11 @@ ...@@ -355,11 +361,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="1591604181852"> <state x="457" y="276" key="Vcs.Push.Dialog.v2" timestamp="1591608887845">
<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="1591604181852" /> <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="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>
...@@ -372,11 +378,11 @@ ...@@ -372,11 +378,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="2248" y="61" width="783" height="775" key="search.everywhere.popup" timestamp="1591608455312"> <state x="523" y="250" width="670" height="676" key="search.everywhere.popup" timestamp="1591609038886">
<screen x="1680" y="-199" width="1920" height="1177" /> <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="1591604566804" /> <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="1591609038886" />
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -59,9 +59,6 @@ export default class GameLayer extends Container { ...@@ -59,9 +59,6 @@ export default class GameLayer extends Container {
]; ];
this.initPlant(initData); this.initPlant(initData);
this.getEffect(PLANT_TYPE.Cashew, 1);
} }
/** /**
...@@ -102,12 +99,23 @@ export default class GameLayer extends Container { ...@@ -102,12 +99,23 @@ export default class GameLayer extends Container {
public getEffect(type: PLANT_TYPE, id: number) { public getEffect(type: PLANT_TYPE, id: number) {
let getEffect = this.addChild(Tool.getSprite(`种植框_${s_PlantData[type].name}.png`)); let getEffect = this.addChild(Tool.getSprite(`种植框_${s_PlantData[type].name}.png`));
getEffect.mouseEnable = false;
getEffect.position.set(this.landList[id - 1].x + 185, this.landList[id - 1].y + 55); getEffect.position.set(this.landList[id - 1].x + 185, this.landList[id - 1].y + 55);
let _x = 375 - getEffect.width / 2; let _x = 375 - getEffect.width / 2;
let _y = layers.stageHeight - layers.stageOffsetY - 200; let _y = layers.stageHeight - layers.stageOffsetY - 205;
let __y = getEffect.y;
Tween.get(getEffect) Tween.get(getEffect)
.to({x: _x, y: _y}, 1000, Ease.quadInOut) .to({y: __y - 15}, 200)
.to({y: __y}, 200)
.to({y: __y - 15}, 200)
.to({y: __y}, 200)
.to({x: _x, y: _y, scaleX: 1.2, scaleY: 1.2}, 1000, Ease.quadInOut)
.call(() => { .call(() => {
Tween.get(getEffect)
.to({alpha: 0}, 300)
.call(() => {
this.removeChild(getEffect);
});
G_wareHouseEffect(); G_wareHouseEffect();
}); });
......
...@@ -179,6 +179,7 @@ export class Land extends Container { ...@@ -179,6 +179,7 @@ export class Land extends Container {
*/ */
public get(e: MouseEvent) { public get(e: MouseEvent) {
e.stopPropagation(); e.stopPropagation();
GameLayer.ins.getEffect(this.plant.type, this.id);
this.removeOption(); this.removeOption();
this.clearPlant(); this.clearPlant();
console.log("收获"); console.log("收获");
......
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