Commit db2ddbe4 authored by haiyoucuv's avatar haiyoucuv

task

parent b85feaad
......@@ -2,25 +2,16 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="31be0130-d27d-4740-b668-956a8050e1bf" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/resource/exRecordPanel/record_icon.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/exRecordPanel/record_item_bg.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/panel/comm_bg.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/shopPanel/shop_icon.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/taskPanel/task_icon.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/wareHouse/wareHouse_icon.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/panels/ShopPanel.ts" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/panels/WareHousePanel.ts" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/taskPanel/task_buy_icon.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/released/resource/plants/plants.json" beforeDir="false" afterPath="$PROJECT_DIR$/released/resource/plants/plants.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/released/resource/plants/plants.png" beforeDir="false" afterPath="$PROJECT_DIR$/released/resource/plants/plants.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/index.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/module/views/Panel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/module/views/Panel.ts" 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/panel/comm_bg.png" beforeDir="false" afterPath="$PROJECT_DIR$/resource/panel/comm_bg.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resource/res.json" beforeDir="false" afterPath="$PROJECT_DIR$/resource/res.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/textureMerge.js" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/textureMerge.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/ResJson.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/ResJson.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/const/PlantEffectPool.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/const/PlantEffectPool.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/panels/ExSuccessPanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/ExSuccessPanel.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/panels/RulePanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/RulePanel.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/Land.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/parts/Game/Land.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/parts/UI/UILayer.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/parts/UI/UILayer.ts" afterDir="false" />
</list>
......@@ -49,7 +40,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$/src/panels" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/resource/taskPanel" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
<property name="nodejs_package_manager_path" value="npm" />
......@@ -57,6 +48,13 @@
<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/taskPanel" />
<recent name="$PROJECT_DIR$/src/panels" />
<recent name="$PROJECT_DIR$/resource/panel" />
<recent name="$PROJECT_DIR$/resource/exRecord" />
<recent name="$PROJECT_DIR$/resource" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/resource/panel" />
<recent name="$PROJECT_DIR$/resource/wareHouse" />
......@@ -64,15 +62,8 @@
<recent name="$PROJECT_DIR$/resource/shopPanel" />
<recent name="$PROJECT_DIR$/resource/exRecord" />
</key>
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/src/panels" />
<recent name="$PROJECT_DIR$/resource/panel" />
<recent name="$PROJECT_DIR$/resource/exRecord" />
<recent name="$PROJECT_DIR$/resource" />
<recent name="$PROJECT_DIR$/resource/Cashew" />
</key>
</component>
<component name="RunManager" selected="npm.handleRes">
<component name="RunManager" selected="npm.flushRes">
<configuration name="dev" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
......@@ -105,9 +96,9 @@
</configuration>
<recent_temporary>
<list>
<item itemvalue="npm.dev" />
<item itemvalue="npm.handleRes" />
<item itemvalue="npm.flushRes" />
<item itemvalue="npm.handleRes" />
<item itemvalue="npm.dev" />
</list>
</recent_temporary>
</component>
......@@ -128,7 +119,8 @@
<workItem from="1591148883764" duration="12227000" />
<workItem from="1591166639510" duration="12991000" />
<workItem from="1591234777751" duration="4647000" />
<workItem from="1591239841506" duration="18765000" />
<workItem from="1591239841506" duration="24292000" />
<workItem from="1591321317628" duration="10825000" />
</task>
<task id="LOCAL-00001" summary="1">
<created>1591003912929</created>
......@@ -186,7 +178,14 @@
<option name="project" value="LOCAL" />
<updated>1591189620523</updated>
</task>
<option name="localTasksCounter" value="9" />
<task id="LOCAL-00009" summary="111">
<created>1591269327197</created>
<option name="number" value="00009" />
<option name="presentableId" value="LOCAL-00009" />
<option name="project" value="LOCAL" />
<updated>1591269327197</updated>
</task>
<option name="localTasksCounter" value="10" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
......@@ -199,40 +198,40 @@
<option name="LAST_COMMIT_MESSAGE" value="111" />
</component>
<component name="WindowStateProjectService">
<state x="671" y="259" key="#com.intellij.ide.util.MemberChooser" timestamp="1591151473951">
<state x="671" y="259" key="#com.intellij.ide.util.MemberChooser" timestamp="1591325779617">
<screen x="37" y="23" width="1643" height="1027" />
</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="1591151473951" />
<state x="2182" y="-102" key="CommitChangelistDialog2" timestamp="1591189619717">
<screen x="1680" y="-199" width="1920" height="1177" />
<state x="671" y="259" key="#com.intellij.ide.util.MemberChooser/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591325779617" />
<state x="467" y="108" key="CommitChangelistDialog2" timestamp="1591269326506">
<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="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="1591149486182" />
<state width="344" height="907" key="GridCell.Tab.0.bottom" timestamp="1591269277676">
<state x="467" y="108" key="CommitChangelistDialog2/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591269326506" />
<state width="293" height="907" key="GridCell.Tab.0.bottom" timestamp="1591338480781">
<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="257" height="1057" key="GridCell.Tab.0.bottom/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189627828" />
<state width="344" height="907" key="GridCell.Tab.0.bottom/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591269277676" />
<state width="344" height="907" key="GridCell.Tab.0.center" timestamp="1591269277675">
<state width="293" height="907" key="GridCell.Tab.0.bottom/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591338480781" />
<state width="293" height="907" key="GridCell.Tab.0.center" timestamp="1591338480780">
<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="257" height="1057" key="GridCell.Tab.0.center/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189627827" />
<state width="344" height="907" key="GridCell.Tab.0.center/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591269277675" />
<state width="344" height="907" key="GridCell.Tab.0.left" timestamp="1591269277675">
<state width="293" height="907" key="GridCell.Tab.0.center/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591338480780" />
<state width="293" height="907" key="GridCell.Tab.0.left" timestamp="1591338480780">
<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="257" height="1057" key="GridCell.Tab.0.left/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189627825" />
<state width="344" height="907" key="GridCell.Tab.0.left/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591269277675" />
<state width="344" height="907" key="GridCell.Tab.0.right" timestamp="1591269277676">
<state width="293" height="907" key="GridCell.Tab.0.left/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591338480780" />
<state width="293" height="907" key="GridCell.Tab.0.right" timestamp="1591338480780">
<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="257" height="1057" key="GridCell.Tab.0.right/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591189627828" />
<state width="344" height="907" key="GridCell.Tab.0.right/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591269277675" />
<state width="293" height="907" key="GridCell.Tab.0.right/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591338480780" />
<state x="446" y="278" key="IDE.errors.dialog" timestamp="1591150813027">
<screen x="37" y="23" width="1643" height="1027" />
</state>
......@@ -242,11 +241,11 @@
</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="2171" y="91" key="Vcs.Push.Dialog.v2" timestamp="1591189622538">
<screen x="1680" y="-199" width="1920" height="1177" />
<state x="457" y="276" key="Vcs.Push.Dialog.v2" timestamp="1591269329524">
<screen x="37" y="23" width="1643" height="1027" />
</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="457" y="276" key="Vcs.Push.Dialog.v2/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591149488712" />
<state x="457" y="276" key="Vcs.Push.Dialog.v2/37.23.1643.1027/1680.-199.1920.1177@37.23.1643.1027" timestamp="1591269329524" />
<state x="417" y="141" key="com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser" timestamp="1591269112575">
<screen x="37" y="23" width="1643" height="1027" />
</state>
......@@ -259,11 +258,11 @@
<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="1591269237178">
<state x="523" y="250" width="670" height="676" key="search.everywhere.popup" timestamp="1591336423130">
<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="2248" y="61" width="783" height="775" key="search.everywhere.popup/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591184345503" />
<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="1591269237178" />
<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="1591271608415" />
<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="1591336423130" />
</component>
</project>
\ No newline at end of file
......@@ -18,7 +18,7 @@
<!-- <script type="text/javascript" src="//cstaticdun.126.net/load.min.js"></script> -->
<!-- <script src="libs/zepto.min.js"></script> -->
<!-- <script src="libs/p2.js"></script> -->
<script src="libs/fyge.min.js"></script>
<!-- <script src="libs/fyge.min.js"></script>-->
<script src="http://localhost:3001/FYGE.js"></script>
<!-- <script src="libs/svgaParser.min.js"></script>-->
<style>
......
......@@ -2,7 +2,7 @@ import { Module } from "./Module";
export class Panel extends Module {
private isShowing: boolean
protected isShowing: boolean
showAni() {
if (this.isShowing) return;
this.isShowing = true;
......
......@@ -136,7 +136,7 @@
"atlas": "shopPanel.json"
},
{
"keys": "task_icon.png",
"keys": "task_chat_icon.png,task_collection_icon.png,task_done.png,task_friend_icon.png,task_go.png,task_icon.png,task_item_bg.png,task_shop_icon.png,task_sign_icon.png",
"name": "taskPanel",
"atlas": "taskPanel.json"
},
......
resource/panel/comm_bg.png

19.7 KB | W: | H:

resource/panel/comm_bg.png

22 KB | W: | H:

resource/panel/comm_bg.png
resource/panel/comm_bg.png
resource/panel/comm_bg.png
resource/panel/comm_bg.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -109,7 +109,7 @@
"name": "shopPanel"
},
{
"keys": "task_icon.png",
"keys": "task_buy_icon.png,task_chat_icon.png,task_done.png,task_friend_icon.png,task_go.png,task_icon.png,task_item_bg.png,task_shop_icon.png,task_sign_icon.png,task_vip_icon.png",
"name": "taskPanel"
},
{
......
......@@ -109,7 +109,7 @@ export const ResJson = {
"name": "shopPanel"
},
{
"keys": "task_icon.png",
"keys": "task_buy_icon.png,task_chat_icon.png,task_done.png,task_friend_icon.png,task_go.png,task_icon.png,task_item_bg.png,task_shop_icon.png,task_sign_icon.png,task_vip_icon.png",
"name": "taskPanel"
},
{
......
......@@ -71,6 +71,7 @@ export const s_PlantData = {
export const gameResource = [
'gameScene',
'plants',
'panel',
];
for (let k in s_PlantData) {
......
......@@ -2,6 +2,7 @@ import { Panel } from "../../module/views/Panel";
import { Tool } from "../Tools";
import Sprite = FYGE.Sprite;
import MouseEvent = FYGE.MouseEvent;
import TextField = FYGE.TextField;
export default class ExSuccessPanel extends Panel {
get groupNames() {
......@@ -9,12 +10,33 @@ export default class ExSuccessPanel extends Panel {
}
closeBtn: Sprite;
prizeImg: Sprite;
prizeLabel: TextField;
btn: Sprite;
initUi() {
this.addChild(Tool.getSprite("exSuccessPanel_bg.png"));
// bg and closeBtn
this.addChild(Tool.getSprite('exSuccessPanel_bg.png'));
this.closeBtn = this.addChild(Tool.getSprite('closeBtn.png'));
this.closeBtn.position.set(600, 350);
// 图片
this.prizeImg = this.addChild(Tool.getSprite('进度_fill.png'));
this.prizeImg.width = 427;
this.prizeImg.height = 200;
this.prizeImg.position.set((this.width - this.prizeImg.width) / 2, 677);
// 文案
this.prizeLabel = this.addChild(new TextField());
this.prizeLabel.text = '6字文案';
this.prizeLabel.fillColor = '#c28b4c';
this.prizeLabel.size = 24;
this.prizeLabel.position.set((this.width - this.prizeLabel.textWidth) / 2, 910);
// 按钮
this.btn = this.addChild(Tool.getSprite('exSuccessPanel_btn.png'));
this.btn.position.set((this.width - this.btn.width) / 2, 960);
}
start(data) {
......@@ -22,11 +44,13 @@ export default class ExSuccessPanel extends Panel {
}
initEvents() {
this.closeBtn.addEventListener(MouseEvent.CLICK, this.hidePanel, this)
this.closeBtn.addEventListener(MouseEvent.CLICK, this.hidePanel, this);
this.btn.addEventListener(MouseEvent.CLICK, this.hidePanel, this);
}
removeEvents() {
this.closeBtn.removeEventListener(MouseEvent.CLICK, this.hidePanel, this)
this.closeBtn.removeEventListener(MouseEvent.CLICK, this.hidePanel, this);
this.btn.removeEventListener(MouseEvent.CLICK, this.hidePanel, this);
}
}
......@@ -6,7 +6,7 @@ import { RES } from "../../../module/RES";
import GameLayer from "./GameLayer";
import OptionPool from "../../const/OptionPool";
import OptionEffect from "./Effects/OptionEffect";
import { OPTION_TYPE, PLANT_STATE, PLANT_TYPE, s_PlantData } from "../../const/staticData";
import { OPTION_TYPE, PLANT_STATE, PLANT_TYPE } from "../../const/staticData";
import Plant from "./Plant";
import ProgressBar from "./ProgressBar";
......@@ -145,6 +145,20 @@ export class Land extends Container {
}
}
/**
* 浇水
*/
public water() {
console.log("浇水");
}
/**
* 收获
*/
public get() {
console.log("收获");
}
/**
* 在不是种植状态的基础上改变为选中状态
*/
......@@ -198,7 +212,8 @@ export class Land extends Container {
}
private endTime() {
console.log(111);
console.log(this.id, '倒计时结束');
this.addOption(Math.random() > 0.5 ? OPTION_TYPE.WATER : OPTION_TYPE.GET);
}
/**
......@@ -228,6 +243,11 @@ export class Land extends Container {
private addOption(type: OPTION_TYPE) {
this.removeOption();
this.option = this.addChild(OptionPool.ins.takeOut(type));
if (type == OPTION_TYPE.WATER) {
this.option.addEventListener(MouseEvent.CLICK, this.water, this);
} else if (type == OPTION_TYPE.GET) {
this.option.addEventListener(MouseEvent.CLICK, this.get, this);
}
this.option.x = 160;
this.option.y = -50;
this.option.play();
......@@ -238,6 +258,7 @@ export class Land extends Container {
*/
private removeOption() {
if (this.option) {
this.option.removeAllEventListener();
this.removeChild(this.option);
OptionPool.ins.takeIn(this.option);
this.option = null;
......
......@@ -5,8 +5,10 @@ import { Tool } from "../../Tools";
import { getAdjustBottomHeight, getAdjustTopHeight } from "../../const/myLab";
import MouseEvent = FYGE.MouseEvent;
import PanelCtrl from "../../../module/ctrls/panelCtrl";
import ExSuccessPanel from "../../panels/ExSuccessPanel";
import RulePanel from "../../panels/RulePanel";
import TaskPanel from "../../panels/TaskPanel";
import WareHousePanel from "../../panels/WareHousePanel";
import ShopPanel from "../../panels/ShopPanel";
export class UILayer extends Container {
......@@ -50,17 +52,19 @@ export class UILayer extends Container {
switch (e.target) {
case this.taskBtn:
console.log('点击了任务');
PanelCtrl.instance.show(TaskPanel);
break;
case this.wareHouseBtn:
console.log('点击了仓库');
PanelCtrl.instance.show(WareHousePanel);
break;
case this.storeBtn:
console.log('点击了商店');
PanelCtrl.instance.show(ShopPanel);
break;
case this.ruleBtn:
console.log('点击了规则');
PanelCtrl.instance.show(RulePanel);
// PanelCtrl.instance.show(ExSuccessPanel);
break;
case this.adBtn:
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