Commit 4e6c7a50 authored by zjz1994's avatar zjz1994

Merge branch 'recycling' of http://gitlab2.dui88.com/laoqifeng/zeroing-libs into zjz

# Conflicts:
#	dist/.DS_Store
代码暂存
parents 247d9195 e8cb5a37
No preview for this file type
{
"name": "垃圾分类",
"desc": "垃圾分类1.0",
"props": {
"MAX_COL": {
"alias": "图片分成几列",
"type": "number",
"default": 3
}
},
"assets": [
{
"name": "guideTips",
"url": "//yun.duiba.com.cn/aurora/assets/8588817322dec18aba06c5a41fb5fc934e7cff71.svga",
"uuid": "865b76ad-2c89-4898-b2e8-047d0fcfef22",
"ext": ".svga"
},
{
"name": "playBg",
"url": "//yun.duiba.com.cn/aurora/assets/2a5b5087d915c2510f1b96facdb9532798ab59cd.jpg",
"uuid": "1e7dd156-b59a-491d-8154-af2ecf425a8b",
"ext": ".jpg"
},
{
"name": "wrongTips",
"url": "//yun.duiba.com.cn/aurora/assets/875c53d7034aaca6a532c78122f79c9f98f132c1.png",
"uuid": "bc35abf4-2541-4751-9122-e8e185c52e45",
"ext": ".png"
},
{
"name": "rightTips",
"url": "//yun.duiba.com.cn/aurora/assets/61a6c5a09466497ab999a4a504606ce9f923be6b.png",
"uuid": "388ed033-852a-496c-bed8-d941243ea531",
"ext": ".png"
},
{
"name": "idlerWheel",
"url": "//yun.duiba.com.cn/aurora/assets/2a06e8c7b49d8e53955359f7a6dc5bd887978c21.png",
"uuid": "c21d9b0f-1aec-40c8-bb2b-7e674506b833",
"ext": ".png"
},
{
"name": "conveyor",
"url": "//yun.duiba.com.cn/aurora/assets/0015de48d63d00dafe730b43141d747f47069237.png",
"uuid": "4176aa04-d943-444e-beca-5ecc1313b059",
"ext": ".png"
},
{
"name": "num1",
"url": "//yun.duiba.com.cn/aurora/assets/936fb8ddc88fc0d6dd19d8edf82f338b8515538f.png",
"uuid": "6d47c907-b208-4192-bef6-2642d2e5dbb7",
"ext": ".png"
},
{
"name": "num2",
"url": "//yun.duiba.com.cn/aurora/assets/84ff6491549abce966d9662888e3bb314eadf25b.png",
"uuid": "814aee4c-3042-4be5-83f3-a50ebcdcdb34",
"ext": ".png"
},
{
"name": "num3",
"url": "//yun.duiba.com.cn/aurora/assets/4fe7816293b8e1de96b8c51e6c705afdd1bfdb3b.png",
"uuid": "814cd1c7-e7a7-4f1c-90e9-f254a37a2a6f",
"ext": ".png"
},
{
"name": "go",
"url": "//yun.duiba.com.cn/aurora/assets/3447725395d511ac9062d49e85c9d5c6c40552e0.png",
"uuid": "9e1b7c53-9e5c-4a22-a651-5f66f6672599",
"ext": ".png"
},
{
"name": "guideBg",
"url": "//yun.duiba.com.cn/aurora/assets/b43a358298c7669dc9f80ea83bc79c74087b82a7.png",
"uuid": "d96da0ff-b188-41e3-8a8b-8a67108c1e65",
"ext": ".png"
},
{
"name": "guideEle",
"url": "//yun.duiba.com.cn/aurora/assets/b7a5489c9bc7c87479a36a5574f553e25dbe862d.png",
"uuid": "196d410b-a645-4956-9ef1-d6f30be7c1fd",
"ext": ".png"
},
{
"name": "g50",
"url": "//yun.duiba.com.cn/aurora/assets/99a2ed7d25039e005312eed19f56ad1b451564eb.png",
"uuid": "fe97cd48-720b-4412-9bcf-0bdd3a8e96a1",
"ext": ".png"
},
{
"name": "g49",
"url": "//yun.duiba.com.cn/aurora/assets/5564ae74afe698c969f4fe292087bb10d0b21687.png",
"uuid": "g49",
"ext": ".png"
},
{
"name": "g48",
"url": "//yun.duiba.com.cn/aurora/assets/159b05de98c981b940c94e090d28a4885c421235.png",
"uuid": "e1aedf7c-4352-4583-9df2-d2a6aea163dd",
"ext": ".png"
},
{
"name": "g47",
"url": "//yun.duiba.com.cn/aurora/assets/7c48a3b8ca06833310640718d8b8812c6e584c0d.png",
"uuid": "402f8717-a023-4625-9daf-4e8f7964e7a2",
"ext": ".png"
},
{
"name": "g46",
"url": "//yun.duiba.com.cn/aurora/assets/534cef6d7a73022dac36a8f917aaba59138ab5d3.png",
"uuid": "9445c37d-e81c-4d36-a211-eed7a97eea4d",
"ext": ".png"
},
{
"name": "g45",
"url": "//yun.duiba.com.cn/aurora/assets/360c8b26d732c3952621a4949a81329aad2bdf82.png",
"uuid": "10e25631-ea9d-4dd3-8bef-4c340068c81a",
"ext": ".png"
},
{
"name": "g44",
"url": "//yun.duiba.com.cn/aurora/assets/4ad9335add89aebbfcb1e8b501ceb64d4df1a534.png",
"uuid": "202c0ea8-bc6b-4098-aae8-bd29cf13b35f",
"ext": ".png"
},
{
"name": "g43",
"url": "//yun.duiba.com.cn/aurora/assets/2e6f5306255d434119e6dc986a9098b09426e252.png",
"uuid": "bb47d087-004c-4882-8d80-d172c0bff8a7",
"ext": ".png"
},
{
"name": "g42",
"url": "//yun.duiba.com.cn/aurora/assets/5d1537eccc3c3a5252990a8b20b30c357840b14d.png",
"uuid": "3a9c692c-2683-4ad5-a0b5-6193e5f708d1",
"ext": ".png"
},
{
"name": "g41",
"url": "//yun.duiba.com.cn/aurora/assets/4ea16fb41faede6cfbb06d00cdc14899252d49fe.png",
"uuid": "3e6d234e-2393-4d75-9e5c-c87e9f4f4370",
"ext": ".png"
},
{
"name": "g40",
"url": "//yun.duiba.com.cn/aurora/assets/13ee95640c7269d89bf788cf200c734006b06329.png",
"uuid": "2c7df6ab-6ed5-451a-8da3-1de64e9a6518",
"ext": ".png"
},
{
"name": "g39",
"url": "//yun.duiba.com.cn/aurora/assets/07c67a3b9decae820fed0e1a627c9c02e4da3b6e.png",
"uuid": "2614eb6c-9153-4149-b8d6-ef02ac2200ae",
"ext": ".png"
},
{
"name": "g38",
"url": "//yun.duiba.com.cn/aurora/assets/0b8bbf79b28f868822050f82c91092f2d12be0eb.png",
"uuid": "g38",
"ext": ".png"
},
{
"name": "g37",
"url": "//yun.duiba.com.cn/aurora/assets/54be9165464c72c73274424ba811ca297cba748c.png",
"uuid": "g37",
"ext": ".png"
},
{
"name": "g36",
"url": "//yun.duiba.com.cn/aurora/assets/aae4011a2400b0f8653eb4355ec73a338a3a0d61.png",
"uuid": "g36",
"ext": ".png"
},
{
"name": "g35",
"url": "//yun.duiba.com.cn/aurora/assets/a40e4f7fc60a22562681573ba88c4dd43900461e.png",
"uuid": "g35",
"ext": ".png"
},
{
"name": "g34",
"url": "//yun.duiba.com.cn/aurora/assets/a25b8528764046567bddba363a0dc910d0ea7a28.png",
"uuid": "g34",
"ext": ".png"
},
{
"name": "g33",
"url": "//yun.duiba.com.cn/aurora/assets/60689312961248d1469c63a60d67af7a53d0b659.png",
"uuid": "g33",
"ext": ".png"
},
{
"name": "g32",
"url": "//yun.duiba.com.cn/aurora/assets/d78c7693b66d4a7716d741c37d3ed1e334265d42.png",
"uuid": "g32",
"ext": ".png"
},
{
"name": "g31",
"url": "//yun.duiba.com.cn/aurora/assets/d16defc2eb95c09884287031e24f5ebc67c06f55.png",
"uuid": "g31",
"ext": ".png"
},
{
"name": "g30",
"url": "//yun.duiba.com.cn/aurora/assets/550a9de40b797beb8b9504ea797004e29b415276.png",
"uuid": "g30",
"ext": ".png"
},
{
"name": "g29",
"url": "//yun.duiba.com.cn/aurora/assets/aaaf6a8c3c8e550ed34a5bcbf4881e924f9852cb.png",
"uuid": "g29",
"ext": ".png"
},
{
"name": "g28",
"url": "//yun.duiba.com.cn/aurora/assets/fce08988ad87102d726a8d3b90cef89fdc3d2d2a.png",
"uuid": "g28",
"ext": ".png"
},
{
"name": "g27",
"url": "//yun.duiba.com.cn/aurora/assets/fc9dc534b36263f05dff38ece12b8c8dfdcc4008.png",
"uuid": "g27",
"ext": ".png"
},
{
"name": "g26",
"url": "//yun.duiba.com.cn/aurora/assets/e12f30a5a9035bcf9079c67ffdc0a61a4e9d2653.png",
"uuid": "g26",
"ext": ".png"
},
{
"name": "g25",
"url": "//yun.duiba.com.cn/aurora/assets/ea83372b1cc61bc68923748b9bb17cbdab9e0f84.png",
"uuid": "g25",
"ext": ".png"
},
{
"name": "g24",
"url": "//yun.duiba.com.cn/aurora/assets/98db6bd77d14c1ca262ce903fc3ee8f0bf34804b.png",
"uuid": "g24",
"ext": ".png"
},
{
"name": "g23",
"url": "//yun.duiba.com.cn/aurora/assets/9d38482c8505f1483d32d8ca5960f02cbadfe044.png",
"uuid": "g23",
"ext": ".png"
},
{
"name": "g22",
"url": "//yun.duiba.com.cn/aurora/assets/6d6f4c7c6c4dd95e8cf448b3377c92ecfd462a0e.png",
"uuid": "g22",
"ext": ".png"
},
{
"name": "g21",
"url": "//yun.duiba.com.cn/aurora/assets/5a8306bd5c826f10f785230b659df0c9eb3dbfcf.png",
"uuid": "g21",
"ext": ".png"
},
{
"name": "g20",
"url": "//yun.duiba.com.cn/aurora/assets/e21d6e158e601c4677593e0779fed23cc91860e8.png",
"uuid": "g20",
"ext": ".png"
},
{
"name": "g19",
"url": "//yun.duiba.com.cn/aurora/assets/876d34e94dcc98b7d5457be79454042ec65c9fd6.png",
"uuid": "g19",
"ext": ".png"
},
{
"name": "g18",
"url": "//yun.duiba.com.cn/aurora/assets/692aac3b874926dee775ffe0fd73f8c4e7e39bd3.png",
"uuid": "g18",
"ext": ".png"
},
{
"name": "g17",
"url": "//yun.duiba.com.cn/aurora/assets/ed14bd294d187104dc22ac0ecda28109a37593fa.png",
"uuid": "g17",
"ext": ".png"
},
{
"name": "g16",
"url": "//yun.duiba.com.cn/aurora/assets/1e21621783f6be0ba00b869e980cc3a869e53439.png",
"uuid": "g16",
"ext": ".png"
},
{
"name": "g15",
"url": "//yun.duiba.com.cn/aurora/assets/5fa0dc818ea9574f23adf091bdaa40d3cf6ccc11.png",
"uuid": "g15",
"ext": ".png"
},
{
"name": "g14",
"url": "//yun.duiba.com.cn/aurora/assets/18d5086dbd7213a8a0ce7d8a159cba1f1e901d77.png",
"uuid": "g14",
"ext": ".png"
},
{
"name": "g13",
"url": "//yun.duiba.com.cn/aurora/assets/63650960879b4d743b6954e1ec805684325af48d.png",
"uuid": "g13",
"ext": ".png"
},
{
"name": "g12",
"url": "//yun.duiba.com.cn/aurora/assets/b3e66d60f64f00b248c762ce0df045eafe5f70d1.png",
"uuid": "g12",
"ext": ".png"
},
{
"name": "g11",
"url": "//yun.duiba.com.cn/aurora/assets/9998bf5779dffe3097681a09ab97e7822f09ba92.png",
"uuid": "g11",
"ext": ".png"
},
{
"name": "g10",
"url": "//yun.duiba.com.cn/aurora/assets/337719d386e7979debaa3f8a58a17e416c474338.png",
"uuid": "g10",
"ext": ".png"
},
{
"name": "g09",
"url": "//yun.duiba.com.cn/aurora/assets/942bdcd7fd3475bc2a4af2f2b96fb1ad2ab659d9.png",
"uuid": "g09",
"ext": ".png"
},
{
"name": "g08",
"url": "//yun.duiba.com.cn/aurora/assets/1b8e1a03df623870576c063c04a4b8e1aef8bf72.png",
"uuid": "g08",
"ext": ".png"
},
{
"name": "g07",
"url": "//yun.duiba.com.cn/aurora/assets/95a5d437fe386cf9f6c52587c1d2db98f2d23f0c.png",
"uuid": "g07",
"ext": ".png"
},
{
"name": "g06",
"url": "//yun.duiba.com.cn/aurora/assets/2d288b4f549d0e69c6b7fc6e863aaf10e3e2604d.png",
"uuid": "g06",
"ext": ".png"
},
{
"name": "g05",
"url": "//yun.duiba.com.cn/aurora/assets/45c17615fdff30ed6584161a9cea26189239678e.png",
"uuid": "g05",
"ext": ".png"
},
{
"name": "g04",
"url": "//yun.duiba.com.cn/aurora/assets/ffd3cffe53e031b5891bcfcfbcafa4443f6dc40e.png",
"uuid": "g04",
"ext": ".png"
},
{
"name": "g03",
"url": "//yun.duiba.com.cn/aurora/assets/a51f82e1a931ad7c9d5cb915c4f9b7fb3fac0de5.png",
"uuid": "g03",
"ext": ".png"
},
{
"name": "g02",
"url": "//yun.duiba.com.cn/aurora/assets/82699aa20a75cc5670b54a6bb4c83a8c56811fdf.png",
"uuid": "g02",
"ext": ".png"
},
{
"name": "g01",
"url": "//yun.duiba.com.cn/aurora/assets/726ee984b6b56d75d2bd3d89b3c1c4714fb79314.png",
"uuid": "g01",
"ext": ".png"
},
{
"name": "g00",
"url": "//yun.duiba.com.cn/aurora/assets/d2f1d01024247ea64cf35c610fec85f19dd89c21.png",
"uuid": "g00",
"ext": ".png"
},
{
"name": "gameOverMp3",
"url": "//yun.duiba.com.cn/aurora/assets/e3f99add549c50afeb0a13aa31ebe4eaff1a87a6.mp3",
"uuid": "gameOverMp3",
"ext": ".mp3"
},
{
"name": "goMp3",
"url": "//yun.duiba.com.cn/aurora/assets/1a367f83ba6105658c2a97bc1a305f887f7e16e7.mp3",
"uuid": "goMp3",
"ext": ".mp3"
},
{
"name": "wrongTipsMp3",
"url": "//yun.duiba.com.cn/aurora/assets/82719d5220223f404de703db95beac8c2ba101a9.mp3",
"uuid": "wrongTipsMp3",
"ext": ".mp3"
},
{
"name": "rightTipsSound",
"url": "//yun.duiba.com.cn/aurora/assets/dbf1ec24569c939bbf599475fd49110e51951584.mp3",
"uuid": "d7aa31a9-24b9-4082-98f5-a071e1f81a5a",
"ext": ".mp3"
},
{
"name": "numCountDown",
"url": "//yun.duiba.com.cn/aurora/assets/b7a6e76838c82ef34ed6af0e13550633910e0aec.mp3",
"uuid": "c8bae79c-6973-4021-adc1-45db51afe93e",
"ext": ".mp3"
}
],
"events": {
"in": {
"recycling-start": {
"alias": "开始",
"data": {
"time": "游戏时间"
}
},
"recycling-end": {
"alias": "游戏结束",
"data": {}
},
"recycling-stop": {
"alias": "停止"
}
},
"out": {
"recycling-time-update": {
"alias": "倒计时更新",
"data": {
"time": "剩余时间"
}
},
"recycling-score-update": {
"alias": "分数更新",
"data": {
"score": "分数"
}
},
"recycling-game-end": {
"alias": "游戏结束",
"data": {}
},
"recycling-game-success": {
"alias": "游戏成功",
"data": {
"time": "游戏消耗时间"
}
}
}
},
"id": "recycling",
"code": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('tslib')) :\n\ttypeof define === 'function' && define.amd ? define(['tslib'], factory) :\n\t(global = global || self, global.recycling = factory(global.tslib));\n}(this, (function (tslib) { 'use strict';\n\n\tfunction getTexture(uuid) {\n\t return engine.Texture.from(getAssetByUUID(uuid).uuid);\n\t}\n\tfunction getTextureByName(name) {\n\t return getTexture(engine.getAssetByName(name).uuid);\n\t}\n\tfunction playSound(name) {\n\t engine.playSound(engine.getAssetByName(name).uuid, { keep: true });\n\t}\n\tfunction createSvga(name, anchorName) {\n\t var inst = new svga.Svga();\n\t inst.source = 'asset://' + engine.getAssetByName(name).uuid;\n\t return inst;\n\t}\n\n\tvar props = {};\n\tfunction prepareProps() {\n\t var metaProps = getProps();\n\t engine.injectProp(props, metaProps);\n\t}\n\tfunction injectProps(p) {\n\t engine.injectProp(props, p);\n\t}\n\n\tvar Conveyor = (function (_super) {\n\t tslib.__extends(Conveyor, _super);\n\t function Conveyor() {\n\t var _this = _super.call(this) || this;\n\t _this.y = 904.21;\n\t var sp = new engine.Sprite(getTextureByName('conveyor'));\n\t _this.addChild(sp);\n\t _this.idx0 = _this.createItem(75, 50);\n\t _this.idx1 = _this.createItem(225, 50);\n\t _this.idx2 = _this.createItem(375, 50);\n\t _this.idx3 = _this.createItem(525, 50);\n\t _this.idx4 = _this.createItem(675, 50);\n\t return _this;\n\t }\n\t Conveyor.prototype.clear = function () {\n\t this.clearItem(this.idx0);\n\t this.clearItem(this.idx1);\n\t this.clearItem(this.idx2);\n\t this.clearItem(this.idx3);\n\t this.clearItem(this.idx4);\n\t };\n\t Conveyor.prototype.clearItem = function (idx) {\n\t if (idx.children.length > 0)\n\t idx.removeChildAt(0);\n\t };\n\t Conveyor.prototype.createItem = function (x, y) {\n\t var sp = new engine.Sprite();\n\t this.addChild(sp);\n\t sp.x = x;\n\t sp.y = y;\n\t return sp;\n\t };\n\t return Conveyor;\n\t}(engine.Sprite));\n\n\tvar GarbageTypes;\n\t(function (GarbageTypes) {\n\t GarbageTypes[\"recoverableWaste\"] = \"recoverableWaste\";\n\t GarbageTypes[\"harmfulWaste\"] = \"harmfulWaste\";\n\t GarbageTypes[\"wetWaste\"] = \"wetWaste\";\n\t GarbageTypes[\"dryWaste\"] = \"dryWaste\";\n\t})(GarbageTypes || (GarbageTypes = {}));\n\n\tvar GarbageConfig = (function () {\n\t function GarbageConfig() {\n\t }\n\t GarbageConfig.config = [\n\t { name: \"保鲜盒\", source: \"g00\", type: GarbageTypes.recoverableWaste, width: 129, height: 111 },\n\t { name: \"报纸\", source: \"g01\", type: GarbageTypes.recoverableWaste, width: 138, height: 144 },\n\t { name: \"贝壳\", source: \"g02\", type: GarbageTypes.dryWaste, width: 79, height: 117 },\n\t { name: \"冰箱\", source: \"g03\", type: GarbageTypes.recoverableWaste, width: 63, height: 151 },\n\t { name: \"菜梗菜叶\", source: \"g04\", type: GarbageTypes.wetWaste, width: 144, height: 98 },\n\t { name: \"残枝落叶\", source: \"g05\", type: GarbageTypes.wetWaste, width: 120, height: 99 },\n\t { name: \"茶叶渣\", source: \"g06\", type: GarbageTypes.wetWaste, width: 86, height: 96 },\n\t { name: \"尘土\", source: \"g07\", type: GarbageTypes.dryWaste, width: 109, height: 114 },\n\t { name: \"创口贴\", source: \"g08\", type: GarbageTypes.dryWaste, width: 112, height: 90 },\n\t { name: \"大骨头\", source: \"g09\", type: GarbageTypes.dryWaste, width: 89, height: 101 },\n\t { name: \"普通干电池\", source: \"g11\", type: GarbageTypes.dryWaste, width: 89, height: 131 },\n\t { name: \"方便面盒\", source: \"g12\", type: GarbageTypes.dryWaste, width: 89, height: 168 },\n\t { name: \"废弃食用油脂\", source: \"g13\", type: GarbageTypes.wetWaste, width: 131, height: 164 },\n\t { name: \"骨骼内脏\", source: \"g14\", type: GarbageTypes.wetWaste, width: 104, height: 82 },\n\t { name: \"锅具\", source: \"g15\", type: GarbageTypes.recoverableWaste, width: 119, height: 149 },\n\t { name: \"果核\", source: \"g16\", type: GarbageTypes.wetWaste, width: 99, height: 95 },\n\t { name: \"果皮\", source: \"g17\", type: GarbageTypes.wetWaste, width: 115, height: 127 },\n\t { name: \"化妆品\", source: \"g18\", type: GarbageTypes.harmfulWaste, width: 67, height: 151 },\n\t { name: \"鸡蛋壳\", source: \"g19\", type: GarbageTypes.wetWaste, width: 99, height: 107 },\n\t { name: \"剪刀\", source: \"g20\", type: GarbageTypes.recoverableWaste, width: 96, height: 127 },\n\t { name: \"胶带\", source: \"g21\", type: GarbageTypes.dryWaste, width: 87, height: 113 },\n\t { name: \"榴莲壳\", source: \"g22\", type: GarbageTypes.dryWaste, width: 136, height: 116 },\n\t { name: \"毛巾\", source: \"g23\", type: GarbageTypes.recoverableWaste, width: 108, height: 96 },\n\t { name: \"纽扣电池\", source: \"g24\", type: GarbageTypes.harmfulWaste, width: 87, height: 89 },\n\t { name: \"破旧陶瓷罐\", source: \"g25\", type: GarbageTypes.dryWaste, width: 110, height: 125 },\n\t { name: \"杀虫剂\", source: \"g26\", type: GarbageTypes.harmfulWaste, width: 64, height: 160 },\n\t { name: \"剩菜剩饭\", source: \"g27\", type: GarbageTypes.wetWaste, width: 128, height: 96 },\n\t { name: \"手机\", source: \"g28\", type: GarbageTypes.recoverableWaste, width: 82, height: 142 },\n\t { name: \"书本\", source: \"g29\", type: GarbageTypes.recoverableWaste, width: 106, height: 132 },\n\t { name: \"玻璃杯\", source: \"g30\", type: GarbageTypes.recoverableWaste, width: 62, height: 119 },\n\t { name: \"水银温度计\", source: \"g31\", type: GarbageTypes.harmfulWaste, width: 109, height: 162 },\n\t { name: \"水银血压计\", source: \"g32\", type: GarbageTypes.harmfulWaste, width: 115, height: 147 },\n\t { name: \"塑料桶\", source: \"g33\", type: GarbageTypes.recoverableWaste, width: 92, height: 131 },\n\t { name: \"卫生纸\", source: \"g34\", type: GarbageTypes.dryWaste, width: 92, height: 132 },\n\t { name: \"污染织物\", source: \"g35\", type: GarbageTypes.dryWaste, width: 128, height: 139 },\n\t { name: \"污染纸张\", source: \"g36\", type: GarbageTypes.dryWaste, width: 96, height: 136 },\n\t { name: \"洗衣机\", source: \"g37\", type: GarbageTypes.recoverableWaste, width: 87, height: 157 },\n\t { name: \"烟蒂\", source: \"g38\", type: GarbageTypes.dryWaste, width: 87, height: 124 },\n\t { name: \"药品\", source: \"g39\", type: GarbageTypes.harmfulWaste, width: 109, height: 131 },\n\t { name: \"药品包装\", source: \"g40\", type: GarbageTypes.harmfulWaste, width: 108, height: 125 },\n\t { name: \"椰子壳\", source: \"g41\", type: GarbageTypes.dryWaste, width: 104, height: 119 },\n\t { name: \"衣服\", source: \"g42\", type: GarbageTypes.recoverableWaste, width: 83, height: 137 },\n\t { name: \"衣架\", source: \"g43\", type: GarbageTypes.recoverableWaste, width: 132, height: 125 },\n\t { name: \"易拉罐\", source: \"g44\", type: GarbageTypes.recoverableWaste, width: 65, height: 133 },\n\t { name: \"荧光灯\", source: \"g45\", type: GarbageTypes.harmfulWaste, width: 90, height: 118 },\n\t { name: \"油漆桶\", source: \"g46\", type: GarbageTypes.harmfulWaste, width: 65, height: 143 },\n\t { name: \"一次性纸杯\", source: \"g47\", type: GarbageTypes.dryWaste, width: 76, height: 116 },\n\t { name: \"纸尿裤\", source: \"g48\", type: GarbageTypes.dryWaste, width: 93, height: 138 },\n\t { name: \"纸箱\", source: \"g49\", type: GarbageTypes.recoverableWaste, width: 112, height: 118 },\n\t { name: \"指甲油\", source: \"g50\", type: GarbageTypes.harmfulWaste, width: 64, height: 138 },\n\t ];\n\t return GarbageConfig;\n\t}());\n\n\tvar transStores = (function (list) {\n\t var tmp = [];\n\t var contains = function (val) {\n\t for (var _i = 0, tmp_1 = tmp; _i < tmp_1.length; _i++) {\n\t var i = tmp_1[_i];\n\t if (val.targetType == i.targetType && val.itemType == i.itemType && val.itemName == i.itemName)\n\t return true;\n\t }\n\t return false;\n\t };\n\t list.forEach(function (i) {\n\t if (!contains(i))\n\t tmp.push(i);\n\t });\n\t list = tmp;\n\t tmp = [];\n\t var nameList = [];\n\t var contains2 = function (val) {\n\t for (var _i = 0, tmp_2 = tmp; _i < tmp_2.length; _i++) {\n\t var i = tmp_2[_i];\n\t if (val.itemName == i.itemName) {\n\t nameList.push(i.itemName);\n\t return true;\n\t }\n\t }\n\t return false;\n\t };\n\t list.forEach(function (i) {\n\t if (!contains2(i))\n\t tmp.push(i);\n\t });\n\t list = tmp;\n\t list.forEach(function (i) {\n\t if (nameList.indexOf(i.itemName) != -1) {\n\t i.targetType = i.itemType;\n\t }\n\t });\n\t return list.map(function (i) {\n\t return {\n\t 'targetName': getTargetName(i.targetType),\n\t 'isCorrect': i.targetType == i.itemType,\n\t 'itemName': i.itemName,\n\t 'itemTypeName': getTargetName(i.itemType)\n\t };\n\t });\n\t});\n\tvar getTargetName = function (type) {\n\t switch (type) {\n\t case GarbageTypes.recoverableWaste:\n\t return '可回收物';\n\t case GarbageTypes.harmfulWaste:\n\t return '有害垃圾';\n\t case GarbageTypes.wetWaste:\n\t return '湿垃圾';\n\t case GarbageTypes.dryWaste:\n\t return '其他垃圾';\n\t }\n\t};\n\n\tvar checkHit = (function (view, rect) {\n\t var x = view.x, y = view.y;\n\t var _a = view.texture, width = _a.width, height = _a.height;\n\t if (x > rect.x && y > rect.y && (x + width) < (rect.x + rect.width) && (y + height) < (rect.y + rect.height)) {\n\t return true;\n\t }\n\t return false;\n\t});\n\n\tvar removeChild = (function (d) {\n\t if (d && d.parent) {\n\t d.parent.removeChild(d);\n\t }\n\t});\n\n\tvar removeEle = (function (e, arr) {\n\t var index = arr.indexOf(e);\n\t if (index >= 0) {\n\t arr.splice(index, 1);\n\t }\n\t});\n\n\tvar shuffle = (function (arr) {\n\t var _a;\n\t var i = arr.length;\n\t while (i) {\n\t var j = Math.floor(Math.random() * i--);\n\t _a = [arr[i], arr[j]], arr[j] = _a[0], arr[i] = _a[1];\n\t }\n\t return arr;\n\t});\n\n\tvar WrongTips = (function (_super) {\n\t tslib.__extends(WrongTips, _super);\n\t function WrongTips() {\n\t var _this = _super.call(this) || this;\n\t _this.img = new engine.Image();\n\t _this.img.texture = getTextureByName('wrongTips');\n\t _this.addChild(_this.img);\n\t _this.img.anchorX = 88 / 2;\n\t _this.img.anchorY = 85 / 2;\n\t _this.visible = false;\n\t return _this;\n\t }\n\t WrongTips.prototype.play = function (rect) {\n\t this.visible = true;\n\t if (props.sound) {\n\t playSound(\"wrongTipsMp3\");\n\t }\n\t var dur = 70;\n\t var stren = 20;\n\t engine.Tween.get(this.img).set({ x: 0, y: 0, scaleX: 1, scaleY: 1, alpha: 1 })\n\t .to({ x: stren }, dur)\n\t .to({ x: 0 }, dur)\n\t .to({ x: -stren }, dur)\n\t .to({ x: 0 }, dur)\n\t .wait(200)\n\t .to({ alpha: 0 }, 300);\n\t this.x = rect.x + 180;\n\t this.y = rect.y;\n\t };\n\t return WrongTips;\n\t}(engine.Sprite));\n\tvar getTargetRect = function (targetType, gameview) {\n\t switch (targetType) {\n\t case GarbageTypes.dryWaste:\n\t return gameview.dryWaste;\n\t case GarbageTypes.wetWaste:\n\t return gameview.wetWaste;\n\t case GarbageTypes.harmfulWaste:\n\t return gameview.harmfulWaste;\n\t case GarbageTypes.recoverableWaste:\n\t return gameview.recoverableWaste;\n\t }\n\t};\n\n\tvar Conveyors = (function (_super) {\n\t tslib.__extends(Conveyors, _super);\n\t function Conveyors(p) {\n\t var _this = _super.call(this) || this;\n\t _this.conveyorsPool = [];\n\t _this.GarbageConfig = GarbageConfig.config;\n\t _this.datas = [];\n\t _this.wrapper = p;\n\t return _this;\n\t }\n\t Conveyors.prototype.initData = function (conveyor0, conveyor1) {\n\t this.conveyor0 = conveyor0;\n\t this.conveyor1 = conveyor1;\n\t };\n\t Conveyors.prototype.setDefault = function () {\n\t this.score = 0;\n\t this.conveyorsPool.push(this.conveyor0);\n\t this.conveyorsPool.push(this.conveyor1);\n\t var allConfigs = shuffle(this.GarbageConfig.concat([]));\n\t for (var i = 0; i < GarbageConfig.config.length; i++) {\n\t allConfigs[i].idx = i;\n\t allConfigs[i].isRight = false;\n\t allConfigs[i].isMistake = false;\n\t allConfigs[i].isOnStage = false;\n\t this.datas.push(allConfigs[i]);\n\t }\n\t for (var i = 0; i < 5; i++) {\n\t var data = this.datas[i];\n\t var view = new engine.Sprite(getTextureByName(data.source));\n\t view.isWrong = false;\n\t view.isRight = false;\n\t data.isOnStage = true;\n\t view.data = data;\n\t view.type = data.type;\n\t view.name = data.name;\n\t view.anchorX = data.width / 2;\n\t view.anchorY = data.height;\n\t view.x = -data.width / 2;\n\t view.y = -data.height + 40;\n\t this.conveyor1[\"idx\" + i].addChild(view);\n\t view.addEventListener(engine.MouseEvent.MOUSE_DOWN, this.onDown_garbage, this);\n\t }\n\t };\n\t Conveyors.prototype.startConveyors = function () {\n\t this.setDefault();\n\t engine.gameStage.addEventListener(engine.Event.ENTER_FRAME, this.onEnterFrame, this);\n\t };\n\t Conveyors.prototype.onEnterFrame = function (ENTER_FRAME, onEnterFrame, arg2) {\n\t if (this.score == (props.maxScore || 100)) {\n\t this.gameOver();\n\t this.wrapper.stop();\n\t if (props.sound)\n\t playSound(\"gameOverMp3\");\n\t }\n\t this.conveyorsPool.forEach(function (conveyor) {\n\t conveyor.x -= props.speed || 3;\n\t });\n\t if (this.conveyorsPool[this.conveyorsPool.length - 1].x <= 764) {\n\t var conveyor = new Conveyor();\n\t conveyor.x = this.conveyorsPool[this.conveyorsPool.length - 1].x + 764;\n\t this.wrapper.addChild(conveyor);\n\t this.conveyorsPool.push(conveyor);\n\t }\n\t else {\n\t var dataList = [];\n\t for (var n = 0; n < this.datas.length; n++) {\n\t var dataItem = this.datas[n];\n\t if (!dataItem.isRight && !dataItem.isOnStage) {\n\t dataList.push(dataItem);\n\t }\n\t }\n\t var lastConveyor = this.conveyorsPool[this.conveyorsPool.length - 1];\n\t for (var m = 0; m < 5; m++) {\n\t if (!lastConveyor[\"idx\" + m].children[0]) {\n\t var data = dataList.shift();\n\t if (data) {\n\t data.isOnStage = true;\n\t var view = new engine.Sprite(getTextureByName(data.source));\n\t view.data = data;\n\t view.isWrong = false;\n\t view.isRight = false;\n\t view.type = data.type;\n\t view.name = data.name;\n\t view.anchorX = data.width / 2;\n\t view.anchorY = data.height;\n\t view.x = -data.width / 2;\n\t view.y = -data.height + 40;\n\t lastConveyor[\"idx\" + m].addChild(view);\n\t view.addEventListener(engine.MouseEvent.MOUSE_DOWN, this.onDown_garbage, this);\n\t }\n\t else {\n\t break;\n\t }\n\t }\n\t }\n\t }\n\t if (this.conveyorsPool[0].x < -750) {\n\t for (var k = 0; k < this.datas.length; k++) {\n\t var dataItem = this.datas[k];\n\t var idx4 = this.conveyorsPool[0][\"idx\" + 4];\n\t if (idx4.children[0]) {\n\t if (dataItem.name == idx4.children[0].name) {\n\t dataItem.isOnStage = false;\n\t removeEle(dataItem, this.datas);\n\t this.datas.push(dataItem);\n\t idx4.removeChild(idx4.children[0]);\n\t break;\n\t }\n\t }\n\t }\n\t this.conveyorsPool.shift();\n\t }\n\t else if (this.conveyorsPool[0].x < -600) {\n\t for (var k = 0; k < this.datas.length; k++) {\n\t var dataItem = this.datas[k];\n\t var idx3 = this.conveyorsPool[0][\"idx\" + 3];\n\t if (idx3.children[0]) {\n\t if (dataItem.name == idx3.children[0].name) {\n\t dataItem.isOnStage = false;\n\t removeEle(dataItem, this.datas);\n\t this.datas.push(dataItem);\n\t idx3.removeChild(idx3.children[0]);\n\t break;\n\t }\n\t }\n\t }\n\t }\n\t else if (this.conveyorsPool[0].x < -450) {\n\t for (var k = 0; k < this.datas.length; k++) {\n\t var dataItem = this.datas[k];\n\t var idx2 = this.conveyorsPool[0][\"idx\" + 2];\n\t if (idx2.children[0]) {\n\t if (dataItem.name == idx2.children[0].name) {\n\t dataItem.isOnStage = false;\n\t removeEle(dataItem, this.datas);\n\t this.datas.push(dataItem);\n\t idx2.removeChild(idx2.children[0]);\n\t break;\n\t }\n\t }\n\t }\n\t }\n\t else if (this.conveyorsPool[0].x < -300) {\n\t for (var k = 0; k < this.datas.length; k++) {\n\t var dataItem = this.datas[k];\n\t var idx1 = this.conveyorsPool[0][\"idx\" + 1];\n\t if (idx1.children[0]) {\n\t if (dataItem.name == idx1.children[0].name) {\n\t dataItem.isOnStage = false;\n\t removeEle(dataItem, this.datas);\n\t this.datas.push(dataItem);\n\t idx1.removeChild(idx1.children[0]);\n\t break;\n\t }\n\t }\n\t }\n\t }\n\t else if (this.conveyorsPool[0].x < -150) {\n\t for (var k = 0; k < this.datas.length; k++) {\n\t var dataItem = this.datas[k];\n\t var idx0 = this.conveyorsPool[0][\"idx\" + 0];\n\t if (idx0.children[0]) {\n\t if (dataItem.name == idx0.children[0].name) {\n\t dataItem.isOnStage = false;\n\t removeEle(dataItem, this.datas);\n\t this.datas.push(dataItem);\n\t idx0.removeChild(idx0.children[0]);\n\t break;\n\t }\n\t }\n\t }\n\t }\n\t };\n\t Conveyors.prototype.addscore = function () {\n\t this.score += (props.onceScore || 2);\n\t engine.globalEvent.dispatchEvent('recycling-score-update', {\n\t score: this.score\n\t });\n\t };\n\t Conveyors.prototype.gameOver = function () {\n\t engine.gameStage.removeEventListener(engine.Event.ENTER_FRAME, this.onEnterFrame, this);\n\t engine.globalEvent.dispatchEvent('recycling-game-end', transStores(this.stores));\n\t };\n\t Conveyors.prototype.onDown_garbage = function (e) {\n\t if (this._currentDragView) {\n\t removeChild(this._currentDragView);\n\t }\n\t var target = e.target;\n\t var view = new engine.Sprite(target.texture);\n\t this._currentDragView = view;\n\t this._currentTarget = target;\n\t target.scaleX = target.scaleY = 0;\n\t this.wrapper.addChild(view);\n\t view.x = e.stageX - target.texture.width / 2;\n\t view.y = e.stageY - target.texture.height / 2;\n\t view.type = target['type'];\n\t view.name = target['name'];\n\t this.wrapper.addEventListener(engine.MouseEvent.MOUSE_UP, this.onStageMouseUp, this);\n\t this.wrapper.addEventListener(engine.MouseEvent.MOUSE_MOVE, this.onStageMouseMove, this);\n\t };\n\t Conveyors.prototype.onStageMouseMove = function (e) {\n\t var view = this._currentDragView;\n\t view.x = e.stageX - view.texture.width / 2;\n\t view.y = e.stageY - view.texture.height / 2;\n\t };\n\t Conveyors.prototype.onStageMouseUp = function (e) {\n\t var _this = this;\n\t this.wrapper.removeEventListener(engine.MouseEvent.MOUSE_UP, this.onStageMouseUp, this);\n\t this.wrapper.removeEventListener(engine.MouseEvent.MOUSE_MOVE, this.onStageMouseMove, this);\n\t if (!this._currentDragView)\n\t return;\n\t var result = this.checkHitRect();\n\t if (result) {\n\t if (result == this._currentDragView['type']) {\n\t this.addscore();\n\t this.wrapper.rightTips.play(getTargetRect(result, this.wrapper));\n\t this._currentTarget.data.isRight = true;\n\t }\n\t else {\n\t engine.Tween.get(this._currentTarget).to({ scaleX: 1, scaleY: 1 }, 300).call(function () { });\n\t this.wrapper.wrongTips.play(getTargetRect(result, this.wrapper));\n\t }\n\t this.stores.push({ targetType: result, itemType: this._currentDragView['type'], itemName: this._currentDragView['name'] });\n\t }\n\t else {\n\t engine.Tween.get(this._currentTarget).to({ scaleX: 1, scaleY: 1 }, 300).call(function () { });\n\t }\n\t this._currentDragView.anchorX = this._currentDragView.texture.width / 2;\n\t this._currentDragView.anchorY = this._currentDragView.texture.height / 2;\n\t engine.Tween.get(this._currentDragView).to({ scaleX: 0, scaleY: 0 }, 300).call(function () {\n\t removeChild(_this._currentDragView);\n\t });\n\t };\n\t Conveyors.prototype.clear = function () {\n\t this.conveyor0.x = 0;\n\t this.conveyor1.x = 764;\n\t this.conveyorsPool.forEach(function (i) {\n\t i.clear();\n\t });\n\t this.conveyorsPool = [];\n\t this.datas = [];\n\t this.stores = [];\n\t };\n\t Conveyors.prototype.timeout = function () {\n\t if (this._currentDragView) {\n\t removeChild(this._currentDragView);\n\t }\n\t this.wrapper.removeEventListener(engine.MouseEvent.MOUSE_UP, this.onStageMouseUp, this);\n\t this.wrapper.removeEventListener(engine.MouseEvent.MOUSE_MOVE, this.onStageMouseMove, this);\n\t this.gameOver();\n\t };\n\t Conveyors.prototype.checkHitRect = function () {\n\t if (checkHit(this._currentDragView, this.wrapper.wetWaste)) {\n\t return GarbageTypes.wetWaste;\n\t }\n\t if (checkHit(this._currentDragView, this.wrapper.harmfulWaste)) {\n\t return GarbageTypes.harmfulWaste;\n\t }\n\t if (checkHit(this._currentDragView, this.wrapper.dryWaste)) {\n\t return GarbageTypes.dryWaste;\n\t }\n\t if (checkHit(this._currentDragView, this.wrapper.recoverableWaste)) {\n\t return GarbageTypes.recoverableWaste;\n\t }\n\t return null;\n\t };\n\t return Conveyors;\n\t}(engine.Sprite));\n\n\tvar uiConfig = (function () {\n\t return [\n\t {\n\t id: 'playBg',\n\t texture: 'playBg'\n\t },\n\t {\n\t id: 'idler0',\n\t texture: 'idlerWheel',\n\t pos: [75, 1038],\n\t anchor: [20, 21.5]\n\t },\n\t {\n\t id: 'idler1',\n\t texture: 'idlerWheel',\n\t pos: [175, 1038],\n\t anchor: [20, 21.5]\n\t },\n\t {\n\t id: 'idler2',\n\t texture: 'idlerWheel',\n\t pos: [275, 1038],\n\t anchor: [20, 21.5]\n\t },\n\t {\n\t id: 'idler3',\n\t texture: 'idlerWheel',\n\t pos: [375, 1038],\n\t anchor: [20, 21.5]\n\t },\n\t {\n\t id: 'idler4',\n\t texture: 'idlerWheel',\n\t pos: [475, 1038],\n\t anchor: [20, 21.5]\n\t },\n\t {\n\t id: 'idler5',\n\t texture: 'idlerWheel',\n\t pos: [575, 1038],\n\t anchor: [20, 21.5]\n\t },\n\t {\n\t id: 'idler6',\n\t texture: 'idlerWheel',\n\t pos: [675, 1038],\n\t anchor: [20, 21.5]\n\t },\n\t ];\n\t});\n\n\tvar getGuideInfo = (function () {\n\t if (!window.localStorage) {\n\t return 0;\n\t }\n\t return localStorage.getItem('recyclingGuide');\n\t});\n\tvar setGuide = function () {\n\t if (window.localStorage)\n\t localStorage.setItem('recyclingGuide', '1');\n\t};\n\n\tvar createBg = (function (a) {\n\t if (a === void 0) { a = 1; }\n\t var rect = new engine.Graphics();\n\t rect.beginFill(0);\n\t rect.drawRect(0, 0, 750, 1624);\n\t rect.endFill();\n\t rect.alpha = a;\n\t return rect;\n\t});\n\n\tvar createImg = (function (texture) {\n\t return new engine.Sprite(getTextureByName(texture));\n\t});\n\n\tvar CountDownGroup = (function (_super) {\n\t tslib.__extends(CountDownGroup, _super);\n\t function CountDownGroup() {\n\t var _this = _super.call(this) || this;\n\t _this.addChild(createBg(.6));\n\t _this.num1 = createImg('num1');\n\t _this.num2 = createImg('num2');\n\t _this.num3 = createImg('num3');\n\t _this.go = createImg('go');\n\t _this.go.anchorX = 240;\n\t _this.go.anchorY = 171.5;\n\t _this.num1.anchorX = 125.5;\n\t _this.num1.anchorY = 189;\n\t _this.num2.anchorX = 149.5;\n\t _this.num2.anchorY = 191.5;\n\t _this.num3.anchorX = 148.5;\n\t _this.num3.anchorY = 191.5;\n\t _this.go.x = 750 / 2 - 240;\n\t _this.go.y = 525 - 171.5;\n\t _this.num1.x = 750 / 2 - 125.5;\n\t _this.num1.y = 529 - 189;\n\t _this.num2.x = 750 / 2 - 149.5;\n\t _this.num2.y = 526 - 191.5;\n\t _this.num3.x = 750 / 2 - 148.5;\n\t _this.num3.y = 525 - 191.5;\n\t _this.addChild(_this.num1);\n\t _this.addChild(_this.num2);\n\t _this.addChild(_this.num3);\n\t _this.addChild(_this.go);\n\t _this.visible = false;\n\t _this.reset();\n\t return _this;\n\t }\n\t CountDownGroup.prototype.reset = function () {\n\t this.go.alpha = this.num1.alpha = this.num2.alpha = this.num3.alpha = 0;\n\t this.go.scaleX = this.num1.scaleX = this.num2.scaleX = this.num3.scaleX = 3;\n\t this.go.scaleY = this.num1.scaleY = this.num2.scaleY = this.num3.scaleY = 3;\n\t };\n\t CountDownGroup.prototype.startCountDown = function () {\n\t return tslib.__awaiter(this, void 0, void 0, function () {\n\t var _this = this;\n\t return tslib.__generator(this, function (_a) {\n\t return [2, new Promise(function (r) {\n\t _this.reset();\n\t _this.visible = true;\n\t _this.num3.alpha = 1;\n\t var n3 = engine.Tween.get(_this.num3);\n\t if (props.sound) {\n\t playSound(\"numCountDown\");\n\t }\n\t n3.to({ scaleX: 0.8, scaleY: 0.8 }, 200).to({ scaleX: 1, scaleY: 1 }, 100).wait(500).to({ scaleX: 0, scaleY: 0 }, 200).call(function () {\n\t _this.num2.alpha = 1;\n\t var n2 = engine.Tween.get(_this.num2);\n\t if (props.sound) {\n\t playSound(\"numCountDown\");\n\t }\n\t n2.to({ scaleX: 0.8, scaleY: 0.8 }, 200).to({ scaleX: 1, scaleY: 1 }, 100).wait(500).to({ scaleX: 0, scaleY: 0 }, 200).call(function () {\n\t _this.num1.alpha = 1;\n\t var n1 = engine.Tween.get(_this.num1);\n\t if (props.sound) {\n\t playSound(\"numCountDown\");\n\t }\n\t n1.to({ scaleX: 0.8, scaleY: 0.8 }, 200).to({ scaleX: 1, scaleY: 1 }, 100).wait(500).to({ scaleX: 0, scaleY: 0 }, 200).call(function () {\n\t _this.go.alpha = 1;\n\t var go = engine.Tween.get(_this.go);\n\t if (props.sound) {\n\t if (props.sound)\n\t playSound(\"goMp3\");\n\t }\n\t go.to({ scaleX: 0.8, scaleY: 0.8 }, 200).to({ scaleX: 1, scaleY: 1 }, 100).wait(500).call(function () {\n\t _this.visible = false;\n\t r();\n\t });\n\t });\n\t });\n\t });\n\t })];\n\t });\n\t });\n\t };\n\t return CountDownGroup;\n\t}(engine.Sprite));\n\n\tvar GuideView = (function (_super) {\n\t tslib.__extends(GuideView, _super);\n\t function GuideView() {\n\t var _this = _super.call(this) || this;\n\t _this.initUI();\n\t _this.visible = false;\n\t return _this;\n\t }\n\t GuideView.prototype.initUI = function () {\n\t this.addChild(createBg(.6));\n\t this.guideBg = createImg('guideBg');\n\t this.addChild(this.guideBg);\n\t this.guideEle = createImg('guideEle');\n\t this.addChild(this.guideEle);\n\t this.guideBg.x = 393;\n\t this.guideBg.y = 552;\n\t this.guideEle.x = 361;\n\t this.guideEle.y = 877;\n\t this.guideEle.anchorX = 14;\n\t this.guideEle.anchorY = 88;\n\t this.guideEle.mouseEnabled = this.guideEle.mouseChildren = true;\n\t var svga = createSvga(\"guideTips\");\n\t this.svga = svga;\n\t this.addChild(svga);\n\t svga.gotoAndStop(1);\n\t svga.mouseEnabled = svga.mouseChildren = false;\n\t };\n\t GuideView.prototype.checkHit = function (x, y, w, h) {\n\t var rect = new engine.Rectangle(393, 552, 281, 320);\n\t if (x > rect.x && y > rect.y && (x + w) < (rect.x + rect.width) && (y + h) < (rect.y + rect.height)) {\n\t return true;\n\t }\n\t return false;\n\t };\n\t GuideView.prototype.startGuide = function () {\n\t return tslib.__awaiter(this, void 0, void 0, function () {\n\t var _this = this;\n\t return tslib.__generator(this, function (_a) {\n\t return [2, new Promise(function (r) {\n\t _this.visible = true;\n\t _this.svga.gotoAndStop(1);\n\t _this.svga.play(false, true);\n\t _this.guideEle.scaleX = 1;\n\t _this.guideEle.scaleY = 1;\n\t var offset = [0, 0];\n\t var guideOver = function () {\n\t _this.guideEle.removeEventListener(engine.MouseEvent.MOUSE_DOWN, ondown, _this);\n\t _this.guideEle.anchorX = 14;\n\t _this.guideEle.anchorY = 44;\n\t engine.Tween.get(_this.guideEle).to({ scaleX: 0, scaleY: 0 }, 300).call(function () {\n\t _this.visible = false;\n\t r();\n\t });\n\t };\n\t var onUp = function (e) {\n\t _this.stage.removeEventListener(engine.MouseEvent.MOUSE_MOVE, onMove, _this);\n\t if (_this.checkHit(_this.guideEle.x, _this.guideEle.y, _this.guideEle.width, _this.guideEle.height)) {\n\t guideOver();\n\t }\n\t else {\n\t _this.svga.visible = true;\n\t _this.guideEle.x = 361;\n\t _this.guideEle.y = 877;\n\t engine.Tween.get(_this.guideEle).set({ scaleX: 0, scaleY: 0 }).to({ scaleX: 1, scaleY: 1 }, 300);\n\t }\n\t };\n\t var onMove = function (e) {\n\t _this.guideEle.x = e.stageX - offset[0];\n\t _this.guideEle.y = e.stageY - offset[1];\n\t };\n\t var ondown = function (e) {\n\t offset = [e.localX, e.localY];\n\t _this.svga.visible = false;\n\t _this.stage.once(engine.MouseEvent.MOUSE_UP, onUp, _this);\n\t _this.stage.addEventListener(engine.MouseEvent.MOUSE_MOVE, onMove, _this);\n\t };\n\t _this.guideEle.addEventListener(engine.MouseEvent.MOUSE_DOWN, ondown, _this);\n\t })];\n\t });\n\t });\n\t };\n\t return GuideView;\n\t}(engine.Sprite));\n\n\tvar RightTips = (function (_super) {\n\t tslib.__extends(RightTips, _super);\n\t function RightTips() {\n\t var _this = _super.call(this) || this;\n\t _this.SCORE = props.onceScore || 2;\n\t _this.img = new engine.Image();\n\t _this.img.texture = getTextureByName('rightTips');\n\t _this.addChild(_this.img);\n\t _this.img.anchorX = 88 / 2;\n\t _this.img.anchorY = 85 / 2;\n\t _this.visible = false;\n\t _this.txt = new engine.TextField();\n\t _this.addChild(_this.txt);\n\t _this.txt.text = '+' + _this.SCORE;\n\t _this.txt.size = 60;\n\t _this.txt.fillColor = '#437726';\n\t engine.playSound;\n\t return _this;\n\t }\n\t RightTips.prototype.play = function (rect) {\n\t if (props.sound) {\n\t playSound(\"rightTipsSound\");\n\t }\n\t this.visible = true;\n\t this.txt.x = 100;\n\t engine.Tween.get(this.txt).set({ y: 60, alpha: 1 })\n\t .to({ y: -50 }, 500)\n\t .to({ alpha: 0 });\n\t engine.Tween.get(this.img).set({ x: 0, y: 0, scaleX: 0, scaleY: 0, alpha: 1 })\n\t .to({ scaleX: 1, scaleY: 1 }, 200, engine.Ease.getBackOut(1))\n\t .wait(200)\n\t .to({ alpha: 0 }, 300);\n\t this.x = rect.x + 180;\n\t this.y = rect.y;\n\t };\n\t return RightTips;\n\t}(engine.Sprite));\n\n\tvar GameView = (function (_super) {\n\t tslib.__extends(GameView, _super);\n\t function GameView() {\n\t var _this = _super.call(this) || this;\n\t _this._timeCounter = 0;\n\t _this.once(engine.Event.ADDED_TO_STAGE, _this.setup, _this);\n\t return _this;\n\t }\n\t GameView.prototype.configUI = function () {\n\t var uiMap = {};\n\t this.uiMap = uiMap;\n\t var config = uiConfig();\n\t for (var _i = 0, config_1 = config; _i < config_1.length; _i++) {\n\t var item = config_1[_i];\n\t var id = item.id, texture = item.texture, pos = item.pos, anchor = item.anchor;\n\t var sp = new engine.Sprite(getTextureByName(texture));\n\t this.addChild(sp);\n\t uiMap[id] = sp;\n\t if (anchor) {\n\t sp.anchorX = anchor[0];\n\t sp.anchorY = anchor[1];\n\t }\n\t if (pos) {\n\t sp.x = pos[0];\n\t sp.y = pos[1];\n\t if (anchor) {\n\t sp.x = pos[0] - sp.anchorX;\n\t sp.y = pos[1] - sp.anchorY;\n\t }\n\t }\n\t }\n\t this.configConveyors();\n\t this.createRects();\n\t this.countdown = new CountDownGroup();\n\t this.addChild(this.countdown);\n\t this.guide = new GuideView();\n\t this.addChild(this.guide);\n\t this.wrongTips = new WrongTips();\n\t this.rightTips = new RightTips();\n\t this.addChild(this.wrongTips);\n\t this.addChild(this.rightTips);\n\t };\n\t GameView.prototype.createRects = function () {\n\t this.wetWaste = this.createRect(74, 552, 301, 293, 0xffffff);\n\t this.harmfulWaste = this.createRect(75, 247, 300, 293, 0xff0000);\n\t this.dryWaste = this.createRect(389, 249, 286, 291, 0x000000);\n\t this.recoverableWaste = this.createRect(389, 551, 287, 292, 0x0000ff);\n\t };\n\t GameView.prototype.createRect = function (x, y, w, h, c) {\n\t var rect = new engine.Rectangle(x, y, w, h);\n\t var sp = new engine.Sprite();\n\t this.addChild(sp);\n\t sp.x = x;\n\t sp.y = y;\n\t var g = new engine.Graphics;\n\t g.alpha = 0.0;\n\t g.beginFill(c);\n\t g.drawRect(0, 0, w, h);\n\t g.endFill();\n\t sp.addChild(g);\n\t return rect;\n\t };\n\t GameView.prototype.configConveyors = function () {\n\t var conveyor0 = new Conveyor();\n\t var conveyor1 = new Conveyor();\n\t this.addChild(conveyor0);\n\t this.addChild(conveyor1);\n\t conveyor0.x = 0;\n\t conveyor1.x = 764;\n\t this.conveyors = new Conveyors(this);\n\t this.conveyors.initData(conveyor0, conveyor1);\n\t };\n\t GameView.prototype.playAni = function () {\n\t var _this = this;\n\t var idlerWheels = ['idler0', 'idler1', 'idler2', 'idler3', 'idler4', 'idler5', 'idler6'];\n\t idlerWheels = idlerWheels.map(function (i) { return _this.uiMap[i]; });\n\t idlerWheels.forEach(function (i) {\n\t engine.Tween.get(i, { loop: true }).to({ rotation: -360 }, 1000);\n\t });\n\t };\n\t GameView.prototype.stopAni = function () {\n\t var _this = this;\n\t var idlerWheels = ['idler0', 'idler1', 'idler2', 'idler3', 'idler4', 'idler5', 'idler6'];\n\t idlerWheels = idlerWheels.map(function (i) { return _this.uiMap[i]; });\n\t idlerWheels.forEach(function (i) {\n\t engine.Tween.removeTweens(i);\n\t });\n\t };\n\t GameView.prototype.start = function () {\n\t return tslib.__awaiter(this, void 0, void 0, function () {\n\t var _this = this;\n\t return tslib.__generator(this, function (_a) {\n\t switch (_a.label) {\n\t case 0:\n\t console.log('on start');\n\t this._timeCounter = 0;\n\t if (!!getGuideInfo()) return [3, 2];\n\t return [4, this.guide.startGuide()];\n\t case 1:\n\t _a.sent();\n\t setGuide();\n\t _a.label = 2;\n\t case 2:\n\t this.conveyors.clear();\n\t return [4, this.countdown.startCountDown()];\n\t case 3:\n\t _a.sent();\n\t this.startGame();\n\t engine.globalEvent.dispatchEvent('recycling-time-update', {\n\t second: this.getSecond(),\n\t });\n\t this._timer = setInterval(function () {\n\t _this.onTimer();\n\t }, 1000);\n\t return [2];\n\t }\n\t });\n\t });\n\t };\n\t GameView.prototype.startGame = function () {\n\t this.playAni();\n\t this.conveyors.startConveyors();\n\t };\n\t GameView.prototype.stopGame = function () {\n\t this.stopAni();\n\t };\n\t GameView.prototype.getSecond = function () {\n\t return props.time - this._timeCounter;\n\t };\n\t GameView.prototype.onTimer = function () {\n\t this._timeCounter++;\n\t engine.globalEvent.dispatchEvent('recycling-time-update', {\n\t second: this.getSecond(),\n\t });\n\t if (this.getSecond() == 0) {\n\t this.stop();\n\t this.conveyors.timeout();\n\t if (props.sound)\n\t playSound(\"gameOverMp3\");\n\t }\n\t };\n\t GameView.prototype.stop = function () {\n\t clearInterval(this._timer);\n\t this.stopGame();\n\t };\n\t GameView.prototype.setup = function () {\n\t console.log('onSteup', props);\n\t this.configUI();\n\t };\n\t GameView.prototype.onDown = function (e) {\n\t };\n\t GameView.prototype.stageOnUp = function (e) {\n\t };\n\t GameView.prototype.onSuccess = function () {\n\t };\n\t GameView.prototype.onMove = function (e) {\n\t };\n\t return GameView;\n\t}(engine.Container));\n\n\tvar GameWrapper = (function (_super) {\n\t tslib.__extends(GameWrapper, _super);\n\t function GameWrapper() {\n\t var _this = _super.call(this) || this;\n\t engine.globalEvent.addEventListener('recycling-start', _this.start, _this);\n\t engine.globalEvent.addEventListener('recycling-sound-update', _this.updateSound, _this);\n\t engine.globalEvent.addEventListener('recycling-stop', _this.stop, _this);\n\t var gameView = _this._gameView = new GameView();\n\t _this.addChild(gameView);\n\t return _this;\n\t }\n\t GameWrapper.prototype.updateSound = function (event) {\n\t injectProps(event.data);\n\t };\n\t GameWrapper.prototype.start = function (event) {\n\t injectProps(event.data);\n\t this._gameView.start();\n\t };\n\t GameWrapper.prototype.stop = function (event) {\n\t this._gameView.stop();\n\t };\n\t return GameWrapper;\n\t}(engine.Container));\n\n\tfunction index (props) {\n\t prepareProps();\n\t injectProps(props);\n\t var instance = new GameWrapper();\n\t return instance;\n\t}\n\n\treturn index;\n\n})));\n"
}
......@@ -5102,6 +5102,7 @@ declare module engine {
}
export class DisplayObject extends EventDispatcher {
parent;
/**
* 基础信息
*/
......@@ -5121,7 +5122,7 @@ declare module engine {
* @member {Container}
* @readonly
*/
parent: any;
wrapper: any;
/**
* 舞台
*/
......
......@@ -34,8 +34,8 @@ export default class GameView extends engine.Container {
if (this.pictures) {
for (const pic of this.pictures) {
if (pic && pic.parent)
pic.parent.removeChild(pic);
if (pic && pic.wrapper)
pic.wrapper.removeChild(pic);
}
}
......
/**
* Created by renjianfeng on 2020-03-13.
*/
const customId = 'recycling';
(async function() {
let customModule = await fetch(`../meta.json`);
customModule = await customModule.json();
console.log(customModule);
await loadAssets(customModule.assets);
launchWithCustomModule(customModule);
})();
function launchWithCustomModule(customModule) {
//engine.registerCustomCodeModule(customModule);
engine.registerCustomModule(customId, window[customId]);
const { props: propsOption, assets } = customModule;
let props = engine.computeProps(customModuleProps, propsOption);
const customModuleIns = {
id: customId,
props,
assets,
};
engine.registerCustomModules([customModuleIns]);
engine.launchWithConfig({
options: {
entrySceneView: 'entry',
},
assets: [],
views: [{
name: 'entry',
type: 'node',
properties: {
x: 0,
y: 0,
}
}],
customs: [],
}, null, function() {
setTimeout(() => {
engine.addCustomModule(customId, engine.gameStage.sceneContainer.getChildAt(0));
}, 100);
setTimeout(() => {
engine.globalEvent.dispatchEvent('recycling-start', { time: 1500, maxScore: 200, speed: 3, sound: 1 });
const d = engine.gameStage.sceneContainer.getChildAt(0);
}, 2000);
// setTimeout(() => {
// engine.globalEvent.dispatchEvent('recycling-sound-update', { sound: 1 });
// const d = engine.gameStage.sceneContainer.getChildAt(0);
// }, 10 * 100);
// setTimeout(() => {
// engine.globalEvent.dispatchEvent('recycling-start', { time: 8, maxScore: 2 });
// const d = engine.gameStage.sceneContainer.getChildAt(0);
// }, 1000 * 10);
});
engine.globalEvent.addEventListener('recycling-time-update', (e) => {
console.log(e.type, e.data);
});
engine.globalEvent.addEventListener('recycling-score-update', (e) => {
console.log(e.type, e.data);
});
engine.globalEvent.addEventListener('recycling-game-end', (e) => {
console.log(e.type, e.data);
});
engine.globalEvent.addEventListener('recycling-game-success', (e) => {
console.log(e.type, e.data);
});
}
function getAssetByUUID(uuid) {
return engine.resolveCustomAsset(customId, uuid);
}
function getProps() {
return engine.getProps(customId);
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>美食从天而降</title>
<meta name="viewport" content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="full-screen" content="true" />
<meta name="screen-orientation" content="portrait" />
<meta name="x5-fullscreen" content="true" />
<meta name="360-fullscreen" content="true" />
<style>
html,
body {
padding: 0;
margin: 0;
border: 0;
width: 100%;
height: 100%;
overflow: hidden;
position: absolute;
background-color: gray;
}
.game-container {
width: 100%;
height: 100%;
line-height: 0;
font-size: 0;
}
</style>
</head>
<body>
<div id="game-container" class="game-container"></div>
<script crossorigin="anonymous" src="engine.1de84ff79dba19e949088de63aa75af51a515e5c.js"></script>
<script crossorigin="anonymous" src="svga.fd3923ae6e664251ca7981801a65809cc5f36bc3.js"></script>
<!-- <script src="//yun.duiba.com.cn/editor/zeroing/libs/engine.ebc906f6b50b8da0a669f77027981d5f3cb560ce.js"></script> -->
<!-- <script src="http://localhost:4002/debug/engine.js"></script>
<script src="http://localhost:4003/debug/engine-svga.js"></script> -->
<!--<script src="//yun.duiba.com.cn/editor/zeroing/libs/engine.9a9dbfda4cb2dd5508ecddfe3d95dfd88063f7b5.js"></script>-->
<script src="app.js"></script>
<script src="props.js"></script>
<script src="load-assets.js"></script>
<script src="main.js"></script>
<audio style="display:none;
height: 0" id="wrongTips" preload="auto" src="https://yun.duiba.com.cn/db_games/activity/garbageSorting1.00/wrongTips.mp3">
</audio>
<audio style="display:none;
height: 0" id="go" preload="auto" src="https://yun.duiba.com.cn/db_games/activity/garbageSorting1.00/go.mp3">
</audio>
<audio style="display:none;
height: 0" id="gameOver" preload="auto" src="https://yun.duiba.com.cn/db_games/activity/garbageSorting1.00/gameOver.mp3">
</audio>
<script>
// localStorage.clear()
function playMusic(id = "bgMusic", isPlay = true) {
var media = document.getElementById(id);
if (isPlay && media.paused) {
media.play();
}
if (!isPlay && !media.paused) {
media.pause();
}
}
</script>
</body>
\ No newline at end of file
/**
* Created by rockyl on 2020-01-21.
*/
const assets = [{
"name": "玩家icon",
"url": "//yun.duiba.com.cn/aurora/assets/5b3e30496b2d9fdafb0cf3835fd6704ce10e45b4.png",
"uuid": "888",
"ext": ".png"
}];
function loadAssets(customModuleAssets, onProgress, onComplete) {
return engine.loadAssets(assets.concat(...customModuleAssets), onProgress, onComplete);
}
\ No newline at end of file
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('tslib')) :
typeof define === 'function' && define.amd ? define(['tslib'], factory) :
(global = global || self, global.recycling = factory(global.tslib));
}(this, (function (tslib) { 'use strict';
function getTexture(uuid) {
return engine.Texture.from(getAssetByUUID(uuid).uuid);
}
function getTextureByName(name) {
return getTexture(engine.getAssetByName(name).uuid);
}
function playSound(name) {
engine.playSound(engine.getAssetByName(name).uuid, { keep: true });
}
function createSvga(name, anchorName) {
var inst = new svga.Svga();
inst.source = 'asset://' + engine.getAssetByName(name).uuid;
return inst;
}
var props = {};
function prepareProps() {
var metaProps = getProps();
engine.injectProp(props, metaProps);
}
function injectProps(p) {
engine.injectProp(props, p);
}
var Conveyor = (function (_super) {
tslib.__extends(Conveyor, _super);
function Conveyor() {
var _this = _super.call(this) || this;
_this.y = 904.21;
var sp = new engine.Sprite(getTextureByName('conveyor'));
_this.addChild(sp);
_this.idx0 = _this.createItem(75, 50);
_this.idx1 = _this.createItem(225, 50);
_this.idx2 = _this.createItem(375, 50);
_this.idx3 = _this.createItem(525, 50);
_this.idx4 = _this.createItem(675, 50);
return _this;
}
Conveyor.prototype.clear = function () {
this.clearItem(this.idx0);
this.clearItem(this.idx1);
this.clearItem(this.idx2);
this.clearItem(this.idx3);
this.clearItem(this.idx4);
};
Conveyor.prototype.clearItem = function (idx) {
if (idx.children.length > 0)
idx.removeChildAt(0);
};
Conveyor.prototype.createItem = function (x, y) {
var sp = new engine.Sprite();
this.addChild(sp);
sp.x = x;
sp.y = y;
return sp;
};
return Conveyor;
}(engine.Sprite));
var GarbageTypes;
(function (GarbageTypes) {
GarbageTypes["recoverableWaste"] = "recoverableWaste";
GarbageTypes["harmfulWaste"] = "harmfulWaste";
GarbageTypes["wetWaste"] = "wetWaste";
GarbageTypes["dryWaste"] = "dryWaste";
})(GarbageTypes || (GarbageTypes = {}));
var GarbageConfig = (function () {
function GarbageConfig() {
}
GarbageConfig.config = [
{ name: "保鲜盒", source: "g00", type: GarbageTypes.recoverableWaste, width: 129, height: 111 },
{ name: "报纸", source: "g01", type: GarbageTypes.recoverableWaste, width: 138, height: 144 },
{ name: "贝壳", source: "g02", type: GarbageTypes.dryWaste, width: 79, height: 117 },
{ name: "冰箱", source: "g03", type: GarbageTypes.recoverableWaste, width: 63, height: 151 },
{ name: "菜梗菜叶", source: "g04", type: GarbageTypes.wetWaste, width: 144, height: 98 },
{ name: "残枝落叶", source: "g05", type: GarbageTypes.wetWaste, width: 120, height: 99 },
{ name: "茶叶渣", source: "g06", type: GarbageTypes.wetWaste, width: 86, height: 96 },
{ name: "尘土", source: "g07", type: GarbageTypes.dryWaste, width: 109, height: 114 },
{ name: "创口贴", source: "g08", type: GarbageTypes.dryWaste, width: 112, height: 90 },
{ name: "大骨头", source: "g09", type: GarbageTypes.dryWaste, width: 89, height: 101 },
{ name: "普通干电池", source: "g11", type: GarbageTypes.dryWaste, width: 89, height: 131 },
{ name: "方便面盒", source: "g12", type: GarbageTypes.dryWaste, width: 89, height: 168 },
{ name: "废弃食用油脂", source: "g13", type: GarbageTypes.wetWaste, width: 131, height: 164 },
{ name: "骨骼内脏", source: "g14", type: GarbageTypes.wetWaste, width: 104, height: 82 },
{ name: "锅具", source: "g15", type: GarbageTypes.recoverableWaste, width: 119, height: 149 },
{ name: "果核", source: "g16", type: GarbageTypes.wetWaste, width: 99, height: 95 },
{ name: "果皮", source: "g17", type: GarbageTypes.wetWaste, width: 115, height: 127 },
{ name: "化妆品", source: "g18", type: GarbageTypes.harmfulWaste, width: 67, height: 151 },
{ name: "鸡蛋壳", source: "g19", type: GarbageTypes.wetWaste, width: 99, height: 107 },
{ name: "剪刀", source: "g20", type: GarbageTypes.recoverableWaste, width: 96, height: 127 },
{ name: "胶带", source: "g21", type: GarbageTypes.dryWaste, width: 87, height: 113 },
{ name: "榴莲壳", source: "g22", type: GarbageTypes.dryWaste, width: 136, height: 116 },
{ name: "毛巾", source: "g23", type: GarbageTypes.recoverableWaste, width: 108, height: 96 },
{ name: "纽扣电池", source: "g24", type: GarbageTypes.harmfulWaste, width: 87, height: 89 },
{ name: "破旧陶瓷罐", source: "g25", type: GarbageTypes.dryWaste, width: 110, height: 125 },
{ name: "杀虫剂", source: "g26", type: GarbageTypes.harmfulWaste, width: 64, height: 160 },
{ name: "剩菜剩饭", source: "g27", type: GarbageTypes.wetWaste, width: 128, height: 96 },
{ name: "手机", source: "g28", type: GarbageTypes.recoverableWaste, width: 82, height: 142 },
{ name: "书本", source: "g29", type: GarbageTypes.recoverableWaste, width: 106, height: 132 },
{ name: "玻璃杯", source: "g30", type: GarbageTypes.recoverableWaste, width: 62, height: 119 },
{ name: "水银温度计", source: "g31", type: GarbageTypes.harmfulWaste, width: 109, height: 162 },
{ name: "水银血压计", source: "g32", type: GarbageTypes.harmfulWaste, width: 115, height: 147 },
{ name: "塑料桶", source: "g33", type: GarbageTypes.recoverableWaste, width: 92, height: 131 },
{ name: "卫生纸", source: "g34", type: GarbageTypes.dryWaste, width: 92, height: 132 },
{ name: "污染织物", source: "g35", type: GarbageTypes.dryWaste, width: 128, height: 139 },
{ name: "污染纸张", source: "g36", type: GarbageTypes.dryWaste, width: 96, height: 136 },
{ name: "洗衣机", source: "g37", type: GarbageTypes.recoverableWaste, width: 87, height: 157 },
{ name: "烟蒂", source: "g38", type: GarbageTypes.dryWaste, width: 87, height: 124 },
{ name: "药品", source: "g39", type: GarbageTypes.harmfulWaste, width: 109, height: 131 },
{ name: "药品包装", source: "g40", type: GarbageTypes.harmfulWaste, width: 108, height: 125 },
{ name: "椰子壳", source: "g41", type: GarbageTypes.dryWaste, width: 104, height: 119 },
{ name: "衣服", source: "g42", type: GarbageTypes.recoverableWaste, width: 83, height: 137 },
{ name: "衣架", source: "g43", type: GarbageTypes.recoverableWaste, width: 132, height: 125 },
{ name: "易拉罐", source: "g44", type: GarbageTypes.recoverableWaste, width: 65, height: 133 },
{ name: "荧光灯", source: "g45", type: GarbageTypes.harmfulWaste, width: 90, height: 118 },
{ name: "油漆桶", source: "g46", type: GarbageTypes.harmfulWaste, width: 65, height: 143 },
{ name: "一次性纸杯", source: "g47", type: GarbageTypes.dryWaste, width: 76, height: 116 },
{ name: "纸尿裤", source: "g48", type: GarbageTypes.dryWaste, width: 93, height: 138 },
{ name: "纸箱", source: "g49", type: GarbageTypes.recoverableWaste, width: 112, height: 118 },
{ name: "指甲油", source: "g50", type: GarbageTypes.harmfulWaste, width: 64, height: 138 },
];
return GarbageConfig;
}());
var transStores = (function (list) {
var tmp = [];
var contains = function (val) {
for (var _i = 0, tmp_1 = tmp; _i < tmp_1.length; _i++) {
var i = tmp_1[_i];
if (val.targetType == i.targetType && val.itemType == i.itemType && val.itemName == i.itemName)
return true;
}
return false;
};
list.forEach(function (i) {
if (!contains(i))
tmp.push(i);
});
list = tmp;
tmp = [];
var nameList = [];
var contains2 = function (val) {
for (var _i = 0, tmp_2 = tmp; _i < tmp_2.length; _i++) {
var i = tmp_2[_i];
if (val.itemName == i.itemName) {
nameList.push(i.itemName);
return true;
}
}
return false;
};
list.forEach(function (i) {
if (!contains2(i))
tmp.push(i);
});
list = tmp;
list.forEach(function (i) {
if (nameList.indexOf(i.itemName) != -1) {
i.targetType = i.itemType;
}
});
return list.map(function (i) {
return {
'targetName': getTargetName(i.targetType),
'isCorrect': i.targetType == i.itemType,
'itemName': i.itemName,
'itemTypeName': getTargetName(i.itemType)
};
});
});
var getTargetName = function (type) {
switch (type) {
case GarbageTypes.recoverableWaste:
return '可回收物';
case GarbageTypes.harmfulWaste:
return '有害垃圾';
case GarbageTypes.wetWaste:
return '湿垃圾';
case GarbageTypes.dryWaste:
return '其他垃圾';
}
};
var checkHit = (function (view, rect) {
var x = view.x, y = view.y;
var _a = view.texture, width = _a.width, height = _a.height;
if (x > rect.x && y > rect.y && (x + width) < (rect.x + rect.width) && (y + height) < (rect.y + rect.height)) {
return true;
}
return false;
});
var removeChild = (function (d) {
if (d && d.parent) {
d.parent.removeChild(d);
}
});
var removeEle = (function (e, arr) {
var index = arr.indexOf(e);
if (index >= 0) {
arr.splice(index, 1);
}
});
var shuffle = (function (arr) {
var _a;
var i = arr.length;
while (i) {
var j = Math.floor(Math.random() * i--);
_a = [arr[i], arr[j]], arr[j] = _a[0], arr[i] = _a[1];
}
return arr;
});
var WrongTips = (function (_super) {
tslib.__extends(WrongTips, _super);
function WrongTips() {
var _this = _super.call(this) || this;
_this.img = new engine.Image();
_this.img.texture = getTextureByName('wrongTips');
_this.addChild(_this.img);
_this.img.anchorX = 88 / 2;
_this.img.anchorY = 85 / 2;
_this.visible = false;
return _this;
}
WrongTips.prototype.play = function (rect) {
this.visible = true;
if (props.sound) {
playSound("wrongTipsMp3");
}
var dur = 70;
var stren = 20;
engine.Tween.get(this.img).set({ x: 0, y: 0, scaleX: 1, scaleY: 1, alpha: 1 })
.to({ x: stren }, dur)
.to({ x: 0 }, dur)
.to({ x: -stren }, dur)
.to({ x: 0 }, dur)
.wait(200)
.to({ alpha: 0 }, 300);
this.x = rect.x + 180;
this.y = rect.y;
};
return WrongTips;
}(engine.Sprite));
var getTargetRect = function (targetType, gameview) {
switch (targetType) {
case GarbageTypes.dryWaste:
return gameview.dryWaste;
case GarbageTypes.wetWaste:
return gameview.wetWaste;
case GarbageTypes.harmfulWaste:
return gameview.harmfulWaste;
case GarbageTypes.recoverableWaste:
return gameview.recoverableWaste;
}
};
var Conveyors = (function (_super) {
tslib.__extends(Conveyors, _super);
function Conveyors(p) {
var _this = _super.call(this) || this;
_this.conveyorsPool = [];
_this.GarbageConfig = GarbageConfig.config;
_this.datas = [];
_this.wrapper = p;
return _this;
}
Conveyors.prototype.initData = function (conveyor0, conveyor1) {
this.conveyor0 = conveyor0;
this.conveyor1 = conveyor1;
};
Conveyors.prototype.setDefault = function () {
this.score = 0;
this.conveyorsPool.push(this.conveyor0);
this.conveyorsPool.push(this.conveyor1);
var allConfigs = shuffle(this.GarbageConfig.concat([]));
for (var i = 0; i < GarbageConfig.config.length; i++) {
allConfigs[i].idx = i;
allConfigs[i].isRight = false;
allConfigs[i].isMistake = false;
allConfigs[i].isOnStage = false;
this.datas.push(allConfigs[i]);
}
for (var i = 0; i < 5; i++) {
var data = this.datas[i];
var view = new engine.Sprite(getTextureByName(data.source));
view.isWrong = false;
view.isRight = false;
data.isOnStage = true;
view.data = data;
view.type = data.type;
view.name = data.name;
view.anchorX = data.width / 2;
view.anchorY = data.height;
view.x = -data.width / 2;
view.y = -data.height + 40;
this.conveyor1["idx" + i].addChild(view);
view.addEventListener(engine.MouseEvent.MOUSE_DOWN, this.onDown_garbage, this);
}
};
Conveyors.prototype.startConveyors = function () {
this.setDefault();
engine.gameStage.addEventListener(engine.Event.ENTER_FRAME, this.onEnterFrame, this);
};
Conveyors.prototype.onEnterFrame = function (ENTER_FRAME, onEnterFrame, arg2) {
if (this.score == (props.maxScore || 100)) {
this.gameOver();
this.wrapper.stop();
if (props.sound)
playSound("gameOverMp3");
}
this.conveyorsPool.forEach(function (conveyor) {
conveyor.x -= props.speed || 3;
});
if (this.conveyorsPool[this.conveyorsPool.length - 1].x <= 764) {
var conveyor = new Conveyor();
conveyor.x = this.conveyorsPool[this.conveyorsPool.length - 1].x + 764;
this.wrapper.addChild(conveyor);
this.conveyorsPool.push(conveyor);
}
else {
var dataList = [];
for (var n = 0; n < this.datas.length; n++) {
var dataItem = this.datas[n];
if (!dataItem.isRight && !dataItem.isOnStage) {
dataList.push(dataItem);
}
}
var lastConveyor = this.conveyorsPool[this.conveyorsPool.length - 1];
for (var m = 0; m < 5; m++) {
if (!lastConveyor["idx" + m].children[0]) {
var data = dataList.shift();
if (data) {
data.isOnStage = true;
var view = new engine.Sprite(getTextureByName(data.source));
view.data = data;
view.isWrong = false;
view.isRight = false;
view.type = data.type;
view.name = data.name;
view.anchorX = data.width / 2;
view.anchorY = data.height;
view.x = -data.width / 2;
view.y = -data.height + 40;
lastConveyor["idx" + m].addChild(view);
view.addEventListener(engine.MouseEvent.MOUSE_DOWN, this.onDown_garbage, this);
}
else {
break;
}
}
}
}
if (this.conveyorsPool[0].x < -750) {
for (var k = 0; k < this.datas.length; k++) {
var dataItem = this.datas[k];
var idx4 = this.conveyorsPool[0]["idx" + 4];
if (idx4.children[0]) {
if (dataItem.name == idx4.children[0].name) {
dataItem.isOnStage = false;
removeEle(dataItem, this.datas);
this.datas.push(dataItem);
idx4.removeChild(idx4.children[0]);
break;
}
}
}
this.conveyorsPool.shift();
}
else if (this.conveyorsPool[0].x < -600) {
for (var k = 0; k < this.datas.length; k++) {
var dataItem = this.datas[k];
var idx3 = this.conveyorsPool[0]["idx" + 3];
if (idx3.children[0]) {
if (dataItem.name == idx3.children[0].name) {
dataItem.isOnStage = false;
removeEle(dataItem, this.datas);
this.datas.push(dataItem);
idx3.removeChild(idx3.children[0]);
break;
}
}
}
}
else if (this.conveyorsPool[0].x < -450) {
for (var k = 0; k < this.datas.length; k++) {
var dataItem = this.datas[k];
var idx2 = this.conveyorsPool[0]["idx" + 2];
if (idx2.children[0]) {
if (dataItem.name == idx2.children[0].name) {
dataItem.isOnStage = false;
removeEle(dataItem, this.datas);
this.datas.push(dataItem);
idx2.removeChild(idx2.children[0]);
break;
}
}
}
}
else if (this.conveyorsPool[0].x < -300) {
for (var k = 0; k < this.datas.length; k++) {
var dataItem = this.datas[k];
var idx1 = this.conveyorsPool[0]["idx" + 1];
if (idx1.children[0]) {
if (dataItem.name == idx1.children[0].name) {
dataItem.isOnStage = false;
removeEle(dataItem, this.datas);
this.datas.push(dataItem);
idx1.removeChild(idx1.children[0]);
break;
}
}
}
}
else if (this.conveyorsPool[0].x < -150) {
for (var k = 0; k < this.datas.length; k++) {
var dataItem = this.datas[k];
var idx0 = this.conveyorsPool[0]["idx" + 0];
if (idx0.children[0]) {
if (dataItem.name == idx0.children[0].name) {
dataItem.isOnStage = false;
removeEle(dataItem, this.datas);
this.datas.push(dataItem);
idx0.removeChild(idx0.children[0]);
break;
}
}
}
}
};
Conveyors.prototype.addscore = function () {
this.score += (props.onceScore || 2);
engine.globalEvent.dispatchEvent('recycling-score-update', {
score: this.score
});
};
Conveyors.prototype.gameOver = function () {
engine.gameStage.removeEventListener(engine.Event.ENTER_FRAME, this.onEnterFrame, this);
engine.globalEvent.dispatchEvent('recycling-game-end', transStores(this.stores));
};
Conveyors.prototype.onDown_garbage = function (e) {
if (this._currentDragView) {
removeChild(this._currentDragView);
}
var target = e.target;
var view = new engine.Sprite(target.texture);
this._currentDragView = view;
this._currentTarget = target;
target.scaleX = target.scaleY = 0;
this.wrapper.addChild(view);
view.x = e.stageX - target.texture.width / 2;
view.y = e.stageY - target.texture.height / 2;
view.type = target['type'];
view.name = target['name'];
this.wrapper.addEventListener(engine.MouseEvent.MOUSE_UP, this.onStageMouseUp, this);
this.wrapper.addEventListener(engine.MouseEvent.MOUSE_MOVE, this.onStageMouseMove, this);
};
Conveyors.prototype.onStageMouseMove = function (e) {
var view = this._currentDragView;
view.x = e.stageX - view.texture.width / 2;
view.y = e.stageY - view.texture.height / 2;
};
Conveyors.prototype.onStageMouseUp = function (e) {
var _this = this;
this.wrapper.removeEventListener(engine.MouseEvent.MOUSE_UP, this.onStageMouseUp, this);
this.wrapper.removeEventListener(engine.MouseEvent.MOUSE_MOVE, this.onStageMouseMove, this);
if (!this._currentDragView)
return;
var result = this.checkHitRect();
if (result) {
if (result == this._currentDragView['type']) {
this.addscore();
this.wrapper.rightTips.play(getTargetRect(result, this.wrapper));
this._currentTarget.data.isRight = true;
}
else {
engine.Tween.get(this._currentTarget).to({ scaleX: 1, scaleY: 1 }, 300).call(function () { });
this.wrapper.wrongTips.play(getTargetRect(result, this.wrapper));
}
this.stores.push({ targetType: result, itemType: this._currentDragView['type'], itemName: this._currentDragView['name'] });
}
else {
engine.Tween.get(this._currentTarget).to({ scaleX: 1, scaleY: 1 }, 300).call(function () { });
}
this._currentDragView.anchorX = this._currentDragView.texture.width / 2;
this._currentDragView.anchorY = this._currentDragView.texture.height / 2;
engine.Tween.get(this._currentDragView).to({ scaleX: 0, scaleY: 0 }, 300).call(function () {
removeChild(_this._currentDragView);
});
};
Conveyors.prototype.clear = function () {
this.conveyor0.x = 0;
this.conveyor1.x = 764;
this.conveyorsPool.forEach(function (i) {
i.clear();
});
this.conveyorsPool = [];
this.datas = [];
this.stores = [];
};
Conveyors.prototype.timeout = function () {
if (this._currentDragView) {
removeChild(this._currentDragView);
}
this.wrapper.removeEventListener(engine.MouseEvent.MOUSE_UP, this.onStageMouseUp, this);
this.wrapper.removeEventListener(engine.MouseEvent.MOUSE_MOVE, this.onStageMouseMove, this);
this.gameOver();
};
Conveyors.prototype.checkHitRect = function () {
if (checkHit(this._currentDragView, this.wrapper.wetWaste)) {
return GarbageTypes.wetWaste;
}
if (checkHit(this._currentDragView, this.wrapper.harmfulWaste)) {
return GarbageTypes.harmfulWaste;
}
if (checkHit(this._currentDragView, this.wrapper.dryWaste)) {
return GarbageTypes.dryWaste;
}
if (checkHit(this._currentDragView, this.wrapper.recoverableWaste)) {
return GarbageTypes.recoverableWaste;
}
return null;
};
return Conveyors;
}(engine.Sprite));
var uiConfig = (function () {
return [
{
id: 'playBg',
texture: 'playBg'
},
{
id: 'idler0',
texture: 'idlerWheel',
pos: [75, 1038],
anchor: [20, 21.5]
},
{
id: 'idler1',
texture: 'idlerWheel',
pos: [175, 1038],
anchor: [20, 21.5]
},
{
id: 'idler2',
texture: 'idlerWheel',
pos: [275, 1038],
anchor: [20, 21.5]
},
{
id: 'idler3',
texture: 'idlerWheel',
pos: [375, 1038],
anchor: [20, 21.5]
},
{
id: 'idler4',
texture: 'idlerWheel',
pos: [475, 1038],
anchor: [20, 21.5]
},
{
id: 'idler5',
texture: 'idlerWheel',
pos: [575, 1038],
anchor: [20, 21.5]
},
{
id: 'idler6',
texture: 'idlerWheel',
pos: [675, 1038],
anchor: [20, 21.5]
},
];
});
var getGuideInfo = (function () {
if (!window.localStorage) {
return 0;
}
return localStorage.getItem('recyclingGuide');
});
var setGuide = function () {
if (window.localStorage)
localStorage.setItem('recyclingGuide', '1');
};
var createBg = (function (a) {
if (a === void 0) { a = 1; }
var rect = new engine.Graphics();
rect.beginFill(0);
rect.drawRect(0, 0, 750, 1624);
rect.endFill();
rect.alpha = a;
return rect;
});
var createImg = (function (texture) {
return new engine.Sprite(getTextureByName(texture));
});
var CountDownGroup = (function (_super) {
tslib.__extends(CountDownGroup, _super);
function CountDownGroup() {
var _this = _super.call(this) || this;
_this.addChild(createBg(.6));
_this.num1 = createImg('num1');
_this.num2 = createImg('num2');
_this.num3 = createImg('num3');
_this.go = createImg('go');
_this.go.anchorX = 240;
_this.go.anchorY = 171.5;
_this.num1.anchorX = 125.5;
_this.num1.anchorY = 189;
_this.num2.anchorX = 149.5;
_this.num2.anchorY = 191.5;
_this.num3.anchorX = 148.5;
_this.num3.anchorY = 191.5;
_this.go.x = 750 / 2 - 240;
_this.go.y = 525 - 171.5;
_this.num1.x = 750 / 2 - 125.5;
_this.num1.y = 529 - 189;
_this.num2.x = 750 / 2 - 149.5;
_this.num2.y = 526 - 191.5;
_this.num3.x = 750 / 2 - 148.5;
_this.num3.y = 525 - 191.5;
_this.addChild(_this.num1);
_this.addChild(_this.num2);
_this.addChild(_this.num3);
_this.addChild(_this.go);
_this.visible = false;
_this.reset();
return _this;
}
CountDownGroup.prototype.reset = function () {
this.go.alpha = this.num1.alpha = this.num2.alpha = this.num3.alpha = 0;
this.go.scaleX = this.num1.scaleX = this.num2.scaleX = this.num3.scaleX = 3;
this.go.scaleY = this.num1.scaleY = this.num2.scaleY = this.num3.scaleY = 3;
};
CountDownGroup.prototype.startCountDown = function () {
return tslib.__awaiter(this, void 0, void 0, function () {
var _this = this;
return tslib.__generator(this, function (_a) {
return [2, new Promise(function (r) {
_this.reset();
_this.visible = true;
_this.num3.alpha = 1;
var n3 = engine.Tween.get(_this.num3);
if (props.sound) {
playSound("numCountDown");
}
n3.to({ scaleX: 0.8, scaleY: 0.8 }, 200).to({ scaleX: 1, scaleY: 1 }, 100).wait(500).to({ scaleX: 0, scaleY: 0 }, 200).call(function () {
_this.num2.alpha = 1;
var n2 = engine.Tween.get(_this.num2);
if (props.sound) {
playSound("numCountDown");
}
n2.to({ scaleX: 0.8, scaleY: 0.8 }, 200).to({ scaleX: 1, scaleY: 1 }, 100).wait(500).to({ scaleX: 0, scaleY: 0 }, 200).call(function () {
_this.num1.alpha = 1;
var n1 = engine.Tween.get(_this.num1);
if (props.sound) {
playSound("numCountDown");
}
n1.to({ scaleX: 0.8, scaleY: 0.8 }, 200).to({ scaleX: 1, scaleY: 1 }, 100).wait(500).to({ scaleX: 0, scaleY: 0 }, 200).call(function () {
_this.go.alpha = 1;
var go = engine.Tween.get(_this.go);
if (props.sound) {
if (props.sound)
playSound("goMp3");
}
go.to({ scaleX: 0.8, scaleY: 0.8 }, 200).to({ scaleX: 1, scaleY: 1 }, 100).wait(500).call(function () {
_this.visible = false;
r();
});
});
});
});
})];
});
});
};
return CountDownGroup;
}(engine.Sprite));
var GuideView = (function (_super) {
tslib.__extends(GuideView, _super);
function GuideView() {
var _this = _super.call(this) || this;
_this.initUI();
_this.visible = false;
return _this;
}
GuideView.prototype.initUI = function () {
this.addChild(createBg(.6));
this.guideBg = createImg('guideBg');
this.addChild(this.guideBg);
this.guideEle = createImg('guideEle');
this.addChild(this.guideEle);
this.guideBg.x = 393;
this.guideBg.y = 552;
this.guideEle.x = 361;
this.guideEle.y = 877;
this.guideEle.anchorX = 14;
this.guideEle.anchorY = 88;
this.guideEle.mouseEnabled = this.guideEle.mouseChildren = true;
var svga = createSvga("guideTips");
this.svga = svga;
this.addChild(svga);
svga.gotoAndStop(1);
svga.mouseEnabled = svga.mouseChildren = false;
};
GuideView.prototype.checkHit = function (x, y, w, h) {
var rect = new engine.Rectangle(393, 552, 281, 320);
if (x > rect.x && y > rect.y && (x + w) < (rect.x + rect.width) && (y + h) < (rect.y + rect.height)) {
return true;
}
return false;
};
GuideView.prototype.startGuide = function () {
return tslib.__awaiter(this, void 0, void 0, function () {
var _this = this;
return tslib.__generator(this, function (_a) {
return [2, new Promise(function (r) {
_this.visible = true;
_this.svga.gotoAndStop(1);
_this.svga.play(false, true);
_this.guideEle.scaleX = 1;
_this.guideEle.scaleY = 1;
var offset = [0, 0];
var guideOver = function () {
_this.guideEle.removeEventListener(engine.MouseEvent.MOUSE_DOWN, ondown, _this);
_this.guideEle.anchorX = 14;
_this.guideEle.anchorY = 44;
engine.Tween.get(_this.guideEle).to({ scaleX: 0, scaleY: 0 }, 300).call(function () {
_this.visible = false;
r();
});
};
var onUp = function (e) {
_this.stage.removeEventListener(engine.MouseEvent.MOUSE_MOVE, onMove, _this);
if (_this.checkHit(_this.guideEle.x, _this.guideEle.y, _this.guideEle.width, _this.guideEle.height)) {
guideOver();
}
else {
_this.svga.visible = true;
_this.guideEle.x = 361;
_this.guideEle.y = 877;
engine.Tween.get(_this.guideEle).set({ scaleX: 0, scaleY: 0 }).to({ scaleX: 1, scaleY: 1 }, 300);
}
};
var onMove = function (e) {
_this.guideEle.x = e.stageX - offset[0];
_this.guideEle.y = e.stageY - offset[1];
};
var ondown = function (e) {
offset = [e.localX, e.localY];
_this.svga.visible = false;
_this.stage.once(engine.MouseEvent.MOUSE_UP, onUp, _this);
_this.stage.addEventListener(engine.MouseEvent.MOUSE_MOVE, onMove, _this);
};
_this.guideEle.addEventListener(engine.MouseEvent.MOUSE_DOWN, ondown, _this);
})];
});
});
};
return GuideView;
}(engine.Sprite));
var RightTips = (function (_super) {
tslib.__extends(RightTips, _super);
function RightTips() {
var _this = _super.call(this) || this;
_this.SCORE = props.onceScore || 2;
_this.img = new engine.Image();
_this.img.texture = getTextureByName('rightTips');
_this.addChild(_this.img);
_this.img.anchorX = 88 / 2;
_this.img.anchorY = 85 / 2;
_this.visible = false;
_this.txt = new engine.TextField();
_this.addChild(_this.txt);
_this.txt.text = '+' + _this.SCORE;
_this.txt.size = 60;
_this.txt.fillColor = '#437726';
engine.playSound;
return _this;
}
RightTips.prototype.play = function (rect) {
if (props.sound) {
playSound("rightTipsSound");
}
this.visible = true;
this.txt.x = 100;
engine.Tween.get(this.txt).set({ y: 60, alpha: 1 })
.to({ y: -50 }, 500)
.to({ alpha: 0 });
engine.Tween.get(this.img).set({ x: 0, y: 0, scaleX: 0, scaleY: 0, alpha: 1 })
.to({ scaleX: 1, scaleY: 1 }, 200, engine.Ease.getBackOut(1))
.wait(200)
.to({ alpha: 0 }, 300);
this.x = rect.x + 180;
this.y = rect.y;
};
return RightTips;
}(engine.Sprite));
var GameView = (function (_super) {
tslib.__extends(GameView, _super);
function GameView() {
var _this = _super.call(this) || this;
_this._timeCounter = 0;
_this.once(engine.Event.ADDED_TO_STAGE, _this.setup, _this);
return _this;
}
GameView.prototype.configUI = function () {
var uiMap = {};
this.uiMap = uiMap;
var config = uiConfig();
for (var _i = 0, config_1 = config; _i < config_1.length; _i++) {
var item = config_1[_i];
var id = item.id, texture = item.texture, pos = item.pos, anchor = item.anchor;
var sp = new engine.Sprite(getTextureByName(texture));
this.addChild(sp);
uiMap[id] = sp;
if (anchor) {
sp.anchorX = anchor[0];
sp.anchorY = anchor[1];
}
if (pos) {
sp.x = pos[0];
sp.y = pos[1];
if (anchor) {
sp.x = pos[0] - sp.anchorX;
sp.y = pos[1] - sp.anchorY;
}
}
}
this.configConveyors();
this.createRects();
this.countdown = new CountDownGroup();
this.addChild(this.countdown);
this.guide = new GuideView();
this.addChild(this.guide);
this.wrongTips = new WrongTips();
this.rightTips = new RightTips();
this.addChild(this.wrongTips);
this.addChild(this.rightTips);
};
GameView.prototype.createRects = function () {
this.wetWaste = this.createRect(74, 552, 301, 293, 0xffffff);
this.harmfulWaste = this.createRect(75, 247, 300, 293, 0xff0000);
this.dryWaste = this.createRect(389, 249, 286, 291, 0x000000);
this.recoverableWaste = this.createRect(389, 551, 287, 292, 0x0000ff);
};
GameView.prototype.createRect = function (x, y, w, h, c) {
var rect = new engine.Rectangle(x, y, w, h);
var sp = new engine.Sprite();
this.addChild(sp);
sp.x = x;
sp.y = y;
var g = new engine.Graphics;
g.alpha = 0.0;
g.beginFill(c);
g.drawRect(0, 0, w, h);
g.endFill();
sp.addChild(g);
return rect;
};
GameView.prototype.configConveyors = function () {
var conveyor0 = new Conveyor();
var conveyor1 = new Conveyor();
this.addChild(conveyor0);
this.addChild(conveyor1);
conveyor0.x = 0;
conveyor1.x = 764;
this.conveyors = new Conveyors(this);
this.conveyors.initData(conveyor0, conveyor1);
};
GameView.prototype.playAni = function () {
var _this = this;
var idlerWheels = ['idler0', 'idler1', 'idler2', 'idler3', 'idler4', 'idler5', 'idler6'];
idlerWheels = idlerWheels.map(function (i) { return _this.uiMap[i]; });
idlerWheels.forEach(function (i) {
engine.Tween.get(i, { loop: true }).to({ rotation: -360 }, 1000);
});
};
GameView.prototype.stopAni = function () {
var _this = this;
var idlerWheels = ['idler0', 'idler1', 'idler2', 'idler3', 'idler4', 'idler5', 'idler6'];
idlerWheels = idlerWheels.map(function (i) { return _this.uiMap[i]; });
idlerWheels.forEach(function (i) {
engine.Tween.removeTweens(i);
});
};
GameView.prototype.start = function () {
return tslib.__awaiter(this, void 0, void 0, function () {
var _this = this;
return tslib.__generator(this, function (_a) {
switch (_a.label) {
case 0:
console.log('on start');
this._timeCounter = 0;
if (!!getGuideInfo()) return [3, 2];
return [4, this.guide.startGuide()];
case 1:
_a.sent();
setGuide();
_a.label = 2;
case 2:
this.conveyors.clear();
return [4, this.countdown.startCountDown()];
case 3:
_a.sent();
this.startGame();
engine.globalEvent.dispatchEvent('recycling-time-update', {
second: this.getSecond(),
});
this._timer = setInterval(function () {
_this.onTimer();
}, 1000);
return [2];
}
});
});
};
GameView.prototype.startGame = function () {
this.playAni();
this.conveyors.startConveyors();
};
GameView.prototype.stopGame = function () {
this.stopAni();
};
GameView.prototype.getSecond = function () {
return props.time - this._timeCounter;
};
GameView.prototype.onTimer = function () {
this._timeCounter++;
engine.globalEvent.dispatchEvent('recycling-time-update', {
second: this.getSecond(),
});
if (this.getSecond() == 0) {
this.stop();
this.conveyors.timeout();
if (props.sound)
playSound("gameOverMp3");
}
};
GameView.prototype.stop = function () {
clearInterval(this._timer);
this.stopGame();
};
GameView.prototype.setup = function () {
console.log('onSteup', props);
this.configUI();
};
GameView.prototype.onDown = function (e) {
};
GameView.prototype.stageOnUp = function (e) {
};
GameView.prototype.onSuccess = function () {
};
GameView.prototype.onMove = function (e) {
};
return GameView;
}(engine.Container));
var GameWrapper = (function (_super) {
tslib.__extends(GameWrapper, _super);
function GameWrapper() {
var _this = _super.call(this) || this;
engine.globalEvent.addEventListener('recycling-start', _this.start, _this);
engine.globalEvent.addEventListener('recycling-sound-update', _this.updateSound, _this);
engine.globalEvent.addEventListener('recycling-stop', _this.stop, _this);
var gameView = _this._gameView = new GameView();
_this.addChild(gameView);
return _this;
}
GameWrapper.prototype.updateSound = function (event) {
injectProps(event.data);
};
GameWrapper.prototype.start = function (event) {
injectProps(event.data);
this._gameView.start();
};
GameWrapper.prototype.stop = function (event) {
this._gameView.stop();
};
return GameWrapper;
}(engine.Container));
function index (props) {
prepareProps();
injectProps(props);
var instance = new GameWrapper();
return instance;
}
return index;
})));
//# sourceMappingURL=main.js.map
\ No newline at end of file
{"version":3,"file":"index.js","sources":["src/custom/recycling/src/game/utils.ts","src/custom/recycling/src/props.ts","src/custom/recycling/src/game/Conveyor.ts","src/custom/recycling/src/game/datas/GarbageTypes.ts","src/custom/recycling/src/game/datas/GarbageConfig.ts","src/custom/recycling/src/game/datas/transStores.ts","src/custom/recycling/src/game/utils/checkHit.ts","src/custom/recycling/src/game/utils/removeChild.ts","src/custom/recycling/src/game/utils/removeEle.ts","src/custom/recycling/src/game/utils/shuffle.ts","src/custom/recycling/src/game/views/WrongTips.ts","src/custom/recycling/src/game/Conveyors.ts","src/custom/recycling/src/game/uiConfig.ts","src/custom/recycling/src/game/utils/getGuideInfo.ts","src/custom/recycling/src/game/views/createBg.ts","src/custom/recycling/src/game/views/createImg.ts","src/custom/recycling/src/game/views/CountDownGroup.ts","src/custom/recycling/src/game/views/guideView.ts","src/custom/recycling/src/game/views/RightTips.ts","src/custom/recycling/src/game/GameView.ts","src/custom/recycling/src/game/GameWrapper.ts","src/custom/recycling/src/index.ts"],"sourcesContent":["/**\n * Created by rockyl on 2020-01-21.\n */\n\nexport function getTexture(uuid) {\n\treturn engine.Texture.from(getAssetByUUID(uuid).uuid);\n}\n\nexport function getTextureByName(name) {\n\treturn getTexture(engine.getAssetByName(name).uuid);\n}\n\nexport function playSound(name) {\n\tengine.playSound(engine.getAssetByName(name).uuid, {keep: true});\n}\nexport function createSvga(name, anchorName?) {\n\tlet inst = new svga.Svga();\n\tinst.source = 'asset://' + engine.getAssetByName(name).uuid;\n\treturn inst;\n}\n\nexport function getIndexFromRC(row,col,maxCol){\n\tlet index;\n\tindex = row * maxCol + col ;\n\treturn index\n}\n\n\n\n\nexport function getRandomArray(array){\n\tarray.sort(function() {\n\t\treturn .5 - Math.random();\n\t});\n}","/**\n * Created by rockyl on 2020-01-21.\n */\n\nexport let props: any = {};\n\nexport function prepareProps() {\n\tlet metaProps = getProps();\n\n\tengine.injectProp(props, metaProps);\n}\n\nexport function injectProps(p) {\n\tengine.injectProp(props, p);\n}\n","import { getTextureByName } from \"./utils\";\n\nexport default class Conveyor extends engine.Sprite {\n\n idx0: engine.Sprite;\n idx1: engine.Sprite;\n idx2: engine.Sprite;\n idx3: engine.Sprite;\n idx4: engine.Sprite;\n constructor() {\n super();\n\n this.y = 904.21;\n\n const sp = new engine.Sprite(getTextureByName('conveyor'));\n this.addChild(sp);\n\n this.idx0 = this.createItem(75, 50);\n this.idx1 = this.createItem(225, 50);\n this.idx2 = this.createItem(375, 50);\n this.idx3 = this.createItem(525, 50);\n this.idx4 = this.createItem(675, 50);\n }\n\n clear() {\n this.clearItem(this.idx0)\n this.clearItem(this.idx1)\n this.clearItem(this.idx2)\n this.clearItem(this.idx3)\n this.clearItem(this.idx4)\n }\n private clearItem(idx: engine.Sprite) {\n if (idx.children.length > 0)\n idx.removeChildAt(0)\n }\n\n private createItem(x, y) {\n const sp = new engine.Sprite();\n this.addChild(sp);\n sp.x = x;\n sp.y = y;\n\n // const g = new engine.Graphics;\n // g.beginFill(0xff0000);\n // g.drawRect(0,0,100,100);\n // g.endFill();\n // sp.addChild(g);\n\n return sp\n }\n}","export enum GarbageTypes {\n recoverableWaste='recoverableWaste',\n harmfulWaste='harmfulWaste',\n wetWaste='wetWaste',\n dryWaste='dryWaste'\n}\n\n","import { GarbageTypes } from './GarbageTypes';\nexport default class GarbageConfig {\n public static config: any[] = [\n { name: \"保鲜盒\", source: \"g00\", type: GarbageTypes.recoverableWaste, width: 129, height: 111 },\n { name: \"报纸\", source: \"g01\", type: GarbageTypes.recoverableWaste, width: 138, height: 144 },\n { name: \"贝壳\", source: \"g02\", type: GarbageTypes.dryWaste, width: 79, height: 117 },\n { name: \"冰箱\", source: \"g03\", type: GarbageTypes.recoverableWaste, width: 63, height: 151 },\n { name: \"菜梗菜叶\", source: \"g04\", type: GarbageTypes.wetWaste, width: 144, height: 98 },\n { name: \"残枝落叶\", source: \"g05\", type: GarbageTypes.wetWaste, width: 120, height: 99 },\n { name: \"茶叶渣\", source: \"g06\", type: GarbageTypes.wetWaste, width: 86, height: 96 },\n { name: \"尘土\", source: \"g07\", type: GarbageTypes.dryWaste, width: 109, height: 114 },\n { name: \"创口贴\", source: \"g08\", type: GarbageTypes.dryWaste, width: 112, height: 90 },\n { name: \"大骨头\", source: \"g09\", type: GarbageTypes.dryWaste, width: 89, height: 101 },\n { name: \"普通干电池\", source: \"g11\", type: GarbageTypes.dryWaste, width: 89, height: 131 },\n { name: \"方便面盒\", source: \"g12\", type: GarbageTypes.dryWaste, width: 89, height: 168 },\n { name: \"废弃食用油脂\", source: \"g13\", type: GarbageTypes.wetWaste, width: 131, height: 164 },\n { name: \"骨骼内脏\", source: \"g14\", type: GarbageTypes.wetWaste, width: 104, height: 82 },\n { name: \"锅具\", source: \"g15\", type: GarbageTypes.recoverableWaste, width: 119, height: 149 },\n { name: \"果核\", source: \"g16\", type: GarbageTypes.wetWaste, width: 99, height: 95 },\n { name: \"果皮\", source: \"g17\", type: GarbageTypes.wetWaste, width: 115, height: 127 },\n { name: \"化妆品\", source: \"g18\", type: GarbageTypes.harmfulWaste, width: 67, height: 151 },\n { name: \"鸡蛋壳\", source: \"g19\", type: GarbageTypes.wetWaste, width: 99, height: 107 },\n { name: \"剪刀\", source: \"g20\", type: GarbageTypes.recoverableWaste, width: 96, height: 127 },\n { name: \"胶带\", source: \"g21\", type: GarbageTypes.dryWaste, width: 87, height: 113 },\n { name: \"榴莲壳\", source: \"g22\", type: GarbageTypes.dryWaste, width: 136, height: 116 },\n { name: \"毛巾\", source: \"g23\", type: GarbageTypes.recoverableWaste, width: 108, height: 96 },\n { name: \"纽扣电池\", source: \"g24\", type: GarbageTypes.harmfulWaste, width: 87, height: 89 },\n { name: \"破旧陶瓷罐\", source: \"g25\", type: GarbageTypes.dryWaste, width: 110, height: 125 },\n { name: \"杀虫剂\", source: \"g26\", type: GarbageTypes.harmfulWaste, width: 64, height: 160 },\n { name: \"剩菜剩饭\", source: \"g27\", type: GarbageTypes.wetWaste, width: 128, height: 96 },\n { name: \"手机\", source: \"g28\", type: GarbageTypes.recoverableWaste, width: 82, height: 142 },\n { name: \"书本\", source: \"g29\", type: GarbageTypes.recoverableWaste, width: 106, height: 132 },\n { name: \"玻璃杯\", source: \"g30\", type: GarbageTypes.recoverableWaste, width: 62, height: 119 },\n { name: \"水银温度计\", source: \"g31\", type: GarbageTypes.harmfulWaste, width: 109, height: 162 },\n { name: \"水银血压计\", source: \"g32\", type: GarbageTypes.harmfulWaste, width: 115, height: 147 },\n { name: \"塑料桶\", source: \"g33\", type: GarbageTypes.recoverableWaste, width: 92, height: 131 },\n { name: \"卫生纸\", source: \"g34\", type: GarbageTypes.dryWaste, width: 92, height: 132 },\n { name: \"污染织物\", source: \"g35\", type: GarbageTypes.dryWaste, width: 128, height: 139 },\n { name: \"污染纸张\", source: \"g36\", type: GarbageTypes.dryWaste, width: 96, height: 136 },\n { name: \"洗衣机\", source: \"g37\", type: GarbageTypes.recoverableWaste, width: 87, height: 157 },\n { name: \"烟蒂\", source: \"g38\", type: GarbageTypes.dryWaste, width: 87, height: 124 },\n { name: \"药品\", source: \"g39\", type: GarbageTypes.harmfulWaste, width: 109, height: 131 },\n { name: \"药品包装\", source: \"g40\", type: GarbageTypes.harmfulWaste, width: 108, height: 125 },\n { name: \"椰子壳\", source: \"g41\", type: GarbageTypes.dryWaste, width: 104, height: 119 },\n { name: \"衣服\", source: \"g42\", type: GarbageTypes.recoverableWaste, width: 83, height: 137 },\n { name: \"衣架\", source: \"g43\", type: GarbageTypes.recoverableWaste, width: 132, height: 125 },\n { name: \"易拉罐\", source: \"g44\", type: GarbageTypes.recoverableWaste, width: 65, height: 133 },\n { name: \"荧光灯\", source: \"g45\", type: GarbageTypes.harmfulWaste, width: 90, height: 118 },\n { name: \"油漆桶\", source: \"g46\", type: GarbageTypes.harmfulWaste, width: 65, height: 143 },\n { name: \"一次性纸杯\", source: \"g47\", type: GarbageTypes.dryWaste, width: 76, height: 116 },\n { name: \"纸尿裤\", source: \"g48\", type: GarbageTypes.dryWaste, width: 93, height: 138 },\n { name: \"纸箱\", source: \"g49\", type: GarbageTypes.recoverableWaste, width: 112, height: 118 },\n { name: \"指甲油\", source: \"g50\", type: GarbageTypes.harmfulWaste, width: 64, height: 138 },\n ];\n}\n","import { GarbageTypes } from \"./GarbageTypes\"\n\nexport default (list: any[]) => {\n\n let tmp = [];\n\n const contains = (val) => {\n for (const i of tmp) {\n if (val.targetType == i.targetType && val.itemType == i.itemType && val.itemName == i.itemName)\n return true;\n }\n return false;\n }\n\n list.forEach(i => {\n if (!contains(i))\n tmp.push(i)\n })\n\n list = tmp;\n\n tmp = [];\n\n const nameList = [];\n const contains2 = (val) => {\n for (const i of tmp) {\n if (val.itemName == i.itemName) {\n nameList.push(i.itemName);\n return true;\n }\n }\n return false;\n }\n\n list.forEach(i => {\n if (!contains2(i))\n tmp.push(i)\n })\n\n list = tmp;\n\n list.forEach(i=>{\n if(nameList.indexOf(i.itemName) !=-1) {\n i.targetType=i.itemType\n }\n })\n\n return list.map(i => {\n return {\n 'targetName': getTargetName(i.targetType),\n 'isCorrect': i.targetType == i.itemType,\n 'itemName': i.itemName,\n 'itemTypeName':getTargetName(i.itemType)\n }\n })\n}\n\n\nconst getTargetName = (type: GarbageTypes) => {\n\n switch (type) {\n case GarbageTypes.recoverableWaste:\n return '可回收物'\n break;\n\n case GarbageTypes.harmfulWaste:\n return '有害垃圾'\n break;\n\n case GarbageTypes.wetWaste:\n return '湿垃圾'\n break;\n\n case GarbageTypes.dryWaste:\n return '其他垃圾'\n break;\n\n default:\n break;\n }\n}","export default (view, rect: engine.Rectangle) => {\n const { x, y } = view;\n const { width, height } = view.texture\n if (x > rect.x && y > rect.y && (x + width) < (rect.x + rect.width) && (y + height) < (rect.y + rect.height)) {\n return true\n }\n return false;\n}\n\n","export default (d:engine.DisplayObject)=>{\n if(d && d.parent) {\n d.parent.removeChild(d)\n }\n}","export default (e, arr)=> {\n let index = arr.indexOf(e);\n if (index >= 0) {\n arr.splice(index, 1)\n }\n}","export default (arr): any =>{\n let i = arr.length;\n\n while (i) {\n\n let j = Math.floor(Math.random() * i--); //5555\n\n [arr[j], arr[i]] = [arr[i], arr[j]];\n\n }\n\n return arr;\n}","import { getTextureByName, playSound } from \"../utils\";\nimport { GarbageTypes } from \"../datas/GarbageTypes\";\nimport GameView from \"../GameView\";\nimport { props } from \"../../props\";\n\nexport default class WrongTips extends engine.Sprite {\n img: engine.Image;\n constructor() {\n super();\n\n this.img = new engine.Image();\n this.img.texture = getTextureByName('wrongTips')//wrongTips\n this.addChild(this.img);\n this.img.anchorX = 88 / 2;\n this.img.anchorY = 85 / 2;\n this.visible = false;\n }\n\n play(rect: engine.Rectangle) {\n this.visible = true;\n\n if (props.sound) {\n playSound(\"wrongTipsMp3\");\n }\n\n const dur = 70;\n const stren = 20;\n engine.Tween.get(this.img).set({ x: 0, y: 0, scaleX: 1, scaleY: 1, alpha: 1 })\n .to({ x: stren }, dur)\n .to({ x: 0 }, dur)\n .to({ x: -stren }, dur)\n .to({ x: 0 }, dur)\n .wait(200)\n .to({ alpha: 0 }, 300)\n\n\n this.x = rect.x + 180;\n this.y = rect.y;\n }\n}\n\nexport const getTargetRect = (targetType, gameview: GameView) => {\n switch (targetType) {\n case GarbageTypes.dryWaste:\n return gameview.dryWaste\n break;\n case GarbageTypes.wetWaste:\n return gameview.wetWaste\n break;\n case GarbageTypes.harmfulWaste:\n return gameview.harmfulWaste\n break;\n case GarbageTypes.recoverableWaste:\n return gameview.recoverableWaste\n break;\n\n default:\n break;\n }\n}","import { props } from \"../props\";\nimport Conveyor from \"./Conveyor\";\nimport GarbageConfig from \"./datas/GarbageConfig\";\nimport { GarbageTypes } from \"./datas/GarbageTypes\";\nimport transStores from \"./datas/transStores\";\nimport GameView from \"./GameView\";\nimport { getTextureByName, playSound } from \"./utils\";\nimport checkHit from \"./utils/checkHit\";\nimport removeChild from \"./utils/removeChild\";\nimport removeEle from \"./utils/removeEle\";\nimport shuffle from \"./utils/shuffle\";\nimport { getTargetRect } from \"./views/WrongTips\";\n\nexport default class Conveyors extends engine.Sprite {\n\n conveyor0: Conveyor;\n conveyor1: Conveyor;\n\n private conveyorsPool: Conveyor[] = [];\n\n private GarbageConfig: any[] = GarbageConfig.config;\n\n private datas: { name, type, isOnStage, width, height, source, isRight }[] = [];\n\n score: number;\n wrapper: GameView\n stores: any[];\n\n constructor(p) {\n super();\n this.wrapper = p;\n }\n\n initData(conveyor0, conveyor1) {\n this.conveyor0 = conveyor0;\n this.conveyor1 = conveyor1;\n }\n\n private setDefault() {\n\n this.score = 0;\n\n this.conveyorsPool.push(this.conveyor0);\n this.conveyorsPool.push(this.conveyor1);\n\n // 本局游戏的20种垃圾\n const allConfigs = shuffle(this.GarbageConfig.concat([]));\n\n for (let i = 0; i < GarbageConfig.config.length; i++) {\n allConfigs[i].idx = i;\n allConfigs[i].isRight = false;\n allConfigs[i].isMistake = false;\n allConfigs[i].isOnStage = false;\n this.datas.push(allConfigs[i]);\n }\n\n for (let i = 0; i < 5; i++) {\n let data = this.datas[i];\n let view: any = new engine.Sprite(getTextureByName(data.source));\n view.isWrong = false;\n view.isRight = false;\n\n data.isOnStage = true;\n view.data=data;\n view.type = data.type;\n view.name = data.name;\n view.anchorX = data.width / 2;\n view.anchorY = data.height;\n view.x = -data.width / 2;\n view.y = -data.height + 40;\n this.conveyor1[`idx${i}`].addChild(view)\n view.addEventListener(engine.MouseEvent.MOUSE_DOWN, this.onDown_garbage, this);\n }\n }\n\n startConveyors() {\n this.setDefault();\n engine.gameStage.addEventListener(engine.Event.ENTER_FRAME, this.onEnterFrame, this)\n\n }\n onEnterFrame(ENTER_FRAME: string, onEnterFrame: any, arg2: this) {\n if (this.score == (props.maxScore || 100)) {\n this.gameOver();\n this.wrapper.stop();\n if (props.sound) playSound(\"gameOverMp3\")\n \n }\n\n // console.log('this.conveyorsPool.length', this.conveyorsPool.length)\n\n this.conveyorsPool.forEach(conveyor => {\n conveyor.x -= props.speed || 3;\n });\n\n // if (this.conveyorsPool.length > 1) {\n if (this.conveyorsPool[this.conveyorsPool.length - 1].x <= 764) {\n // 最后一个传送带完全进入屏幕时 往后添加一个传送带\n const conveyor = new Conveyor();\n conveyor.x = this.conveyorsPool[this.conveyorsPool.length - 1].x + 764;\n this.wrapper.addChild(conveyor);\n this.conveyorsPool.push(conveyor);\n } else {\n //筛选出currGamePool里还未正确和添加在舞台上的\n let dataList = []\n for (var n = 0; n < this.datas.length; n++) {\n let dataItem = this.datas[n];\n if (!dataItem.isRight && !dataItem.isOnStage) {\n dataList.push(dataItem);\n }\n }\n //最后一个传送带\n let lastConveyor = this.conveyorsPool[this.conveyorsPool.length - 1]\n for (var m = 0; m < 5; m++) {\n if (!lastConveyor[`idx${m}`].children[0]) {\n let data = dataList.shift();\n if (data) {\n data.isOnStage = true;\n let view: any = new engine.Sprite(getTextureByName(data.source));\n view.data = data;\n view.isWrong = false;\n view.isRight = false;\n view.type = data.type;\n view.name = data.name;\n view.anchorX = data.width / 2;\n view.anchorY = data.height;\n view.x = -data.width / 2;\n view.y = -data.height + 40;\n lastConveyor[`idx${m}`].addChild(view);\n view.addEventListener(engine.MouseEvent.MOUSE_DOWN, this.onDown_garbage, this);\n\n } else {\n break\n }\n }\n }\n }\n\n // 从场景移除\n if (this.conveyorsPool[0].x < -750) {\n for (var k = 0; k < this.datas.length; k++) {\n let dataItem = this.datas[k]\n let idx4 = this.conveyorsPool[0][`idx${4}`]\n if (idx4.children[0]) {\n if (dataItem.name == idx4.children[0].name) {\n dataItem.isOnStage = false;\n removeEle(dataItem, this.datas);\n this.datas.push(dataItem);\n idx4.removeChild(idx4.children[0])\n break\n }\n }\n\n }\n this.conveyorsPool.shift();\n }\n else if (this.conveyorsPool[0].x < -600) {\n for (var k = 0; k < this.datas.length; k++) {\n let dataItem = this.datas[k]\n let idx3 = this.conveyorsPool[0][`idx${3}`]\n if (idx3.children[0]) {\n if (dataItem.name == idx3.children[0].name) {\n dataItem.isOnStage = false;\n removeEle(dataItem, this.datas);\n this.datas.push(dataItem);\n idx3.removeChild(idx3.children[0])\n break\n }\n }\n\n }\n }\n else if (this.conveyorsPool[0].x < -450) {\n for (var k = 0; k < this.datas.length; k++) {\n let dataItem = this.datas[k]\n let idx2 = this.conveyorsPool[0][`idx${2}`]\n if (idx2.children[0]) {\n if (dataItem.name == idx2.children[0].name) {\n dataItem.isOnStage = false;\n removeEle(dataItem, this.datas);\n this.datas.push(dataItem);\n idx2.removeChild(idx2.children[0])\n break\n }\n }\n\n }\n }\n else if (this.conveyorsPool[0].x < -300) {\n for (var k = 0; k < this.datas.length; k++) {\n let dataItem = this.datas[k]\n let idx1 = this.conveyorsPool[0][`idx${1}`]\n if (idx1.children[0]) {\n if (dataItem.name == idx1.children[0].name) {\n dataItem.isOnStage = false;\n removeEle(dataItem, this.datas);\n this.datas.push(dataItem);\n idx1.removeChild(idx1.children[0])\n break\n }\n }\n\n }\n }\n else if (this.conveyorsPool[0].x < -150) {\n for (var k = 0; k < this.datas.length; k++) {\n let dataItem = this.datas[k]\n let idx0 = this.conveyorsPool[0][`idx${0}`]\n if (idx0.children[0]) {\n if (dataItem.name == idx0.children[0].name) {\n dataItem.isOnStage = false;\n removeEle(dataItem, this.datas);\n this.datas.push(dataItem);\n idx0.removeChild(idx0.children[0])\n break\n }\n }\n\n }\n }\n\n // }\n }\n\n addscore() {\n this.score += (props.onceScore || 2);\n engine.globalEvent.dispatchEvent('recycling-score-update', {\n score: this.score\n });\n }\n\n gameOver() {\n engine.gameStage.removeEventListener(engine.Event.ENTER_FRAME, this.onEnterFrame, this);\n engine.globalEvent.dispatchEvent('recycling-game-end', transStores(this.stores));\n }\n\n private _currentDragView: engine.Sprite;\n private _currentTarget;\n onDown_garbage(e: engine.MouseEvent) {\n if (this._currentDragView) {\n removeChild(this._currentDragView)\n }\n const target: engine.Sprite = e.target;\n let view: any = new engine.Sprite(target.texture);\n this._currentDragView = view;\n this._currentTarget = target;\n target.scaleX = target.scaleY = 0;\n this.wrapper.addChild(view);\n view.x = e.stageX - target.texture.width / 2;\n view.y = e.stageY - target.texture.height / 2;\n view.type = target['type'];\n view.name = target['name'];\n this.wrapper.addEventListener(engine.MouseEvent.MOUSE_UP, this.onStageMouseUp, this)\n this.wrapper.addEventListener(engine.MouseEvent.MOUSE_MOVE, this.onStageMouseMove, this)\n }\n\n onStageMouseMove(e: engine.MouseEvent) {\n // console.log('onStageMouseMove')\n const view = this._currentDragView;\n view.x = e.stageX - view.texture.width / 2;\n view.y = e.stageY - view.texture.height / 2;\n }\n\n onStageMouseUp(e: engine.MouseEvent) {\n // console.log('onStageMouseUp')\n this.wrapper.removeEventListener(engine.MouseEvent.MOUSE_UP, this.onStageMouseUp, this)\n this.wrapper.removeEventListener(engine.MouseEvent.MOUSE_MOVE, this.onStageMouseMove, this)\n if (!this._currentDragView) return;\n const result: GarbageTypes = this.checkHitRect();\n if (result) {//落入\n if (result == this._currentDragView['type']) {//匹配\n this.addscore();\n this.wrapper.rightTips.play(getTargetRect(result,this.wrapper));\n this._currentTarget.data.isRight=true;\n } else {//不匹配\n engine.Tween.get(this._currentTarget).to({ scaleX: 1, scaleY: 1 }, 300).call(() => { });\n this.wrapper.wrongTips.play(getTargetRect(result,this.wrapper));\n }\n this.stores.push({ targetType: result, itemType: this._currentDragView['type'], itemName: this._currentDragView['name'] });\n\n } else { //没有落入\n engine.Tween.get(this._currentTarget).to({ scaleX: 1, scaleY: 1 }, 300).call(() => { });\n }\n this._currentDragView.anchorX = this._currentDragView.texture.width / 2;\n this._currentDragView.anchorY = this._currentDragView.texture.height / 2;\n engine.Tween.get(this._currentDragView).to({ scaleX: 0, scaleY: 0 }, 300).call(() => {\n removeChild(this._currentDragView);\n\n // this._currentDragView = null;\n // this._currentTarget = null;\n });\n }\n\n clear() {\n this.conveyor0.x = 0;\n this.conveyor1.x = 764;\n this.conveyorsPool.forEach(i => {\n i.clear();\n });\n this.conveyorsPool = [];\n this.datas = [];\n this.stores = [];\n }\n\n timeout() {\n if (this._currentDragView) {\n removeChild(this._currentDragView)\n }\n this.wrapper.removeEventListener(engine.MouseEvent.MOUSE_UP, this.onStageMouseUp, this)\n this.wrapper.removeEventListener(engine.MouseEvent.MOUSE_MOVE, this.onStageMouseMove, this)\n this.gameOver();\n }\n\n checkHitRect() {\n if (checkHit(this._currentDragView, this.wrapper.wetWaste)) {\n return GarbageTypes.wetWaste\n }\n if (checkHit(this._currentDragView, this.wrapper.harmfulWaste)) {\n return GarbageTypes.harmfulWaste\n }\n if (checkHit(this._currentDragView, this.wrapper.dryWaste)) {\n return GarbageTypes.dryWaste\n }\n if (checkHit(this._currentDragView, this.wrapper.recoverableWaste)) {\n return GarbageTypes.recoverableWaste\n }\n return null;\n }\n}","export default () => {\n return [\n {\n id: 'playBg',\n texture: 'playBg'\n },\n {\n id: 'idler0',\n texture: 'idlerWheel',\n pos: [75, 1038],\n anchor: [20, 21.5]\n },\n {\n id: 'idler1',\n texture: 'idlerWheel',\n pos: [175, 1038],\n anchor: [20, 21.5]\n },\n {\n id: 'idler2',\n texture: 'idlerWheel',\n pos: [275, 1038],\n anchor: [20, 21.5]\n },\n {\n id: 'idler3',\n texture: 'idlerWheel',\n pos: [375, 1038],\n anchor: [20, 21.5]\n },\n {\n id: 'idler4',\n texture: 'idlerWheel',\n pos: [475, 1038],\n anchor: [20, 21.5]\n },\n {\n id: 'idler5',\n texture: 'idlerWheel',\n pos: [575, 1038],\n anchor: [20, 21.5]\n },\n {\n id: 'idler6',\n texture: 'idlerWheel',\n pos: [675, 1038],\n anchor: [20, 21.5]\n },\n ]\n}","export default () => {\n //0 未引导\n if (!window.localStorage) {\n return 0\n }\n\n return localStorage.getItem('recyclingGuide')\n}\n\nexport const setGuide = () => {\n if (window.localStorage)\n localStorage.setItem('recyclingGuide', '1')\n}","export default (a=1)=>{\n const rect = new engine.Graphics();\n rect.beginFill(0)\n rect.drawRect(0,0,750,1624)\n rect.endFill();\n rect.alpha=a\n return rect\n}","import { getTextureByName } from \"../utils\";\n\nexport default (texture)=>{\n return new engine.Sprite(getTextureByName(texture));\n}","import createBg from \"./createBg\";\nimport createImg from \"./createImg\";\nimport { props } from \"../../props\";\nimport { playSound } from \"../utils\";\n\nexport default class CountDownGroup extends engine.Sprite {\n num1: engine.Sprite;\n num2: engine.Sprite;\n num3: engine.Sprite;\n go: engine.Sprite;\n constructor() {\n super();\n\n this.addChild(createBg(.6))\n\n this.num1 = createImg('num1')\n this.num2 = createImg('num2')\n this.num3 = createImg('num3')\n this.go = createImg('go')\n this.go.anchorX = 240\n this.go.anchorY = 171.5\n this.num1.anchorX = 125.5\n this.num1.anchorY = 189\n this.num2.anchorX = 149.5\n this.num2.anchorY = 191.5\n this.num3.anchorX = 148.5\n this.num3.anchorY = 191.5\n this.go.x = 750 / 2 - 240\n this.go.y = 525 - 171.5\n this.num1.x = 750 / 2 - 125.5\n this.num1.y = 529 - 189\n this.num2.x = 750 / 2 - 149.5\n this.num2.y = 526 - 191.5\n this.num3.x = 750 / 2 - 148.5\n this.num3.y = 525 - 191.5\n this.addChild(this.num1)\n this.addChild(this.num2)\n this.addChild(this.num3)\n this.addChild(this.go)\n\n this.visible = false;\n this.reset();\n }\n\n private reset() {\n this.go.alpha = this.num1.alpha = this.num2.alpha = this.num3.alpha = 0;\n this.go.scaleX = this.num1.scaleX = this.num2.scaleX = this.num3.scaleX = 3;\n this.go.scaleY = this.num1.scaleY = this.num2.scaleY = this.num3.scaleY = 3;\n }\n\n async startCountDown() {\n return new Promise((r) => {\n this.reset();\n this.visible = true;\n\n this.num3.alpha = 1;\n let n3 = engine.Tween.get(this.num3);\n\n if (props.sound) {\n playSound(\"numCountDown\");\n }\n\n n3.to({ scaleX: 0.8, scaleY: 0.8 }, 200).to({ scaleX: 1, scaleY: 1 }, 100).wait(500).to({ scaleX: 0, scaleY: 0 }, 200).call(() => {\n this.num2.alpha = 1;\n let n2 = engine.Tween.get(this.num2);\n if (props.sound) {\n playSound(\"numCountDown\");\n }\n n2.to({ scaleX: 0.8, scaleY: 0.8 }, 200).to({ scaleX: 1, scaleY: 1 }, 100).wait(500).to({ scaleX: 0, scaleY: 0 }, 200).call(() => {\n this.num1.alpha = 1;\n let n1 = engine.Tween.get(this.num1);\n if (props.sound) {\n playSound(\"numCountDown\");\n }\n n1.to({ scaleX: 0.8, scaleY: 0.8 }, 200).to({ scaleX: 1, scaleY: 1 }, 100).wait(500).to({ scaleX: 0, scaleY: 0 }, 200).call(() => {\n this.go.alpha = 1;\n let go = engine.Tween.get(this.go);\n if (props.sound) {\n if (props.sound) playSound(\"goMp3\");\n }\n go.to({ scaleX: 0.8, scaleY: 0.8 }, 200).to({ scaleX: 1, scaleY: 1 }, 100).wait(500).call(() => {\n this.visible = false;\n \n r()\n })\n })\n })\n })\n\n\n })\n\n }\n}","import createBg from \"./createBg\";\nimport createImg from \"./createImg\";\nimport { createSvga } from \"../utils\";\n\nexport default class GuideView extends engine.Sprite {\n guideBg: engine.Sprite;\n guideEle: engine.Sprite;\n svga: svga.Svga;\n\n constructor() {\n super();\n this.initUI();\n this.visible = false;\n }\n\n initUI() {\n this.addChild(createBg(.6))\n this.guideBg = createImg('guideBg')\n this.addChild(this.guideBg)\n this.guideEle = createImg('guideEle')\n this.addChild(this.guideEle)\n this.guideBg.x = 393;\n this.guideBg.y = 552;\n this.guideEle.x = 361;\n\n this.guideEle.y = 877;\n this.guideEle.anchorX=14;\n this.guideEle.anchorY=88;\n this.guideEle.mouseEnabled = this.guideEle.mouseChildren = true;\n\n let svga = createSvga(\"guideTips\");\n this.svga = svga\n this.addChild(svga);\n svga.gotoAndStop(1);\n svga.mouseEnabled = svga.mouseChildren = false;\n }\n\n checkHit(x, y, w, h) {\n const rect = new engine.Rectangle(393, 552, 281, 320)\n if (x > rect.x && y > rect.y && (x + w) < (rect.x + rect.width) && (y + h) < (rect.y + rect.height)) {\n return true\n }\n return false;\n }\n\n async startGuide() {\n return new Promise((r) => {\n this.visible = true;\n this.svga.gotoAndStop(1);\n this.svga.play(false, true)\n this.guideEle.scaleX = 1;\n this.guideEle.scaleY = 1;\n\n let offset = [0, 0]\n const guideOver = () => {\n this.guideEle.removeEventListener(engine.MouseEvent.MOUSE_DOWN, ondown, this)\n this.guideEle.anchorX=14;\n this.guideEle.anchorY=44;\n engine.Tween.get(this.guideEle).to({scaleX:0,scaleY:0},300).call(()=>{\n this.visible = false;\n r();\n });\n }\n\n const onUp = (e: engine.MouseEvent) => {\n this.stage.removeEventListener(engine.MouseEvent.MOUSE_MOVE, onMove, this)\n if (this.checkHit(this.guideEle.x, this.guideEle.y, this.guideEle.width, this.guideEle.height)) {\n guideOver();\n } else {\n this.svga.visible = true;\n this.guideEle.x = 361;\n this.guideEle.y = 877;\n engine.Tween.get(this.guideEle).set({scaleX:0,scaleY:0}).to({scaleX:1,scaleY:1},300)\n }\n }\n\n const onMove = (e: engine.MouseEvent) => {\n this.guideEle.x = e.stageX - offset[0];\n this.guideEle.y = e.stageY - offset[1];\n }\n\n const ondown = (e: engine.MouseEvent) => {\n offset = [e.localX, e.localY]\n this.svga.visible = false;\n this.stage.once(engine.MouseEvent.MOUSE_UP, onUp, this)\n this.stage.addEventListener(engine.MouseEvent.MOUSE_MOVE, onMove, this)\n }\n\n this.guideEle.addEventListener(engine.MouseEvent.MOUSE_DOWN, ondown, this)\n\n })\n }\n}","import { getTextureByName, playSound } from \"../utils\";\nimport { props } from \"../../props\";\n\nexport default class RightTips extends engine.Sprite {\n img: engine.Image;\n txt: engine.TextField;\n private SCORE = props.onceScore || 2;\n constructor() {\n super();\n\n this.img = new engine.Image();\n this.img.texture = getTextureByName('rightTips')\n this.addChild(this.img);\n this.img.anchorX = 88 / 2;\n this.img.anchorY = 85 / 2;\n this.visible = false;\n\n this.txt = new engine.TextField();\n this.addChild(this.txt)\n this.txt.text = '+' + this.SCORE\n this.txt.size = 60;\n this.txt.fillColor = '#437726'\n // this.txt.bold = true\n engine.playSound\n }\n\n play(rect: engine.Rectangle) {\n \n if (props.sound) {\n playSound(\"rightTipsSound\");\n }\n this.visible = true;\n\n this.txt.x = 100;\n engine.Tween.get(this.txt).set({ y: 60, alpha: 1 })\n .to({ y: -50 }, 500)\n .to({ alpha: 0 })\n\n const DUR = 70;\n engine.Tween.get(this.img).set({ x: 0, y: 0, scaleX: 0, scaleY: 0, alpha: 1 })\n .to({ scaleX: 1, scaleY: 1 }, 200, engine.Ease.getBackOut(1))\n .wait(200)\n .to({ alpha: 0 }, 300)\n\n\n this.x = rect.x + 180;\n this.y = rect.y;\n }\n}","/**\n * Created by rockyl on 2018/8/16.\n */\n\nimport { getTextureByName, playSound } from \"../../../recycling/src/game/utils\";\nimport { props } from \"../props\";\nimport Conveyor from \"./Conveyor\";\nimport Conveyors from \"./Conveyors\";\nimport uiConfig from \"./uiConfig\";\nimport getGuideInfo, { setGuide } from \"./utils/getGuideInfo\";\nimport CountDownGroup from \"./views/CountDownGroup\";\nimport GuideView from \"./views/guideView\";\nimport WrongTips from \"./views/WrongTips\";\nimport RightTips from \"./views/RightTips\";\n\nexport default class GameView extends engine.Container {\n private _timer;\n private _timeCounter = 0;\n uiMap: any;\n wetWaste: engine.Rectangle;\n harmfulWaste: engine.Rectangle;\n dryWaste: engine.Rectangle;\n recoverableWaste: engine.Rectangle;\n countdown: CountDownGroup;\n guide: GuideView;\n conveyors: Conveyors;\n wrongTips: WrongTips;\n rightTips: RightTips;\n\n constructor() {\n super();\n this.once(engine.Event.ADDED_TO_STAGE, this.setup, this);\n }\n\n configUI() {\n\n const uiMap: any = {};\n this.uiMap = uiMap;\n const config = uiConfig();\n for (const item of config) {\n const { id, texture, pos, anchor } = item;\n const sp = new engine.Sprite(getTextureByName(texture));\n this.addChild(sp);\n uiMap[id] = sp;\n if (anchor) {\n sp.anchorX = anchor[0];\n sp.anchorY = anchor[1];\n }\n if (pos) {\n sp.x = pos[0];\n sp.y = pos[1];\n if (anchor) {\n sp.x = pos[0] - sp.anchorX;\n sp.y = pos[1] - sp.anchorY;\n }\n }\n }\n\n this.configConveyors();\n\n this.createRects();\n\n this.countdown = new CountDownGroup();\n this.addChild(this.countdown)\n\n this.guide = new GuideView();\n this.addChild(this.guide);\n\n this.wrongTips = new WrongTips();\n this.rightTips = new RightTips()\n this.addChild(this.wrongTips)\n this.addChild(this.rightTips)\n\n }\n\n private createRects() {\n this.wetWaste = this.createRect(74, 552, 301, 293, 0xffffff);\n this.harmfulWaste = this.createRect(75, 247, 300, 293, 0xff0000);\n this.dryWaste = this.createRect(389, 249, 286, 291, 0x000000);\n this.recoverableWaste = this.createRect(389, 551, 287, 292, 0x0000ff);\n }\n\n createRect(x, y, w, h, c) {\n const rect = new engine.Rectangle(x, y, w, h);\n\n const sp = new engine.Sprite();\n this.addChild(sp);\n sp.x = x;\n sp.y = y;\n\n const g = new engine.Graphics;\n g.alpha = 0.0;\n g.beginFill(c);\n g.drawRect(0, 0, w, h);\n g.endFill();\n sp.addChild(g);\n\n return rect;\n }\n\n private configConveyors() {\n const conveyor0 = new Conveyor();\n const conveyor1 = new Conveyor();\n this.addChild(conveyor0);\n this.addChild(conveyor1);\n conveyor0.x = 0;\n conveyor1.x = 764;\n this.conveyors = new Conveyors(this);\n this.conveyors.initData(conveyor0, conveyor1)\n }\n\n playAni() {\n let idlerWheels = ['idler0', 'idler1', 'idler2', 'idler3', 'idler4', 'idler5', 'idler6'];\n idlerWheels = idlerWheels.map(i => this.uiMap[i]);\n idlerWheels.forEach(i => {\n engine.Tween.get(i, { loop: true }).to({ rotation: -360 }, 1000);\n })\n }\n\n stopAni() {\n let idlerWheels = ['idler0', 'idler1', 'idler2', 'idler3', 'idler4', 'idler5', 'idler6'];\n idlerWheels = idlerWheels.map(i => this.uiMap[i]);\n idlerWheels.forEach(i => {\n engine.Tween.removeTweens(i);\n })\n }\n\n async start() {\n console.log('on start')\n this._timeCounter = 0;\n\n if (!getGuideInfo()) {\n await this.guide.startGuide();\n setGuide();\n }\n\n this.conveyors.clear()\n\n await this.countdown.startCountDown();\n\n this.startGame();\n\n engine.globalEvent.dispatchEvent('recycling-time-update', {\n second: this.getSecond(),\n });\n\n this._timer = setInterval(() => {\n this.onTimer();\n }, 1000);\n }\n\n private startGame() {\n this.playAni();\n this.conveyors.startConveyors();\n }\n\n private stopGame() {\n this.stopAni();\n }\n\n getSecond() {\n\n return props.time - this._timeCounter\n }\n\n onTimer() {\n this._timeCounter++;\n engine.globalEvent.dispatchEvent('recycling-time-update', {\n second: this.getSecond(),\n });\n\n if (this.getSecond() == 0) {\n this.stop();\n this.conveyors.timeout();\n if (props.sound) playSound(\"gameOverMp3\")\n }\n }\n\n stop() {\n clearInterval(this._timer);\n this.stopGame();\n }\n\n setup() {\n console.log('onSteup', props);\n this.configUI();\n }\n\n onDown(e: engine.MouseEvent) {\n\n }\n\n stageOnUp(e) {\n\n\n }\n\n private onSuccess() {\n\n\n }\n\n onMove(e: engine.MouseEvent) {\n\n }\n\n}\n","/**\n * Created by rockyl on 2020-01-09.\n */\n\nimport GameView from \"./GameView\";\nimport { injectProps } from \"../props\";\n\n\nexport class GameWrapper extends engine.Container {\n\t\n\tupdateSound(event: engine.Event) {\n\t\tinjectProps(event.data);\n\t}\n\n\t// private _status;\n\tprivate _gameView: GameView;\n\tconstructor() {\n\t\tsuper();\n\n\t\tengine.globalEvent.addEventListener('recycling-start', this.start, this);\n\t\tengine.globalEvent.addEventListener('recycling-sound-update', this.updateSound, this);\n\t\tengine.globalEvent.addEventListener('recycling-stop', this.stop, this);\n\n\t\t//创建实例\n\t\tlet gameView = this._gameView = new GameView();\n\t\tthis.addChild(gameView);\n\n\t}\n\n\tstart(event: engine.Event) {\n\t\tinjectProps(event.data);\n\n\t\tthis._gameView.start();\n\t}\n\tstop(event: engine.Event) {\n\t\t\n\t\tthis._gameView.stop();\n\t}\n}\n","/**\n * Created by rockyl on 2019-11-20.\n */\n\nimport {GameWrapper} from \"./game/GameWrapper\";\nimport {injectProps, prepareProps} from \"./props\";\n\nexport default function (props) {\n\tprepareProps();\n\tinjectProps(props);\n\n\tlet instance = new GameWrapper();\n\t\n\treturn instance;\n}\n"],"names":["__extends"],"mappings":";;;;;;UAIgB,UAAU,CAAC,IAAI;KAC9B,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;CACvD,CAAC;UAEe,gBAAgB,CAAC,IAAI;KACpC,OAAO,UAAU,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;CACrD,CAAC;UAEe,SAAS,CAAC,IAAI;KAC7B,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAC,IAAI,EAAE,IAAI,EAAC,CAAC,CAAC;CAClE,CAAC;UACe,UAAU,CAAC,IAAI,EAAE,UAAW;KAC3C,IAAI,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;KAC3B,IAAI,CAAC,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;KAC5D,OAAO,IAAI,CAAC;CACb;;CCfO,IAAI,KA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B;KACD,0BAAI,GAAJ,UAAK,KAAmB;SAEvB,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;MACtB;KACF,kBAAC;CAAD,CAAC,CA9BgC,MAAM,CAAC,SAAS,GA8BhD;;iBC/BwB,KAAK;KAC7B,YAAY,EAAE,CAAC;KACf,WAAW,CAAC,KAAK,CAAC,CAAC;KAEnB,IAAI,QAAQ,GAAG,IAAI,WAAW,EAAE,CAAC;KAEjC,OAAO,QAAQ,CAAC;CACjB,CAAC;;;;;;;;"}
\ No newline at end of file
/**
* Created by rockyl on 2020-01-21.
*/
let customModuleProps = {
};
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "垃圾分类",
"desc": "垃圾分类1.0",
"props": {
"MAX_COL": {
"alias": "图片分成几列",
"type": "number",
"default": 3
}
},
"assets": [{
"name": "guideTips",
"url": "//yun.duiba.com.cn/aurora/assets/8588817322dec18aba06c5a41fb5fc934e7cff71.svga",
"uuid": "865b76ad-2c89-4898-b2e8-047d0fcfef22",
"ext": ".svga"
},
{
"name": "playBg",
"url": "//yun.duiba.com.cn/aurora/assets/2a5b5087d915c2510f1b96facdb9532798ab59cd.jpg",
"uuid": "1e7dd156-b59a-491d-8154-af2ecf425a8b",
"ext": ".jpg"
},
{
"name": "wrongTips",
"url": "//yun.duiba.com.cn/aurora/assets/875c53d7034aaca6a532c78122f79c9f98f132c1.png",
"uuid": "bc35abf4-2541-4751-9122-e8e185c52e45",
"ext": ".png"
},
{
"name": "rightTips",
"url": "//yun.duiba.com.cn/aurora/assets/61a6c5a09466497ab999a4a504606ce9f923be6b.png",
"uuid": "388ed033-852a-496c-bed8-d941243ea531",
"ext": ".png"
},
{
"name": "idlerWheel",
"url": "//yun.duiba.com.cn/aurora/assets/2a06e8c7b49d8e53955359f7a6dc5bd887978c21.png",
"uuid": "c21d9b0f-1aec-40c8-bb2b-7e674506b833",
"ext": ".png"
},
{
"name": "conveyor",
"url": "//yun.duiba.com.cn/aurora/assets/0015de48d63d00dafe730b43141d747f47069237.png",
"uuid": "4176aa04-d943-444e-beca-5ecc1313b059",
"ext": ".png"
},
{
"name": "num1",
"url": "//yun.duiba.com.cn/aurora/assets/936fb8ddc88fc0d6dd19d8edf82f338b8515538f.png",
"uuid": "6d47c907-b208-4192-bef6-2642d2e5dbb7",
"ext": ".png"
},
{
"name": "num2",
"url": "//yun.duiba.com.cn/aurora/assets/84ff6491549abce966d9662888e3bb314eadf25b.png",
"uuid": "814aee4c-3042-4be5-83f3-a50ebcdcdb34",
"ext": ".png"
},
{
"name": "num3",
"url": "//yun.duiba.com.cn/aurora/assets/4fe7816293b8e1de96b8c51e6c705afdd1bfdb3b.png",
"uuid": "814cd1c7-e7a7-4f1c-90e9-f254a37a2a6f",
"ext": ".png"
},
{
"name": "go",
"url": "//yun.duiba.com.cn/aurora/assets/3447725395d511ac9062d49e85c9d5c6c40552e0.png",
"uuid": "9e1b7c53-9e5c-4a22-a651-5f66f6672599",
"ext": ".png"
},
{
"name": "guideBg",
"url": "//yun.duiba.com.cn/aurora/assets/b43a358298c7669dc9f80ea83bc79c74087b82a7.png",
"uuid": "d96da0ff-b188-41e3-8a8b-8a67108c1e65",
"ext": ".png"
},
{
"name": "guideEle",
"url": "//yun.duiba.com.cn/aurora/assets/b7a5489c9bc7c87479a36a5574f553e25dbe862d.png",
"uuid": "196d410b-a645-4956-9ef1-d6f30be7c1fd",
"ext": ".png"
},
{
"name": "g50",
"url": "//yun.duiba.com.cn/aurora/assets/99a2ed7d25039e005312eed19f56ad1b451564eb.png",
"uuid": "fe97cd48-720b-4412-9bcf-0bdd3a8e96a1",
"ext": ".png"
},
{
"name": "g49",
"url": "//yun.duiba.com.cn/aurora/assets/5564ae74afe698c969f4fe292087bb10d0b21687.png",
"uuid": "g49",
"ext": ".png"
},
{
"name": "g48",
"url": "//yun.duiba.com.cn/aurora/assets/159b05de98c981b940c94e090d28a4885c421235.png",
"uuid": "e1aedf7c-4352-4583-9df2-d2a6aea163dd",
"ext": ".png"
},
{
"name": "g47",
"url": "//yun.duiba.com.cn/aurora/assets/7c48a3b8ca06833310640718d8b8812c6e584c0d.png",
"uuid": "402f8717-a023-4625-9daf-4e8f7964e7a2",
"ext": ".png"
},
{
"name": "g46",
"url": "//yun.duiba.com.cn/aurora/assets/534cef6d7a73022dac36a8f917aaba59138ab5d3.png",
"uuid": "9445c37d-e81c-4d36-a211-eed7a97eea4d",
"ext": ".png"
},
{
"name": "g45",
"url": "//yun.duiba.com.cn/aurora/assets/360c8b26d732c3952621a4949a81329aad2bdf82.png",
"uuid": "10e25631-ea9d-4dd3-8bef-4c340068c81a",
"ext": ".png"
},
{
"name": "g44",
"url": "//yun.duiba.com.cn/aurora/assets/4ad9335add89aebbfcb1e8b501ceb64d4df1a534.png",
"uuid": "202c0ea8-bc6b-4098-aae8-bd29cf13b35f",
"ext": ".png"
},
{
"name": "g43",
"url": "//yun.duiba.com.cn/aurora/assets/2e6f5306255d434119e6dc986a9098b09426e252.png",
"uuid": "bb47d087-004c-4882-8d80-d172c0bff8a7",
"ext": ".png"
},
{
"name": "g42",
"url": "//yun.duiba.com.cn/aurora/assets/5d1537eccc3c3a5252990a8b20b30c357840b14d.png",
"uuid": "3a9c692c-2683-4ad5-a0b5-6193e5f708d1",
"ext": ".png"
},
{
"name": "g41",
"url": "//yun.duiba.com.cn/aurora/assets/4ea16fb41faede6cfbb06d00cdc14899252d49fe.png",
"uuid": "3e6d234e-2393-4d75-9e5c-c87e9f4f4370",
"ext": ".png"
},
{
"name": "g40",
"url": "//yun.duiba.com.cn/aurora/assets/13ee95640c7269d89bf788cf200c734006b06329.png",
"uuid": "2c7df6ab-6ed5-451a-8da3-1de64e9a6518",
"ext": ".png"
},
{
"name": "g39",
"url": "//yun.duiba.com.cn/aurora/assets/07c67a3b9decae820fed0e1a627c9c02e4da3b6e.png",
"uuid": "2614eb6c-9153-4149-b8d6-ef02ac2200ae",
"ext": ".png"
},
{
"name": "g38",
"url": "//yun.duiba.com.cn/aurora/assets/0b8bbf79b28f868822050f82c91092f2d12be0eb.png",
"uuid": "g38",
"ext": ".png"
},
{
"name": "g37",
"url": "//yun.duiba.com.cn/aurora/assets/54be9165464c72c73274424ba811ca297cba748c.png",
"uuid": "g37",
"ext": ".png"
},
{
"name": "g36",
"url": "//yun.duiba.com.cn/aurora/assets/aae4011a2400b0f8653eb4355ec73a338a3a0d61.png",
"uuid": "g36",
"ext": ".png"
},
{
"name": "g35",
"url": "//yun.duiba.com.cn/aurora/assets/a40e4f7fc60a22562681573ba88c4dd43900461e.png",
"uuid": "g35",
"ext": ".png"
},
{
"name": "g34",
"url": "//yun.duiba.com.cn/aurora/assets/a25b8528764046567bddba363a0dc910d0ea7a28.png",
"uuid": "g34",
"ext": ".png"
},
{
"name": "g33",
"url": "//yun.duiba.com.cn/aurora/assets/60689312961248d1469c63a60d67af7a53d0b659.png",
"uuid": "g33",
"ext": ".png"
},
{
"name": "g32",
"url": "//yun.duiba.com.cn/aurora/assets/d78c7693b66d4a7716d741c37d3ed1e334265d42.png",
"uuid": "g32",
"ext": ".png"
},
{
"name": "g31",
"url": "//yun.duiba.com.cn/aurora/assets/d16defc2eb95c09884287031e24f5ebc67c06f55.png",
"uuid": "g31",
"ext": ".png"
},
{
"name": "g30",
"url": "//yun.duiba.com.cn/aurora/assets/550a9de40b797beb8b9504ea797004e29b415276.png",
"uuid": "g30",
"ext": ".png"
},
{
"name": "g29",
"url": "//yun.duiba.com.cn/aurora/assets/aaaf6a8c3c8e550ed34a5bcbf4881e924f9852cb.png",
"uuid": "g29",
"ext": ".png"
},
{
"name": "g28",
"url": "//yun.duiba.com.cn/aurora/assets/fce08988ad87102d726a8d3b90cef89fdc3d2d2a.png",
"uuid": "g28",
"ext": ".png"
},
{
"name": "g27",
"url": "//yun.duiba.com.cn/aurora/assets/fc9dc534b36263f05dff38ece12b8c8dfdcc4008.png",
"uuid": "g27",
"ext": ".png"
},
{
"name": "g26",
"url": "//yun.duiba.com.cn/aurora/assets/e12f30a5a9035bcf9079c67ffdc0a61a4e9d2653.png",
"uuid": "g26",
"ext": ".png"
},
{
"name": "g25",
"url": "//yun.duiba.com.cn/aurora/assets/ea83372b1cc61bc68923748b9bb17cbdab9e0f84.png",
"uuid": "g25",
"ext": ".png"
},
{
"name": "g24",
"url": "//yun.duiba.com.cn/aurora/assets/98db6bd77d14c1ca262ce903fc3ee8f0bf34804b.png",
"uuid": "g24",
"ext": ".png"
},
{
"name": "g23",
"url": "//yun.duiba.com.cn/aurora/assets/9d38482c8505f1483d32d8ca5960f02cbadfe044.png",
"uuid": "g23",
"ext": ".png"
},
{
"name": "g22",
"url": "//yun.duiba.com.cn/aurora/assets/6d6f4c7c6c4dd95e8cf448b3377c92ecfd462a0e.png",
"uuid": "g22",
"ext": ".png"
},
{
"name": "g21",
"url": "//yun.duiba.com.cn/aurora/assets/5a8306bd5c826f10f785230b659df0c9eb3dbfcf.png",
"uuid": "g21",
"ext": ".png"
},
{
"name": "g20",
"url": "//yun.duiba.com.cn/aurora/assets/e21d6e158e601c4677593e0779fed23cc91860e8.png",
"uuid": "g20",
"ext": ".png"
},
{
"name": "g19",
"url": "//yun.duiba.com.cn/aurora/assets/876d34e94dcc98b7d5457be79454042ec65c9fd6.png",
"uuid": "g19",
"ext": ".png"
},
{
"name": "g18",
"url": "//yun.duiba.com.cn/aurora/assets/692aac3b874926dee775ffe0fd73f8c4e7e39bd3.png",
"uuid": "g18",
"ext": ".png"
},
{
"name": "g17",
"url": "//yun.duiba.com.cn/aurora/assets/ed14bd294d187104dc22ac0ecda28109a37593fa.png",
"uuid": "g17",
"ext": ".png"
},
{
"name": "g16",
"url": "//yun.duiba.com.cn/aurora/assets/1e21621783f6be0ba00b869e980cc3a869e53439.png",
"uuid": "g16",
"ext": ".png"
},
{
"name": "g15",
"url": "//yun.duiba.com.cn/aurora/assets/5fa0dc818ea9574f23adf091bdaa40d3cf6ccc11.png",
"uuid": "g15",
"ext": ".png"
},
{
"name": "g14",
"url": "//yun.duiba.com.cn/aurora/assets/18d5086dbd7213a8a0ce7d8a159cba1f1e901d77.png",
"uuid": "g14",
"ext": ".png"
},
{
"name": "g13",
"url": "//yun.duiba.com.cn/aurora/assets/63650960879b4d743b6954e1ec805684325af48d.png",
"uuid": "g13",
"ext": ".png"
},
{
"name": "g12",
"url": "//yun.duiba.com.cn/aurora/assets/b3e66d60f64f00b248c762ce0df045eafe5f70d1.png",
"uuid": "g12",
"ext": ".png"
},
{
"name": "g11",
"url": "//yun.duiba.com.cn/aurora/assets/9998bf5779dffe3097681a09ab97e7822f09ba92.png",
"uuid": "g11",
"ext": ".png"
},
{
"name": "g10",
"url": "//yun.duiba.com.cn/aurora/assets/337719d386e7979debaa3f8a58a17e416c474338.png",
"uuid": "g10",
"ext": ".png"
},
{
"name": "g09",
"url": "//yun.duiba.com.cn/aurora/assets/942bdcd7fd3475bc2a4af2f2b96fb1ad2ab659d9.png",
"uuid": "g09",
"ext": ".png"
},
{
"name": "g08",
"url": "//yun.duiba.com.cn/aurora/assets/1b8e1a03df623870576c063c04a4b8e1aef8bf72.png",
"uuid": "g08",
"ext": ".png"
},
{
"name": "g07",
"url": "//yun.duiba.com.cn/aurora/assets/95a5d437fe386cf9f6c52587c1d2db98f2d23f0c.png",
"uuid": "g07",
"ext": ".png"
},
{
"name": "g06",
"url": "//yun.duiba.com.cn/aurora/assets/2d288b4f549d0e69c6b7fc6e863aaf10e3e2604d.png",
"uuid": "g06",
"ext": ".png"
},
{
"name": "g05",
"url": "//yun.duiba.com.cn/aurora/assets/45c17615fdff30ed6584161a9cea26189239678e.png",
"uuid": "g05",
"ext": ".png"
},
{
"name": "g04",
"url": "//yun.duiba.com.cn/aurora/assets/ffd3cffe53e031b5891bcfcfbcafa4443f6dc40e.png",
"uuid": "g04",
"ext": ".png"
},
{
"name": "g03",
"url": "//yun.duiba.com.cn/aurora/assets/a51f82e1a931ad7c9d5cb915c4f9b7fb3fac0de5.png",
"uuid": "g03",
"ext": ".png"
},
{
"name": "g02",
"url": "//yun.duiba.com.cn/aurora/assets/82699aa20a75cc5670b54a6bb4c83a8c56811fdf.png",
"uuid": "g02",
"ext": ".png"
},
{
"name": "g01",
"url": "//yun.duiba.com.cn/aurora/assets/726ee984b6b56d75d2bd3d89b3c1c4714fb79314.png",
"uuid": "g01",
"ext": ".png"
},
{
"name": "g00",
"url": "//yun.duiba.com.cn/aurora/assets/d2f1d01024247ea64cf35c610fec85f19dd89c21.png",
"uuid": "g00",
"ext": ".png"
},
{
"name": "gameOverMp3",
"url": "//yun.duiba.com.cn/aurora/assets/e3f99add549c50afeb0a13aa31ebe4eaff1a87a6.mp3",
"uuid": "gameOverMp3",
"ext": ".mp3"
},
{
"name": "goMp3",
"url": "//yun.duiba.com.cn/aurora/assets/1a367f83ba6105658c2a97bc1a305f887f7e16e7.mp3",
"uuid": "goMp3",
"ext": ".mp3"
},
{
"name": "wrongTipsMp3",
"url": "//yun.duiba.com.cn/aurora/assets/82719d5220223f404de703db95beac8c2ba101a9.mp3",
"uuid": "wrongTipsMp3",
"ext": ".mp3"
},
{
"name": "rightTipsSound",
"url": "//yun.duiba.com.cn/aurora/assets/dbf1ec24569c939bbf599475fd49110e51951584.mp3",
"uuid": "d7aa31a9-24b9-4082-98f5-a071e1f81a5a",
"ext": ".mp3"
},
{
"name": "numCountDown",
"url": "//yun.duiba.com.cn/aurora/assets/b7a6e76838c82ef34ed6af0e13550633910e0aec.mp3",
"uuid": "c8bae79c-6973-4021-adc1-45db51afe93e",
"ext": ".mp3"
}
],
"events": {
"in": {
"recycling-start": {
"alias": "开始",
"data": {
"time": "游戏时间"
}
},
"recycling-end": {
"alias": "游戏结束",
"data": {}
},
"recycling-stop": {
"alias": "停止"
}
},
"out": {
"recycling-time-update": {
"alias": "倒计时更新",
"data": {
"time": "剩余时间"
}
},
"recycling-score-update": {
"alias": "分数更新",
"data": {
"score": "分数"
}
},
"recycling-game-end": {
"alias": "游戏结束",
"data": {}
},
"recycling-game-success": {
"alias": "游戏成功",
"data": {
"time": "游戏消耗时间"
}
}
}
}
}
\ No newline at end of file
import { getTextureByName } from "./utils";
export default class Conveyor extends engine.Sprite {
idx0: engine.Sprite;
idx1: engine.Sprite;
idx2: engine.Sprite;
idx3: engine.Sprite;
idx4: engine.Sprite;
constructor() {
super();
this.y = 904.21;
const sp = new engine.Sprite(getTextureByName('conveyor'));
this.addChild(sp);
this.idx0 = this.createItem(75, 50);
this.idx1 = this.createItem(225, 50);
this.idx2 = this.createItem(375, 50);
this.idx3 = this.createItem(525, 50);
this.idx4 = this.createItem(675, 50);
}
clear() {
this.clearItem(this.idx0)
this.clearItem(this.idx1)
this.clearItem(this.idx2)
this.clearItem(this.idx3)
this.clearItem(this.idx4)
}
private clearItem(idx: engine.Sprite) {
if (idx.children.length > 0)
idx.removeChildAt(0)
}
private createItem(x, y) {
const sp = new engine.Sprite();
this.addChild(sp);
sp.x = x;
sp.y = y;
// const g = new engine.Graphics;
// g.beginFill(0xff0000);
// g.drawRect(0,0,100,100);
// g.endFill();
// sp.addChild(g);
return sp
}
}
\ No newline at end of file
import { props } from "../props";
import Conveyor from "./Conveyor";
import GarbageConfig from "./datas/GarbageConfig";
import { GarbageTypes } from "./datas/GarbageTypes";
import transStores from "./datas/transStores";
import GameView from "./GameView";
import { getTextureByName, playSound } from "./utils";
import checkHit from "./utils/checkHit";
import removeChild from "./utils/removeChild";
import removeEle from "./utils/removeEle";
import shuffle from "./utils/shuffle";
import { getTargetRect } from "./views/WrongTips";
export default class Conveyors extends engine.Sprite {
conveyor0: Conveyor;
conveyor1: Conveyor;
private conveyorsPool: Conveyor[] = [];
private GarbageConfig: any[] = GarbageConfig.config;
private datas: { name, type, isOnStage, width, height, source, isRight }[] = [];
score: number;
wrapper: GameView
stores: any[];
constructor(p) {
super();
this.wrapper = p;
}
initData(conveyor0, conveyor1) {
this.conveyor0 = conveyor0;
this.conveyor1 = conveyor1;
}
private setDefault() {
this.score = 0;
this.conveyorsPool.push(this.conveyor0);
this.conveyorsPool.push(this.conveyor1);
// 本局游戏的20种垃圾
const allConfigs = shuffle(this.GarbageConfig.concat([]));
for (let i = 0; i < GarbageConfig.config.length; i++) {
allConfigs[i].idx = i;
allConfigs[i].isRight = false;
allConfigs[i].isMistake = false;
allConfigs[i].isOnStage = false;
this.datas.push(allConfigs[i]);
}
for (let i = 0; i < 5; i++) {
let data = this.datas[i];
let view: any = new engine.Sprite(getTextureByName(data.source));
view.isWrong = false;
view.isRight = false;
data.isOnStage = true;
view.data=data;
view.type = data.type;
view.name = data.name;
view.anchorX = data.width / 2;
view.anchorY = data.height;
view.x = -data.width / 2;
view.y = -data.height + 40;
this.conveyor1[`idx${i}`].addChild(view)
view.addEventListener(engine.MouseEvent.MOUSE_DOWN, this.onDown_garbage, this);
}
}
startConveyors() {
this.setDefault();
engine.gameStage.addEventListener(engine.Event.ENTER_FRAME, this.onEnterFrame, this)
}
onEnterFrame(ENTER_FRAME: string, onEnterFrame: any, arg2: this) {
if (this.score == (props.maxScore || 100)) {
this.gameOver();
this.wrapper.stop();
if (props.sound) playSound("gameOverMp3")
}
// console.log('this.conveyorsPool.length', this.conveyorsPool.length)
this.conveyorsPool.forEach(conveyor => {
conveyor.x -= props.speed || 3;
});
// if (this.conveyorsPool.length > 1) {
if (this.conveyorsPool[this.conveyorsPool.length - 1].x <= 764) {
// 最后一个传送带完全进入屏幕时 往后添加一个传送带
const conveyor = new Conveyor();
conveyor.x = this.conveyorsPool[this.conveyorsPool.length - 1].x + 764;
this.wrapper.addChild(conveyor);
this.conveyorsPool.push(conveyor);
} else {
//筛选出currGamePool里还未正确和添加在舞台上的
let dataList = []
for (var n = 0; n < this.datas.length; n++) {
let dataItem = this.datas[n];
if (!dataItem.isRight && !dataItem.isOnStage) {
dataList.push(dataItem);
}
}
//最后一个传送带
let lastConveyor = this.conveyorsPool[this.conveyorsPool.length - 1]
for (var m = 0; m < 5; m++) {
if (!lastConveyor[`idx${m}`].children[0]) {
let data = dataList.shift();
if (data) {
data.isOnStage = true;
let view: any = new engine.Sprite(getTextureByName(data.source));
view.data = data;
view.isWrong = false;
view.isRight = false;
view.type = data.type;
view.name = data.name;
view.anchorX = data.width / 2;
view.anchorY = data.height;
view.x = -data.width / 2;
view.y = -data.height + 40;
lastConveyor[`idx${m}`].addChild(view);
view.addEventListener(engine.MouseEvent.MOUSE_DOWN, this.onDown_garbage, this);
} else {
break
}
}
}
}
// 从场景移除
if (this.conveyorsPool[0].x < -750) {
for (var k = 0; k < this.datas.length; k++) {
let dataItem = this.datas[k]
let idx4 = this.conveyorsPool[0][`idx${4}`]
if (idx4.children[0]) {
if (dataItem.name == idx4.children[0].name) {
dataItem.isOnStage = false;
removeEle(dataItem, this.datas);
this.datas.push(dataItem);
idx4.removeChild(idx4.children[0])
break
}
}
}
this.conveyorsPool.shift();
}
else if (this.conveyorsPool[0].x < -600) {
for (var k = 0; k < this.datas.length; k++) {
let dataItem = this.datas[k]
let idx3 = this.conveyorsPool[0][`idx${3}`]
if (idx3.children[0]) {
if (dataItem.name == idx3.children[0].name) {
dataItem.isOnStage = false;
removeEle(dataItem, this.datas);
this.datas.push(dataItem);
idx3.removeChild(idx3.children[0])
break
}
}
}
}
else if (this.conveyorsPool[0].x < -450) {
for (var k = 0; k < this.datas.length; k++) {
let dataItem = this.datas[k]
let idx2 = this.conveyorsPool[0][`idx${2}`]
if (idx2.children[0]) {
if (dataItem.name == idx2.children[0].name) {
dataItem.isOnStage = false;
removeEle(dataItem, this.datas);
this.datas.push(dataItem);
idx2.removeChild(idx2.children[0])
break
}
}
}
}
else if (this.conveyorsPool[0].x < -300) {
for (var k = 0; k < this.datas.length; k++) {
let dataItem = this.datas[k]
let idx1 = this.conveyorsPool[0][`idx${1}`]
if (idx1.children[0]) {
if (dataItem.name == idx1.children[0].name) {
dataItem.isOnStage = false;
removeEle(dataItem, this.datas);
this.datas.push(dataItem);
idx1.removeChild(idx1.children[0])
break
}
}
}
}
else if (this.conveyorsPool[0].x < -150) {
for (var k = 0; k < this.datas.length; k++) {
let dataItem = this.datas[k]
let idx0 = this.conveyorsPool[0][`idx${0}`]
if (idx0.children[0]) {
if (dataItem.name == idx0.children[0].name) {
dataItem.isOnStage = false;
removeEle(dataItem, this.datas);
this.datas.push(dataItem);
idx0.removeChild(idx0.children[0])
break
}
}
}
}
// }
}
addscore() {
this.score += (props.onceScore || 2);
engine.globalEvent.dispatchEvent('recycling-score-update', {
score: this.score
});
}
gameOver() {
engine.gameStage.removeEventListener(engine.Event.ENTER_FRAME, this.onEnterFrame, this);
engine.globalEvent.dispatchEvent('recycling-game-end', transStores(this.stores));
}
private _currentDragView: engine.Sprite;
private _currentTarget;
onDown_garbage(e: engine.MouseEvent) {
if (this._currentDragView) {
removeChild(this._currentDragView)
}
const target: engine.Sprite = e.target;
let view: any = new engine.Sprite(target.texture);
this._currentDragView = view;
this._currentTarget = target;
target.scaleX = target.scaleY = 0;
this.wrapper.addChild(view);
view.x = e.stageX - target.texture.width / 2;
view.y = e.stageY - target.texture.height / 2;
view.type = target['type'];
view.name = target['name'];
this.wrapper.addEventListener(engine.MouseEvent.MOUSE_UP, this.onStageMouseUp, this)
this.wrapper.addEventListener(engine.MouseEvent.MOUSE_MOVE, this.onStageMouseMove, this)
}
onStageMouseMove(e: engine.MouseEvent) {
// console.log('onStageMouseMove')
const view = this._currentDragView;
view.x = e.stageX - view.texture.width / 2;
view.y = e.stageY - view.texture.height / 2;
}
onStageMouseUp(e: engine.MouseEvent) {
// console.log('onStageMouseUp')
this.wrapper.removeEventListener(engine.MouseEvent.MOUSE_UP, this.onStageMouseUp, this)
this.wrapper.removeEventListener(engine.MouseEvent.MOUSE_MOVE, this.onStageMouseMove, this)
if (!this._currentDragView) return;
const result: GarbageTypes = this.checkHitRect();
if (result) {//落入
if (result == this._currentDragView['type']) {//匹配
this.addscore();
this.wrapper.rightTips.play(getTargetRect(result,this.wrapper));
this._currentTarget.data.isRight=true;
} else {//不匹配
engine.Tween.get(this._currentTarget).to({ scaleX: 1, scaleY: 1 }, 300).call(() => { });
this.wrapper.wrongTips.play(getTargetRect(result,this.wrapper));
}
this.stores.push({ targetType: result, itemType: this._currentDragView['type'], itemName: this._currentDragView['name'] });
} else { //没有落入
engine.Tween.get(this._currentTarget).to({ scaleX: 1, scaleY: 1 }, 300).call(() => { });
}
this._currentDragView.anchorX = this._currentDragView.texture.width / 2;
this._currentDragView.anchorY = this._currentDragView.texture.height / 2;
engine.Tween.get(this._currentDragView).to({ scaleX: 0, scaleY: 0 }, 300).call(() => {
removeChild(this._currentDragView);
// this._currentDragView = null;
// this._currentTarget = null;
});
}
clear() {
this.conveyor0.x = 0;
this.conveyor1.x = 764;
this.conveyorsPool.forEach(i => {
i.clear();
});
this.conveyorsPool = [];
this.datas = [];
this.stores = [];
}
timeout() {
if (this._currentDragView) {
removeChild(this._currentDragView)
}
this.wrapper.removeEventListener(engine.MouseEvent.MOUSE_UP, this.onStageMouseUp, this)
this.wrapper.removeEventListener(engine.MouseEvent.MOUSE_MOVE, this.onStageMouseMove, this)
this.gameOver();
}
checkHitRect() {
if (checkHit(this._currentDragView, this.wrapper.wetWaste)) {
return GarbageTypes.wetWaste
}
if (checkHit(this._currentDragView, this.wrapper.harmfulWaste)) {
return GarbageTypes.harmfulWaste
}
if (checkHit(this._currentDragView, this.wrapper.dryWaste)) {
return GarbageTypes.dryWaste
}
if (checkHit(this._currentDragView, this.wrapper.recoverableWaste)) {
return GarbageTypes.recoverableWaste
}
return null;
}
}
\ No newline at end of file
/**
* Created by rockyl on 2018/8/16.
*/
import { getTextureByName, playSound } from "../../../recycling/src/game/utils";
import { props } from "../props";
import Conveyor from "./Conveyor";
import Conveyors from "./Conveyors";
import uiConfig from "./uiConfig";
import getGuideInfo, { setGuide } from "./utils/getGuideInfo";
import CountDownGroup from "./views/CountDownGroup";
import GuideView from "./views/guideView";
import WrongTips from "./views/WrongTips";
import RightTips from "./views/RightTips";
export default class GameView extends engine.Container {
private _timer;
private _timeCounter = 0;
uiMap: any;
wetWaste: engine.Rectangle;
harmfulWaste: engine.Rectangle;
dryWaste: engine.Rectangle;
recoverableWaste: engine.Rectangle;
countdown: CountDownGroup;
guide: GuideView;
conveyors: Conveyors;
wrongTips: WrongTips;
rightTips: RightTips;
constructor() {
super();
this.once(engine.Event.ADDED_TO_STAGE, this.setup, this);
}
configUI() {
const uiMap: any = {};
this.uiMap = uiMap;
const config = uiConfig();
for (const item of config) {
const { id, texture, pos, anchor } = item;
const sp = new engine.Sprite(getTextureByName(texture));
this.addChild(sp);
uiMap[id] = sp;
if (anchor) {
sp.anchorX = anchor[0];
sp.anchorY = anchor[1];
}
if (pos) {
sp.x = pos[0];
sp.y = pos[1];
if (anchor) {
sp.x = pos[0] - sp.anchorX;
sp.y = pos[1] - sp.anchorY;
}
}
}
this.configConveyors();
this.createRects();
this.countdown = new CountDownGroup();
this.addChild(this.countdown)
this.guide = new GuideView();
this.addChild(this.guide);
this.wrongTips = new WrongTips();
this.rightTips = new RightTips()
this.addChild(this.wrongTips)
this.addChild(this.rightTips)
}
private createRects() {
this.wetWaste = this.createRect(74, 552, 301, 293, 0xffffff);
this.harmfulWaste = this.createRect(75, 247, 300, 293, 0xff0000);
this.dryWaste = this.createRect(389, 249, 286, 291, 0x000000);
this.recoverableWaste = this.createRect(389, 551, 287, 292, 0x0000ff);
}
createRect(x, y, w, h, c) {
const rect = new engine.Rectangle(x, y, w, h);
const sp = new engine.Sprite();
this.addChild(sp);
sp.x = x;
sp.y = y;
const g = new engine.Graphics;
g.alpha = 0.0;
g.beginFill(c);
g.drawRect(0, 0, w, h);
g.endFill();
sp.addChild(g);
return rect;
}
private configConveyors() {
const conveyor0 = new Conveyor();
const conveyor1 = new Conveyor();
this.addChild(conveyor0);
this.addChild(conveyor1);
conveyor0.x = 0;
conveyor1.x = 764;
this.conveyors = new Conveyors(this);
this.conveyors.initData(conveyor0, conveyor1)
}
playAni() {
let idlerWheels = ['idler0', 'idler1', 'idler2', 'idler3', 'idler4', 'idler5', 'idler6'];
idlerWheels = idlerWheels.map(i => this.uiMap[i]);
idlerWheels.forEach(i => {
engine.Tween.get(i, { loop: true }).to({ rotation: -360 }, 1000);
})
}
stopAni() {
let idlerWheels = ['idler0', 'idler1', 'idler2', 'idler3', 'idler4', 'idler5', 'idler6'];
idlerWheels = idlerWheels.map(i => this.uiMap[i]);
idlerWheels.forEach(i => {
engine.Tween.removeTweens(i);
})
}
async start() {
console.log('on start')
this._timeCounter = 0;
if (!getGuideInfo()) {
await this.guide.startGuide();
setGuide();
}
this.conveyors.clear()
await this.countdown.startCountDown();
this.startGame();
engine.globalEvent.dispatchEvent('recycling-time-update', {
second: this.getSecond(),
});
this._timer = setInterval(() => {
this.onTimer();
}, 1000);
}
private startGame() {
this.playAni();
this.conveyors.startConveyors();
}
private stopGame() {
this.stopAni();
}
getSecond() {
return props.time - this._timeCounter
}
onTimer() {
this._timeCounter++;
engine.globalEvent.dispatchEvent('recycling-time-update', {
second: this.getSecond(),
});
if (this.getSecond() == 0) {
this.stop();
this.conveyors.timeout();
if (props.sound) playSound("gameOverMp3")
}
}
stop() {
clearInterval(this._timer);
this.stopGame();
}
setup() {
console.log('onSteup', props);
this.configUI();
}
onDown(e: engine.MouseEvent) {
}
stageOnUp(e) {
}
private onSuccess() {
}
onMove(e: engine.MouseEvent) {
}
}
/**
* Created by rockyl on 2020-01-09.
*/
import GameView from "./GameView";
import { injectProps } from "../props";
export class GameWrapper extends engine.Container {
updateSound(event: engine.Event) {
injectProps(event.data);
}
// private _status;
private _gameView: GameView;
constructor() {
super();
engine.globalEvent.addEventListener('recycling-start', this.start, this);
engine.globalEvent.addEventListener('recycling-sound-update', this.updateSound, this);
engine.globalEvent.addEventListener('recycling-stop', this.stop, this);
//创建实例
let gameView = this._gameView = new GameView();
this.addChild(gameView);
}
start(event: engine.Event) {
injectProps(event.data);
this._gameView.start();
}
stop(event: engine.Event) {
this._gameView.stop();
}
}
import { GarbageTypes } from './GarbageTypes';
export default class GarbageConfig {
public static config: any[] = [
{ name: "保鲜盒", source: "g00", type: GarbageTypes.recoverableWaste, width: 129, height: 111 },
{ name: "报纸", source: "g01", type: GarbageTypes.recoverableWaste, width: 138, height: 144 },
{ name: "贝壳", source: "g02", type: GarbageTypes.dryWaste, width: 79, height: 117 },
{ name: "冰箱", source: "g03", type: GarbageTypes.recoverableWaste, width: 63, height: 151 },
{ name: "菜梗菜叶", source: "g04", type: GarbageTypes.wetWaste, width: 144, height: 98 },
{ name: "残枝落叶", source: "g05", type: GarbageTypes.wetWaste, width: 120, height: 99 },
{ name: "茶叶渣", source: "g06", type: GarbageTypes.wetWaste, width: 86, height: 96 },
{ name: "尘土", source: "g07", type: GarbageTypes.dryWaste, width: 109, height: 114 },
{ name: "创口贴", source: "g08", type: GarbageTypes.dryWaste, width: 112, height: 90 },
{ name: "大骨头", source: "g09", type: GarbageTypes.dryWaste, width: 89, height: 101 },
{ name: "普通干电池", source: "g11", type: GarbageTypes.dryWaste, width: 89, height: 131 },
{ name: "方便面盒", source: "g12", type: GarbageTypes.dryWaste, width: 89, height: 168 },
{ name: "废弃食用油脂", source: "g13", type: GarbageTypes.wetWaste, width: 131, height: 164 },
{ name: "骨骼内脏", source: "g14", type: GarbageTypes.wetWaste, width: 104, height: 82 },
{ name: "锅具", source: "g15", type: GarbageTypes.recoverableWaste, width: 119, height: 149 },
{ name: "果核", source: "g16", type: GarbageTypes.wetWaste, width: 99, height: 95 },
{ name: "果皮", source: "g17", type: GarbageTypes.wetWaste, width: 115, height: 127 },
{ name: "化妆品", source: "g18", type: GarbageTypes.harmfulWaste, width: 67, height: 151 },
{ name: "鸡蛋壳", source: "g19", type: GarbageTypes.wetWaste, width: 99, height: 107 },
{ name: "剪刀", source: "g20", type: GarbageTypes.recoverableWaste, width: 96, height: 127 },
{ name: "胶带", source: "g21", type: GarbageTypes.dryWaste, width: 87, height: 113 },
{ name: "榴莲壳", source: "g22", type: GarbageTypes.dryWaste, width: 136, height: 116 },
{ name: "毛巾", source: "g23", type: GarbageTypes.recoverableWaste, width: 108, height: 96 },
{ name: "纽扣电池", source: "g24", type: GarbageTypes.harmfulWaste, width: 87, height: 89 },
{ name: "破旧陶瓷罐", source: "g25", type: GarbageTypes.dryWaste, width: 110, height: 125 },
{ name: "杀虫剂", source: "g26", type: GarbageTypes.harmfulWaste, width: 64, height: 160 },
{ name: "剩菜剩饭", source: "g27", type: GarbageTypes.wetWaste, width: 128, height: 96 },
{ name: "手机", source: "g28", type: GarbageTypes.recoverableWaste, width: 82, height: 142 },
{ name: "书本", source: "g29", type: GarbageTypes.recoverableWaste, width: 106, height: 132 },
{ name: "玻璃杯", source: "g30", type: GarbageTypes.recoverableWaste, width: 62, height: 119 },
{ name: "水银温度计", source: "g31", type: GarbageTypes.harmfulWaste, width: 109, height: 162 },
{ name: "水银血压计", source: "g32", type: GarbageTypes.harmfulWaste, width: 115, height: 147 },
{ name: "塑料桶", source: "g33", type: GarbageTypes.recoverableWaste, width: 92, height: 131 },
{ name: "卫生纸", source: "g34", type: GarbageTypes.dryWaste, width: 92, height: 132 },
{ name: "污染织物", source: "g35", type: GarbageTypes.dryWaste, width: 128, height: 139 },
{ name: "污染纸张", source: "g36", type: GarbageTypes.dryWaste, width: 96, height: 136 },
{ name: "洗衣机", source: "g37", type: GarbageTypes.recoverableWaste, width: 87, height: 157 },
{ name: "烟蒂", source: "g38", type: GarbageTypes.dryWaste, width: 87, height: 124 },
{ name: "药品", source: "g39", type: GarbageTypes.harmfulWaste, width: 109, height: 131 },
{ name: "药品包装", source: "g40", type: GarbageTypes.harmfulWaste, width: 108, height: 125 },
{ name: "椰子壳", source: "g41", type: GarbageTypes.dryWaste, width: 104, height: 119 },
{ name: "衣服", source: "g42", type: GarbageTypes.recoverableWaste, width: 83, height: 137 },
{ name: "衣架", source: "g43", type: GarbageTypes.recoverableWaste, width: 132, height: 125 },
{ name: "易拉罐", source: "g44", type: GarbageTypes.recoverableWaste, width: 65, height: 133 },
{ name: "荧光灯", source: "g45", type: GarbageTypes.harmfulWaste, width: 90, height: 118 },
{ name: "油漆桶", source: "g46", type: GarbageTypes.harmfulWaste, width: 65, height: 143 },
{ name: "一次性纸杯", source: "g47", type: GarbageTypes.dryWaste, width: 76, height: 116 },
{ name: "纸尿裤", source: "g48", type: GarbageTypes.dryWaste, width: 93, height: 138 },
{ name: "纸箱", source: "g49", type: GarbageTypes.recoverableWaste, width: 112, height: 118 },
{ name: "指甲油", source: "g50", type: GarbageTypes.harmfulWaste, width: 64, height: 138 },
];
}
export enum GarbageTypes {
recoverableWaste='recoverableWaste',
harmfulWaste='harmfulWaste',
wetWaste='wetWaste',
dryWaste='dryWaste'
}
import { GarbageTypes } from "./GarbageTypes"
export default (list: any[]) => {
let tmp = [];
const contains = (val) => {
for (const i of tmp) {
if (val.targetType == i.targetType && val.itemType == i.itemType && val.itemName == i.itemName)
return true;
}
return false;
}
list.forEach(i => {
if (!contains(i))
tmp.push(i)
})
list = tmp;
tmp = [];
const nameList = [];
const contains2 = (val) => {
for (const i of tmp) {
if (val.itemName == i.itemName) {
nameList.push(i.itemName);
return true;
}
}
return false;
}
list.forEach(i => {
if (!contains2(i))
tmp.push(i)
})
list = tmp;
list.forEach(i=>{
if(nameList.indexOf(i.itemName) !=-1) {
i.targetType=i.itemType
}
})
return list.map(i => {
return {
'targetName': getTargetName(i.targetType),
'isCorrect': i.targetType == i.itemType,
'itemName': i.itemName,
'itemTypeName':getTargetName(i.itemType)
}
})
}
const getTargetName = (type: GarbageTypes) => {
switch (type) {
case GarbageTypes.recoverableWaste:
return '可回收物'
break;
case GarbageTypes.harmfulWaste:
return '有害垃圾'
break;
case GarbageTypes.wetWaste:
return '湿垃圾'
break;
case GarbageTypes.dryWaste:
return '其他垃圾'
break;
default:
break;
}
}
\ No newline at end of file
/**
* Created by rockyl on 2020-02-03.
*/
import {Goods} from "./Goods";
import ObjectPool = engine.ObjectPool;
export const PoolName: string = 'goods';
ObjectPool.registerPool(PoolName, function () {
return new Goods();
}, function (item: Goods, data) {
item.reset();
});
import { props } from "../props";
const urls = [];
const picMap = {};
const posMap = {};
export default (parent, url, MAX_COL, MAX_ROW) => {
if (picMap[url]) {
const pics:any[] = picMap[url];
for (const pic of pics) {
parent.addChild(pic);
}
return [picMap[url], posMap[url]]
}
const W = props.W;
const H = props.H;
const GAP = props.GAP;
const spr = [];
const pos = []
for (let row = 0; row < MAX_ROW; row++) {
for (let col = 0; col < MAX_COL; col++) {
const child = engine.Sprite.fromImage(url);
spr.push(child);
child.scaleX = 1 / MAX_COL;
child.scaleY = 1 / MAX_ROW;
parent.addChild(child);
child.x = col * (W / MAX_COL + GAP);
child.y = row * (H / MAX_ROW + GAP);
pos.push([child.x, child.y]);
// child.texture.addEventListener('update', () => {
child.addEventListener(engine.Event.COMPLETE, () => {
const uvs = new Float32Array([
col / MAX_COL,
row / MAX_ROW,
(col + 1) / MAX_COL,
row / MAX_ROW,
(col + 1) / MAX_COL,
(row + 1) / MAX_ROW,
col / MAX_COL,
(row + 1) / MAX_ROW,
]);
child.uvs = uvs;
// spr.push(child);
});
}
}
picMap[url] = spr.concat([]);
posMap[url] = pos.concat([]);;
// console.log(spr);
return [spr, pos];
};
export default () => {
return [
{
id: 'playBg',
texture: 'playBg'
},
{
id: 'idler0',
texture: 'idlerWheel',
pos: [75, 1038],
anchor: [20, 21.5]
},
{
id: 'idler1',
texture: 'idlerWheel',
pos: [175, 1038],
anchor: [20, 21.5]
},
{
id: 'idler2',
texture: 'idlerWheel',
pos: [275, 1038],
anchor: [20, 21.5]
},
{
id: 'idler3',
texture: 'idlerWheel',
pos: [375, 1038],
anchor: [20, 21.5]
},
{
id: 'idler4',
texture: 'idlerWheel',
pos: [475, 1038],
anchor: [20, 21.5]
},
{
id: 'idler5',
texture: 'idlerWheel',
pos: [575, 1038],
anchor: [20, 21.5]
},
{
id: 'idler6',
texture: 'idlerWheel',
pos: [675, 1038],
anchor: [20, 21.5]
},
]
}
\ No newline at end of file
/**
* Created by rockyl on 2020-01-21.
*/
export function getTexture(uuid) {
return engine.Texture.from(getAssetByUUID(uuid).uuid);
}
export function getTextureByName(name) {
return getTexture(engine.getAssetByName(name).uuid);
}
export function playSound(name) {
engine.playSound(engine.getAssetByName(name).uuid, {keep: true});
}
export function createSvga(name, anchorName?) {
let inst = new svga.Svga();
inst.source = 'asset://' + engine.getAssetByName(name).uuid;
return inst;
}
export function getIndexFromRC(row,col,maxCol){
let index;
index = row * maxCol + col ;
return index
}
export function getRandomArray(array){
array.sort(function() {
return .5 - Math.random();
});
}
\ No newline at end of file
export default (view, rect: engine.Rectangle) => {
const { x, y } = view;
const { width, height } = view.texture
if (x > rect.x && y > rect.y && (x + width) < (rect.x + rect.width) && (y + height) < (rect.y + rect.height)) {
return true
}
return false;
}
export default () => {
//0 未引导
if (!window.localStorage) {
return 0
}
return localStorage.getItem('recyclingGuide')
}
export const setGuide = () => {
if (window.localStorage)
localStorage.setItem('recyclingGuide', '1')
}
\ No newline at end of file
export default (d:engine.DisplayObject)=>{
if(d && d.parent) {
d.parent.removeChild(d)
}
}
\ No newline at end of file
export default (e, arr)=> {
let index = arr.indexOf(e);
if (index >= 0) {
arr.splice(index, 1)
}
}
\ No newline at end of file
export default (arr): any =>{
let i = arr.length;
while (i) {
let j = Math.floor(Math.random() * i--); //5555
[arr[j], arr[i]] = [arr[i], arr[j]];
}
return arr;
}
\ No newline at end of file
import createBg from "./createBg";
import createImg from "./createImg";
import { props } from "../../props";
import { playSound } from "../utils";
export default class CountDownGroup extends engine.Sprite {
num1: engine.Sprite;
num2: engine.Sprite;
num3: engine.Sprite;
go: engine.Sprite;
constructor() {
super();
this.addChild(createBg(.6))
this.num1 = createImg('num1')
this.num2 = createImg('num2')
this.num3 = createImg('num3')
this.go = createImg('go')
this.go.anchorX = 240
this.go.anchorY = 171.5
this.num1.anchorX = 125.5
this.num1.anchorY = 189
this.num2.anchorX = 149.5
this.num2.anchorY = 191.5
this.num3.anchorX = 148.5
this.num3.anchorY = 191.5
this.go.x = 750 / 2 - 240
this.go.y = 525 - 171.5
this.num1.x = 750 / 2 - 125.5
this.num1.y = 529 - 189
this.num2.x = 750 / 2 - 149.5
this.num2.y = 526 - 191.5
this.num3.x = 750 / 2 - 148.5
this.num3.y = 525 - 191.5
this.addChild(this.num1)
this.addChild(this.num2)
this.addChild(this.num3)
this.addChild(this.go)
this.visible = false;
this.reset();
}
private reset() {
this.go.alpha = this.num1.alpha = this.num2.alpha = this.num3.alpha = 0;
this.go.scaleX = this.num1.scaleX = this.num2.scaleX = this.num3.scaleX = 3;
this.go.scaleY = this.num1.scaleY = this.num2.scaleY = this.num3.scaleY = 3;
}
async startCountDown() {
return new Promise((r) => {
this.reset();
this.visible = true;
this.num3.alpha = 1;
let n3 = engine.Tween.get(this.num3);
if (props.sound) {
playSound("numCountDown");
}
n3.to({ scaleX: 0.8, scaleY: 0.8 }, 200).to({ scaleX: 1, scaleY: 1 }, 100).wait(500).to({ scaleX: 0, scaleY: 0 }, 200).call(() => {
this.num2.alpha = 1;
let n2 = engine.Tween.get(this.num2);
if (props.sound) {
playSound("numCountDown");
}
n2.to({ scaleX: 0.8, scaleY: 0.8 }, 200).to({ scaleX: 1, scaleY: 1 }, 100).wait(500).to({ scaleX: 0, scaleY: 0 }, 200).call(() => {
this.num1.alpha = 1;
let n1 = engine.Tween.get(this.num1);
if (props.sound) {
playSound("numCountDown");
}
n1.to({ scaleX: 0.8, scaleY: 0.8 }, 200).to({ scaleX: 1, scaleY: 1 }, 100).wait(500).to({ scaleX: 0, scaleY: 0 }, 200).call(() => {
this.go.alpha = 1;
let go = engine.Tween.get(this.go);
if (props.sound) {
if (props.sound) playSound("goMp3");
}
go.to({ scaleX: 0.8, scaleY: 0.8 }, 200).to({ scaleX: 1, scaleY: 1 }, 100).wait(500).call(() => {
this.visible = false;
r()
})
})
})
})
})
}
}
\ No newline at end of file
import { getTextureByName, playSound } from "../utils";
import { props } from "../../props";
export default class RightTips extends engine.Sprite {
img: engine.Image;
txt: engine.TextField;
private SCORE = props.onceScore || 2;
constructor() {
super();
this.img = new engine.Image();
this.img.texture = getTextureByName('rightTips')
this.addChild(this.img);
this.img.anchorX = 88 / 2;
this.img.anchorY = 85 / 2;
this.visible = false;
this.txt = new engine.TextField();
this.addChild(this.txt)
this.txt.text = '+' + this.SCORE
this.txt.size = 60;
this.txt.fillColor = '#437726'
// this.txt.bold = true
engine.playSound
}
play(rect: engine.Rectangle) {
if (props.sound) {
playSound("rightTipsSound");
}
this.visible = true;
this.txt.x = 100;
engine.Tween.get(this.txt).set({ y: 60, alpha: 1 })
.to({ y: -50 }, 500)
.to({ alpha: 0 })
const DUR = 70;
engine.Tween.get(this.img).set({ x: 0, y: 0, scaleX: 0, scaleY: 0, alpha: 1 })
.to({ scaleX: 1, scaleY: 1 }, 200, engine.Ease.getBackOut(1))
.wait(200)
.to({ alpha: 0 }, 300)
this.x = rect.x + 180;
this.y = rect.y;
}
}
\ No newline at end of file
import { getTextureByName, playSound } from "../utils";
import { GarbageTypes } from "../datas/GarbageTypes";
import GameView from "../GameView";
import { props } from "../../props";
export default class WrongTips extends engine.Sprite {
img: engine.Image;
constructor() {
super();
this.img = new engine.Image();
this.img.texture = getTextureByName('wrongTips')//wrongTips
this.addChild(this.img);
this.img.anchorX = 88 / 2;
this.img.anchorY = 85 / 2;
this.visible = false;
}
play(rect: engine.Rectangle) {
this.visible = true;
if (props.sound) {
playSound("wrongTipsMp3");
}
const dur = 70;
const stren = 20;
engine.Tween.get(this.img).set({ x: 0, y: 0, scaleX: 1, scaleY: 1, alpha: 1 })
.to({ x: stren }, dur)
.to({ x: 0 }, dur)
.to({ x: -stren }, dur)
.to({ x: 0 }, dur)
.wait(200)
.to({ alpha: 0 }, 300)
this.x = rect.x + 180;
this.y = rect.y;
}
}
export const getTargetRect = (targetType, gameview: GameView) => {
switch (targetType) {
case GarbageTypes.dryWaste:
return gameview.dryWaste
break;
case GarbageTypes.wetWaste:
return gameview.wetWaste
break;
case GarbageTypes.harmfulWaste:
return gameview.harmfulWaste
break;
case GarbageTypes.recoverableWaste:
return gameview.recoverableWaste
break;
default:
break;
}
}
\ No newline at end of file
export default (a=1)=>{
const rect = new engine.Graphics();
rect.beginFill(0)
rect.drawRect(0,0,750,1624)
rect.endFill();
rect.alpha=a
return rect
}
\ No newline at end of file
import { getTextureByName } from "../utils";
export default (texture)=>{
return new engine.Sprite(getTextureByName(texture));
}
\ No newline at end of file
import createBg from "./createBg";
import createImg from "./createImg";
import { createSvga } from "../utils";
export default class GuideView extends engine.Sprite {
guideBg: engine.Sprite;
guideEle: engine.Sprite;
svga: svga.Svga;
constructor() {
super();
this.initUI();
this.visible = false;
}
initUI() {
this.addChild(createBg(.6))
this.guideBg = createImg('guideBg')
this.addChild(this.guideBg)
this.guideEle = createImg('guideEle')
this.addChild(this.guideEle)
this.guideBg.x = 393;
this.guideBg.y = 552;
this.guideEle.x = 361;
this.guideEle.y = 877;
this.guideEle.anchorX=14;
this.guideEle.anchorY=88;
this.guideEle.mouseEnabled = this.guideEle.mouseChildren = true;
let svga = createSvga("guideTips");
this.svga = svga
this.addChild(svga);
svga.gotoAndStop(1);
svga.mouseEnabled = svga.mouseChildren = false;
}
checkHit(x, y, w, h) {
const rect = new engine.Rectangle(393, 552, 281, 320)
if (x > rect.x && y > rect.y && (x + w) < (rect.x + rect.width) && (y + h) < (rect.y + rect.height)) {
return true
}
return false;
}
async startGuide() {
return new Promise((r) => {
this.visible = true;
this.svga.gotoAndStop(1);
this.svga.play(false, true)
this.guideEle.scaleX = 1;
this.guideEle.scaleY = 1;
let offset = [0, 0]
const guideOver = () => {
this.guideEle.removeEventListener(engine.MouseEvent.MOUSE_DOWN, ondown, this)
this.guideEle.anchorX=14;
this.guideEle.anchorY=44;
engine.Tween.get(this.guideEle).to({scaleX:0,scaleY:0},300).call(()=>{
this.visible = false;
r();
});
}
const onUp = (e: engine.MouseEvent) => {
this.stage.removeEventListener(engine.MouseEvent.MOUSE_MOVE, onMove, this)
if (this.checkHit(this.guideEle.x, this.guideEle.y, this.guideEle.width, this.guideEle.height)) {
guideOver();
} else {
this.svga.visible = true;
this.guideEle.x = 361;
this.guideEle.y = 877;
engine.Tween.get(this.guideEle).set({scaleX:0,scaleY:0}).to({scaleX:1,scaleY:1},300)
}
}
const onMove = (e: engine.MouseEvent) => {
this.guideEle.x = e.stageX - offset[0];
this.guideEle.y = e.stageY - offset[1];
}
const ondown = (e: engine.MouseEvent) => {
offset = [e.localX, e.localY]
this.svga.visible = false;
this.stage.once(engine.MouseEvent.MOUSE_UP, onUp, this)
this.stage.addEventListener(engine.MouseEvent.MOUSE_MOVE, onMove, this)
}
this.guideEle.addEventListener(engine.MouseEvent.MOUSE_DOWN, ondown, this)
})
}
}
\ No newline at end of file
/**
* Created by rockyl on 2019-11-20.
*/
import {GameWrapper} from "./game/GameWrapper";
import {injectProps, prepareProps} from "./props";
export default function (props) {
prepareProps();
injectProps(props);
let instance = new GameWrapper();
return instance;
}
/**
* Created by rockyl on 2020-01-21.
*/
export let props: any = {};
export function prepareProps() {
let metaProps = getProps();
engine.injectProp(props, metaProps);
}
export function injectProps(p) {
engine.injectProp(props, p);
}
......@@ -46,7 +46,7 @@ class RedPack extends engine.Image {
this.x = this._pos.x += speedX;
this.y = this._pos.y += speedY;
this.parent.localToGlobal(this._pos, this._globalPos);
this.wrapper.localToGlobal(this._pos, this._globalPos);
const {_globalPos: {x, y}} = this;
if (y < -height || y > this.stage.height) {
return true;
......
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