Commit 2b7e615e authored by haiyoucuv's avatar haiyoucuv

111

parent 19b56259
......@@ -2,73 +2,8 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="31be0130-d27d-4740-b668-956a8050e1bf" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/resource/plants/Cashew_seed.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/plants/Chestnut_1.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/plants/Chestnut_2.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/plants/Chestnut_seed.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/plants/Peanut_seed.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/plants/Pecan_1.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/plants/Pecan_2.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/plants/Pecan_seed.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/plants/Pistachio_seed.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/plants/Sunflower_seed.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Cashew_0_0.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Cashew_0_1.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Cashew_1_0.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Cashew_1_1.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Cashew_2_0.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Cashew_2_1.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Chestnut_0_0.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Chestnut_0_1.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Chestnut_1_0.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Chestnut_1_1.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Chestnut_2_0.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Chestnut_2_1.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Peanut_0_0.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Peanut_0_1.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Peanut_1_0.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Peanut_1_1.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Peanut_2_0.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Peanut_2_1.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Pecan_0_0.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Pecan_0_1.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Pecan_1_0.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Pecan_1_1.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Pecan_2_0.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Pecan_2_1.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Pistachio_0_0.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Pistachio_0_1.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Pistachio_1_0.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Pistachio_1_1.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Pistachio_2_0.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Pistachio_2_1.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Sunflower_0_0.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Sunflower_0_1.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Sunflower_1_0.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Sunflower_1_1.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Sunflower_2_0.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/svga/Sunflower_2_1.svga" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/parts/Game/Effects/BirthEffect.ts" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/parts/Game/Effects/SeedEffect.ts" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/parts/IEffect.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/libs/SvgaParser.d.ts" beforeDir="false" afterPath="$PROJECT_DIR$/libs/SvgaParser.d.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/released/resource/common/common.json" beforeDir="false" afterPath="$PROJECT_DIR$/released/resource/common/common.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/released/resource/common/common.png" beforeDir="false" afterPath="$PROJECT_DIR$/released/resource/common/common.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/released/resource/gameScene/gameScene.json" beforeDir="false" afterPath="$PROJECT_DIR$/released/resource/gameScene/gameScene.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/released/resource/gameScene/gameScene.png" beforeDir="false" afterPath="$PROJECT_DIR$/released/resource/gameScene/gameScene.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/released/resource/res.json" beforeDir="false" afterPath="$PROJECT_DIR$/released/resource/res.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resource/gameScene/game_get.png" beforeDir="false" afterPath="$PROJECT_DIR$/resource/common/game_get.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resource/gameScene/game_plant.png" beforeDir="false" afterPath="$PROJECT_DIR$/resource/common/game_plant.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resource/gameScene/game_water.png" beforeDir="false" afterPath="$PROJECT_DIR$/resource/common/game_water.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resource/res.json" beforeDir="false" afterPath="$PROJECT_DIR$/resource/res.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/ResJson.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/ResJson.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/const/OptionPool.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/const/OptionPool.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/const/staticData.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/const/staticData.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/parts/Game/Option.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/parts/Game/Effects/OptionEffect.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/parts/Game/PlantList.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/parts/Game/PlantList.ts" 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/scenes/GameScene.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/scenes/GameScene.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/scenes/LoadingScene.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/scenes/LoadingScene.ts" afterDir="false" />
</list>
......@@ -150,9 +85,9 @@
</configuration>
<recent_temporary>
<list>
<item itemvalue="npm.dev" />
<item itemvalue="npm.handleRes" />
<item itemvalue="npm.flushRes" />
<item itemvalue="npm.dev" />
</list>
</recent_temporary>
</component>
......@@ -169,7 +104,7 @@
<workItem from="1590749939792" duration="84000" />
<workItem from="1590976087296" duration="15316000" />
<workItem from="1590996860067" duration="14333000" />
<workItem from="1591062735465" duration="24890000" />
<workItem from="1591062735465" duration="26724000" />
</task>
<task id="LOCAL-00001" summary="1">
<created>1591003912929</created>
......@@ -185,7 +120,21 @@
<option name="project" value="LOCAL" />
<updated>1591077711974</updated>
</task>
<option name="localTasksCounter" value="3" />
<task id="LOCAL-00003" summary="11">
<created>1591099376460</created>
<option name="number" value="00003" />
<option name="presentableId" value="LOCAL-00003" />
<option name="project" value="LOCAL" />
<updated>1591099376460</updated>
</task>
<task id="LOCAL-00004" summary="111">
<created>1591099412217</created>
<option name="number" value="00004" />
<option name="presentableId" value="LOCAL-00004" />
<option name="project" value="LOCAL" />
<updated>1591099412217</updated>
</task>
<option name="localTasksCounter" value="5" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
......@@ -193,43 +142,45 @@
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="1" />
<option name="LAST_COMMIT_MESSAGE" value="1" />
<MESSAGE value="11" />
<MESSAGE value="111" />
<option name="LAST_COMMIT_MESSAGE" value="111" />
</component>
<component name="WindowStateProjectService">
<state x="467" y="108" key="CommitChangelistDialog2" timestamp="1591077711519">
<state x="467" y="108" key="CommitChangelistDialog2" timestamp="1591099411935">
<screen x="37" y="23" width="1643" height="1027" />
</state>
<state x="466" y="108" key="CommitChangelistDialog2/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1591003912498" />
<state x="467" y="108" key="CommitChangelistDialog2/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591077711519" />
<state width="303" height="907" key="GridCell.Tab.0.bottom" timestamp="1591086894757">
<state x="467" y="108" key="CommitChangelistDialog2/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591099411935" />
<state width="303" height="907" key="GridCell.Tab.0.bottom" timestamp="1591099896058">
<screen x="37" y="23" width="1643" height="1027" />
</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="303" height="907" key="GridCell.Tab.0.bottom/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591086894757" />
<state width="303" height="907" key="GridCell.Tab.0.center" timestamp="1591086894756">
<state width="303" height="907" key="GridCell.Tab.0.bottom/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591099896058" />
<state width="303" height="907" key="GridCell.Tab.0.center" timestamp="1591099896058">
<screen x="37" y="23" width="1643" height="1027" />
</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="303" height="907" key="GridCell.Tab.0.center/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591086894756" />
<state width="303" height="907" key="GridCell.Tab.0.left" timestamp="1591086894755">
<state width="303" height="907" key="GridCell.Tab.0.center/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591099896058" />
<state width="303" height="907" key="GridCell.Tab.0.left" timestamp="1591099896055">
<screen x="37" y="23" width="1643" height="1027" />
</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="303" height="907" key="GridCell.Tab.0.left/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591086894755" />
<state width="303" height="907" key="GridCell.Tab.0.right" timestamp="1591086894756">
<state width="303" height="907" key="GridCell.Tab.0.left/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591099896055" />
<state width="303" height="907" key="GridCell.Tab.0.right" timestamp="1591099896058">
<screen x="37" y="23" width="1643" height="1027" />
</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="303" height="907" key="GridCell.Tab.0.right/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591086894756" />
<state width="303" height="907" key="GridCell.Tab.0.right/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591099896058" />
<state x="615" y="245" key="RollbackChangesDialog" timestamp="1591077661188">
<screen x="37" y="23" width="1643" height="1027" />
</state>
<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="457" y="276" key="Vcs.Push.Dialog.v2" timestamp="1591077715127">
<state x="457" y="276" key="Vcs.Push.Dialog.v2" timestamp="1591099413476">
<screen x="37" y="23" width="1643" height="1027" />
</state>
<state x="457" y="276" key="Vcs.Push.Dialog.v2/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591077715127" />
<state x="457" y="276" key="Vcs.Push.Dialog.v2/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591099413476" />
<state x="564" y="285" width="587" height="502" key="find.popup" timestamp="1591099201430">
<screen x="37" y="23" width="1643" height="1027" />
</state>
......@@ -238,10 +189,10 @@
<screen x="35" y="23" width="1645" height="1027" />
</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="523" y="250" width="670" height="676" key="search.everywhere.popup" timestamp="1591099095734">
<state x="523" y="250" width="670" height="676" key="search.everywhere.popup" timestamp="1591100526463">
<screen x="37" y="23" width="1643" height="1027" />
</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="523" y="250" width="670" height="676" key="search.everywhere.popup/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591099095734" />
<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="1591100526463" />
</component>
</project>
\ No newline at end of file
......@@ -2,27 +2,67 @@ import IEffect from "../../IEffect";
import { PLANT_STATE, PLANT_TYPE } from "../../../const/staticData";
import { RES } from "../../../../module/RES";
import Sprite = FYGE.Sprite;
import Tween = FYGE.Tween;
import Ease = FYGE.Ease;
import Container = FYGE.Container;
import { Tool } from "../../../Tools";
export class BirthEffect extends Sprite implements IEffect {
export class BirthEffect extends Container implements IEffect {
private type: PLANT_TYPE;
private _type: PLANT_TYPE;
private _state: PLANT_STATE;
private img: Sprite;
public get type(): PLANT_TYPE {
return this._type;
}
public get state(): PLANT_STATE {
return this._state;
}
private sprites = [];
constructor(type: PLANT_TYPE, state: PLANT_STATE) {
super(RES.getRes(`${type}${state}.png`));
super();
const pos = [
[10, 10],
[50, 50],
[60, 60],
[70, 70]
];
[0, 1, 2, 3].forEach((v) => {
const n = this.addChild(Tool.getSprite(`${type}_${state}.png`));
n.anchorTexture.set(0.5, 1);
n.scale.set(0, 0);
n.position.set(pos[v][0], pos[v][1]);
this.sprites.push(n);
});
}
public play() {
// 中心点在树根下方,每次记得对一下
// 缩放:0s(0%,0%)-0.23s(110%,110%)-0.33s(100%,100%);
// 位置:0s(原位)-0.23s(上移10px)-0.33s(下移10px至原位);
this.stop();
this.sprites.forEach((v) => {
const _y = v.y;
Tween.get(v)
.to({scaleX: 1.1, scaleY: 1.1, y: _y - 10}, 230, Ease.quadIn)
.to({scaleX: 1, scaleY: 1, y: _y}, 100, Ease.quadOut);
});
}
public reset() {
this.stop();
this.sprites.forEach((v) => {
v.scale.set(0, 0);
});
}
public stop() {
this.sprites.forEach((v) => {
Tween.removeTweens(v);
});
}
}
......@@ -3,8 +3,8 @@ import { Tool } from "../Tools";
import GameLayer from "../parts/Game/GameLayer";
import { UILayer } from "../parts/UI/UILayer";
import { Land } from "../parts/Game/Land";
import OptionPool from "../const/OptionPool";
import { OPTION_TYPE } from "../const/staticData";
import { PLANT_STATE, PLANT_TYPE } from "../const/staticData";
import { BirthEffect } from "../parts/Game/Effects/BirthEffect";
import MouseEvent = FYGE.MouseEvent;
export class GameScene extends Scene {
......@@ -34,7 +34,8 @@ export class GameScene extends Scene {
// UI层
this.uiLayer = this.addChild(new UILayer());
window['a'] = this.addChild(OptionPool.ins.takeOut(OPTION_TYPE.GET));
window['a'] = this.addChild(new BirthEffect(PLANT_TYPE.Sunflower, PLANT_STATE.STATE1));
window['a'].position.set(200, 600);
}
......
......@@ -77,7 +77,7 @@ export class LoadingScene extends Scene {
private startLoading() {
return Tween.get(this.progressFill)
.to({x: 10}, 2000, Ease.quadInOut);
.to({x: 10}, 1000, Ease.quadInOut);
}
private titleEffect() {
......
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