Commit eea0db13 authored by haiyoucuv's avatar haiyoucuv

1

parent 436e3050
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="TsLint" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/babycare_xiaoxiao.iml" filepath="$PROJECT_DIR$/.idea/babycare_xiaoxiao.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="9cef0552-af3c-4a1c-be1f-dc41ebe5b6db" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/resource/map/map_avatar_bg.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/map/map_bg1.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/map/map_bg2.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/map/map_bg3.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/map/map_check_disable.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/map/map_check_disable_prize.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/map/map_check_enable.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/map/map_check_enable_cur.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/map/map_prizeBtn.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/map/map_ruleBtn.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/map/map_star_disable.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resource/map/map_star_enable.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/scene/MapScene.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resource/res.json" beforeDir="false" afterPath="$PROJECT_DIR$/resource/res.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Main.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/Main.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/ResJson.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/ResJson.ts" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="TypeScript File" />
</list>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="ProjectId" id="1eLguwUxaFZQKdDU4ke9UiiRNrt" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<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" />
<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)" />
<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" />
<property name="settings.editor.selected.configurable" value="editor.preferences.fonts.default" />
<property name="ts.external.directory.path" value="$APPLICATION_HOME_DIR$/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/resource" />
</key>
</component>
<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" />
<scripts>
<script value="dev" />
</scripts>
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
<configuration name="flushRes" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
<scripts>
<script value="flushRes" />
</scripts>
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
<recent_temporary>
<list>
<item itemvalue="npm.flushRes" />
<item itemvalue="npm.dev" />
</list>
</recent_temporary>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="9cef0552-af3c-4a1c-be1f-dc41ebe5b6db" name="Default Changelist" comment="" />
<created>1594106513515</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1594106513515</updated>
<workItem from="1594106517562" duration="2416000" />
</task>
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="2" />
</component>
<component name="WindowStateProjectService">
<state x="440" y="273" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1594106579644">
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state x="440" y="273" key="#com.intellij.execution.impl.EditConfigurationsDialog/31.23.1889.1177@31.23.1889.1177" timestamp="1594106579644" />
<state width="896" height="330" key="GridCell.Tab.0.bottom" timestamp="1594107808454">
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state width="896" height="330" key="GridCell.Tab.0.bottom/31.23.1889.1177@31.23.1889.1177" timestamp="1594107808454" />
<state width="896" height="330" key="GridCell.Tab.0.center" timestamp="1594107808453">
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state width="896" height="330" key="GridCell.Tab.0.center/31.23.1889.1177@31.23.1889.1177" timestamp="1594107808453" />
<state width="896" height="330" key="GridCell.Tab.0.left" timestamp="1594107808453">
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state width="896" height="330" key="GridCell.Tab.0.left/31.23.1889.1177@31.23.1889.1177" timestamp="1594107808453" />
<state width="896" height="330" key="GridCell.Tab.0.right" timestamp="1594107808454">
<screen x="31" y="23" width="1889" height="1177" />
</state>
<state width="896" height="330" key="GridCell.Tab.0.right/31.23.1889.1177@31.23.1889.1177" timestamp="1594107808454" />
<state x="640" y="288" width="670" height="676" key="search.everywhere.popup" timestamp="1594107828315">
<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="1594107828315" />
</component>
</project>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -40,4 +40,4 @@ ...@@ -40,4 +40,4 @@
}, },
"author": "MrKwon", "author": "MrKwon",
"license": "ISC" "license": "ISC"
} }
\ No newline at end of file
{ {
"groups": [ "groups": [
{ {
"keys": "关闭按钮.png,增加体力背景.png,无字按钮底.png", "keys": "增加体力背景.png,无字按钮底.png",
"name": "BuyPowerPanel" "name": "BuyPowerPanel"
}, },
{ {
"keys": "comCloseBtn.png,toastBg.png,waitingBg.png,waitingRot.png", "keys": "积分不足背景.png,赚取积分.png",
"name": "common"
},
{
"keys": "关闭按钮.png,积分不足背景.png,赚取积分.png",
"name": "CreditsOutPanel" "name": "CreditsOutPanel"
}, },
{ {
"keys": "兑换成功背景.png,关闭按钮.png,知道啦.png", "keys": "兑换成功背景.png,知道啦.png",
"name": "ExchangeSucPanel" "name": "ExchangeSucPanel"
}, },
{ {
"keys": "关闭按钮.png,失败Bg.png,失败重新闯关.png", "keys": "失败Bg.png,失败重新闯关.png",
"name": "FailedPanel" "name": "FailedPanel"
}, },
{ {
"keys": "关闭按钮.png,圆圈.png,开心收下.png", "keys": "圆圈.png,开心收下.png",
"name": "FreePowerPanel" "name": "FreePowerPanel"
}, },
{ {
"keys": "体力不足Bg.png,体力不足按钮.png,关闭按钮.png", "keys": "体力不足Bg.png,体力不足按钮.png",
"name": "NoEnergyPanel" "name": "NoEnergyPanel"
}, },
{ {
"keys": "关闭按钮.png,步数耗尽Bg.png,步数耗尽复活.png,步数耗尽结束按钮.png", "keys": "步数耗尽Bg.png,步数耗尽复活.png,步数耗尽结束按钮.png",
"name": "NoStepBtn" "name": "NoStepBtn"
}, },
{ {
"keys": "关闭按钮.png,活动规则背景.png", "keys": "活动规则背景.png",
"name": "RulePanel" "name": "RulePanel"
}, },
{ {
"keys": "关闭按钮.png,动物.png,开始闯关Bg.png,开始闯关不要能量.png,开始闯关要能量.png", "keys": "开始闯关Bg.png,开始闯关不要能量.png",
"name": "StartPanel" "name": "StartPanel"
}, },
{ {
"keys": "prize.png,关卡弹窗Bg.png,关闭按钮.png,动物.png,开始闯关要能量.png", "keys": "prize.png,关卡弹窗Bg.png",
"name": "StartPanelPrize" "name": "StartPanelPrize"
}, },
{ {
"keys": "star.png,关闭按钮.png,继续闯关大.png,继续闯关小.png,闯关成功Bg.png,闯关成功不满星按钮.png", "keys": "闯关成功Bg.png,闯关成功不满星按钮.png",
"name": "SuccessNoPrizePanel" "name": "SuccessNoPrizePanel"
}, },
{ {
"keys": "star.png,关闭按钮.png,圆角矩形 648.png,按钮-继续闯关.png,红包奖励.png,继续闯关大.png,继续闯关小.png,道具.png,闯关成功.png", "keys": "圆角矩形 648.png,按钮-继续闯关.png,红包奖励.png,道具.png,闯关成功.png",
"name": "SuccessPrizePanel" "name": "SuccessPrizePanel"
}, },
{ {
"keys": "任务背景.png,关闭按钮.png,去完成.png,去完成灰.png", "keys": "任务背景.png,去完成.png,去完成灰.png",
"name": "TaskPanel" "name": "TaskPanel"
}, },
{ {
"keys": "关闭按钮.png,再想想.png,确定.png,道具不足背景.png", "keys": "道具不足背景.png",
"name": "ToolsOutPanel" "name": "ToolsOutPanel"
}, },
{ {
"keys": "使用道具背景.png,关闭按钮.png,再想想.png,确定.png", "keys": "使用道具背景.png",
"name": "UseToolPanel" "name": "UseToolPanel"
},
{
"keys": "comCloseBtn.png,star.png,toastBg.png,waitingBg.png,waitingRot.png,关闭按钮.png,再想想.png,动物.png,开始闯关要能量.png,确定.png,继续闯关大.png,继续闯关小.png",
"name": "common"
},
{
"keys": "map_avatar_bg.png,map_bg1.jpg,map_bg2.jpg,map_bg3.jpg,map_check_disable.png,map_check_disable_prize.png,map_check_enable.png,map_check_enable_cur.png,map_prizeBtn.png,map_ruleBtn.png,map_star_disable.png,map_star_enable.png",
"name": "map"
} }
], ],
"path": "./resource/" "path": "./resource/"
......
...@@ -9,42 +9,7 @@ import { ResJson } from "./ResJson"; ...@@ -9,42 +9,7 @@ import { ResJson } from "./ResJson";
import { destroyNetData, sendTbNet, TbNetName } from "./TaoBaoNet"; import { destroyNetData, sendTbNet, TbNetName } from "./TaoBaoNet";
import { SkinJson } from "./SkinJson"; import { SkinJson } from "./SkinJson";
import { G_EVENT } from "./common/G_EVENT"; import { G_EVENT } from "./common/G_EVENT";
import { MapScene } from "./scene/MapScene";
FYGE.Rectangle.createFromRects = function (...arg: FYGE.Rectangle[]): FYGE.Rectangle {
if (arg.length == 0) {
return null;
} else if (arg.length == 1) {
return arg[0];
} else {
let rect = arg[0];
let x = rect.x, y = rect.y, w = rect.width, h = rect.height, wx1: number, wx2: number, hy1: number, hy2: number;
for (let i: number = 1; i < arg.length; i++) {
//如果宽高为空,后续考虑是否xy需要占位;
if (!arg[i].width && !arg[i].height) continue;
wx1 = x + w;
hy1 = y + h;
wx2 = arg[i].x + arg[i].width;
hy2 = arg[i].y + arg[i].height;
if (x > arg[i].x || wx1 == 0) {
x = arg[i].x;
}
if (y > arg[i].y || hy1 == 0) {
y = arg[i].y;
}
if (wx1 < wx2) {
wx1 = wx2;
}
if (hy1 < hy2) {
hy1 = hy2;
}
rect.x = x;
rect.y = y;
rect.width = wx1 - x;
rect.height = hy1 - y;
}
return rect;
}
}
/** /**
* 全局事件,为了和小程序交互 * 全局事件,为了和小程序交互
...@@ -113,7 +78,7 @@ export class Main { ...@@ -113,7 +78,7 @@ export class Main {
//隐藏加载中 //隐藏加载中
// if (document.getElementById("__loading__")) document.getElementById("__loading__").style.display = "none"; // if (document.getElementById("__loading__")) document.getElementById("__loading__").style.display = "none";
//打开开始场景 //打开开始场景
// changeScene(LoadingScene); changeScene(MapScene);
// changeScene(MainScene); // changeScene(MainScene);
// changeScene(SStartScene); // changeScene(SStartScene);
// changeScene(StoryScene); // changeScene(StoryScene);
......
export const ResJson = { export const ResJson = {
"groups": [ "groups": [
{ {
"keys": "关闭按钮.png,增加体力背景.png,无字按钮底.png", "keys": "增加体力背景.png,无字按钮底.png",
"name": "BuyPowerPanel" "name": "BuyPowerPanel"
}, },
{ {
"keys": "comCloseBtn.png,toastBg.png,waitingBg.png,waitingRot.png", "keys": "积分不足背景.png,赚取积分.png",
"name": "common"
},
{
"keys": "关闭按钮.png,积分不足背景.png,赚取积分.png",
"name": "CreditsOutPanel" "name": "CreditsOutPanel"
}, },
{ {
"keys": "兑换成功背景.png,关闭按钮.png,知道啦.png", "keys": "兑换成功背景.png,知道啦.png",
"name": "ExchangeSucPanel" "name": "ExchangeSucPanel"
}, },
{ {
"keys": "关闭按钮.png,失败Bg.png,失败重新闯关.png", "keys": "失败Bg.png,失败重新闯关.png",
"name": "FailedPanel" "name": "FailedPanel"
}, },
{ {
"keys": "关闭按钮.png,圆圈.png,开心收下.png", "keys": "圆圈.png,开心收下.png",
"name": "FreePowerPanel" "name": "FreePowerPanel"
}, },
{ {
"keys": "体力不足Bg.png,体力不足按钮.png,关闭按钮.png", "keys": "体力不足Bg.png,体力不足按钮.png",
"name": "NoEnergyPanel" "name": "NoEnergyPanel"
}, },
{ {
"keys": "关闭按钮.png,步数耗尽Bg.png,步数耗尽复活.png,步数耗尽结束按钮.png", "keys": "步数耗尽Bg.png,步数耗尽复活.png,步数耗尽结束按钮.png",
"name": "NoStepBtn" "name": "NoStepBtn"
}, },
{ {
"keys": "关闭按钮.png,活动规则背景.png", "keys": "活动规则背景.png",
"name": "RulePanel" "name": "RulePanel"
}, },
{ {
"keys": "关闭按钮.png,动物.png,开始闯关Bg.png,开始闯关不要能量.png,开始闯关要能量.png", "keys": "开始闯关Bg.png,开始闯关不要能量.png",
"name": "StartPanel" "name": "StartPanel"
}, },
{ {
"keys": "prize.png,关卡弹窗Bg.png,关闭按钮.png,动物.png,开始闯关要能量.png", "keys": "prize.png,关卡弹窗Bg.png",
"name": "StartPanelPrize" "name": "StartPanelPrize"
}, },
{ {
"keys": "star.png,关闭按钮.png,继续闯关大.png,继续闯关小.png,闯关成功Bg.png,闯关成功不满星按钮.png", "keys": "闯关成功Bg.png,闯关成功不满星按钮.png",
"name": "SuccessNoPrizePanel" "name": "SuccessNoPrizePanel"
}, },
{ {
"keys": "star.png,关闭按钮.png,圆角矩形 648.png,按钮-继续闯关.png,红包奖励.png,继续闯关大.png,继续闯关小.png,道具.png,闯关成功.png", "keys": "圆角矩形 648.png,按钮-继续闯关.png,红包奖励.png,道具.png,闯关成功.png",
"name": "SuccessPrizePanel" "name": "SuccessPrizePanel"
}, },
{ {
"keys": "任务背景.png,关闭按钮.png,去完成.png,去完成灰.png", "keys": "任务背景.png,去完成.png,去完成灰.png",
"name": "TaskPanel" "name": "TaskPanel"
}, },
{ {
"keys": "关闭按钮.png,再想想.png,确定.png,道具不足背景.png", "keys": "道具不足背景.png",
"name": "ToolsOutPanel" "name": "ToolsOutPanel"
}, },
{ {
"keys": "使用道具背景.png,关闭按钮.png,再想想.png,确定.png", "keys": "使用道具背景.png",
"name": "UseToolPanel" "name": "UseToolPanel"
},
{
"keys": "comCloseBtn.png,star.png,toastBg.png,waitingBg.png,waitingRot.png,关闭按钮.png,再想想.png,动物.png,开始闯关要能量.png,确定.png,继续闯关大.png,继续闯关小.png",
"name": "common"
},
{
"keys": "map_avatar_bg.png,map_bg1.jpg,map_bg2.jpg,map_bg3.jpg,map_check_disable.png,map_check_disable_prize.png,map_check_enable.png,map_check_enable_cur.png,map_prizeBtn.png,map_ruleBtn.png,map_star_disable.png,map_star_enable.png",
"name": "map"
} }
], ],
"path": "./resource/" "path": "./resource/"
......
import { Scene } from "../../module/views/Scene";
import ScrollPage = FYGE.ScrollPage;
import Container = FYGE.Container;
import { Tool } from "../Tools";
export class MapScene extends Scene {
private mapContainer: Container = null;
private scrollPage: ScrollPage = null;
public get groupNames(): string[] {
return ['map'];
}
protected initUi() {
super.initUi();
this.scrollPage = this.addChild(new ScrollPage(750, 1624, 888, true, true));
this.mapContainer = this.scrollPage.view.addChild(new Container());
let bg3 = this.mapContainer.addChild(Tool.getSprite('map_bg3.jpg'));
let bg2 = this.mapContainer.addChild(Tool.getSprite('map_bg2.jpg', 0, bg3.height));
let bg1 = this.mapContainer.addChild(Tool.getSprite('map_bg1.jpg', 0, bg3.height + bg2.height));
this.scrollPage.maxDistance = this.mapContainer.height;
this.scrollPage.scrollTo(this.mapContainer.height, 0);
}
public start(data?: any) {
super.start(data);
}
public initEvents() {
super.initEvents();
}
public removeEvents() {
super.removeEvents();
}
}
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