Commit 8b42bb0e authored by 王梦佳's avatar 王梦佳

娃娃机

parent d1566d32
File added
......@@ -102,11 +102,31 @@
"type": "number",
"default": 20
},
"leftLocX": {
"alias": "左边爪子X位置",
"type": "number",
"default": -15
},
"leftLocY": {
"alias": "左边爪子Y位置",
"type": "number",
"default": 60
},
"rightRotation": {
"alias": "右边爪子旋转角度",
"type": "number",
"default": -20
},
"rightLocX": {
"alias": "右边爪子X位置",
"type": "number",
"default": 98
},
"rightLocY": {
"alias": "右边爪子Y位置",
"type": "number",
"default": 60
},
"prizeBoxInitX": {
"alias": "中奖娃娃的x位置",
"type": "number",
......@@ -149,12 +169,6 @@
"uuid": "aa30ee7c-a6ad-4e10-9b6a-13b139664ab1",
"ext": ".png"
},
{
"name": "frontbox_4",
"url": "//yun.duiba.com.cn/aurora/assets/fde8c60981791e5136c7914274c2a2d0936626cd.png",
"uuid": "aa30ee7c-a6ad-4e10-9b6a-13b139664ab2",
"ext": ".png"
},
{
"name": "backbox_0",
"url": "//yun.duiba.com.cn/aurora/assets/94884eafc876346e283efef2aa29bd6d2c36f627.png",
......@@ -284,5 +298,5 @@
}
},
"id": "doll-machine2",
"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['doll-machine2'] = factory(global.tslib));\n}(this, (function (tslib) { 'use strict';\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\t//# sourceMappingURL=props.js.map\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\t//# sourceMappingURL=utils.js.map\n\n\tvar FrontBoxs = (function (_super) {\n\t tslib.__extends(FrontBoxs, _super);\n\t function FrontBoxs() {\n\t var _this = _super.call(this) || this;\n\t _this.frontBoxs = [];\n\t return _this;\n\t }\n\t FrontBoxs.prototype.setup = function () {\n\t var initX, initY = 0;\n\t for (var i = 0; i < +props.dollNum + 1; i++) {\n\t if (!new engine.Sprite(getTextureByName('frontbox_' + i))) {\n\t return;\n\t }\n\t this.frontBoxs[i] = new engine.Sprite(getTextureByName('frontbox_' + i));\n\t initX = this.frontBoxs[0].x = props.frontInitX;\n\t initY = this.frontBoxs[0].y = props.frontInitY;\n\t this.frontBoxs[i]['npcType'] = 'box' + i;\n\t }\n\t for (var i = 0; i < this.frontBoxs.length; i++) {\n\t if (i == 0) {\n\t this.frontBoxs[i].x = initX;\n\t }\n\t else {\n\t this.frontBoxs[i].x = this.frontBoxs[i - 1].x - this.frontBoxs[0].width - props.frontmargin;\n\t }\n\t console.log(this.frontBoxs[i].x);\n\t this.frontBoxs[i].y = initY;\n\t this.addChild(this.frontBoxs[i]);\n\t console.log('aaa', this.frontBoxs[i].x);\n\t }\n\t this.addEventListener(engine.Event.ENTER_FRAME, this.frameMove, this);\n\t };\n\t FrontBoxs.prototype.frameMove = function () {\n\t var _this = this;\n\t this.frontBoxs.forEach(function (item, index) {\n\t item.x += props.moveSpeed;\n\t if (item.x <= 0 && !item.visible) {\n\t item.visible = true;\n\t }\n\t if (item.x >= 750) {\n\t var lastitem = _this.frontBoxs.shift();\n\t lastitem.x = _this.frontBoxs[_this.frontBoxs.length - 1].x - _this.frontBoxs[0].width - props.frontmargin;\n\t if (!_this.GameView.getMoveX() && item.x <= 0 && _this.GameView.startstatus) {\n\t _this.GameView.setMoveX((370 - item.x - 13) / props.moveSpeed, item);\n\t _this.hideBox = item;\n\t }\n\t _this.frontBoxs.push(lastitem);\n\t }\n\t });\n\t };\n\t FrontBoxs.prototype.stop = function () {\n\t };\n\t FrontBoxs.prototype.showHidePrizeBox = function (isshow) {\n\t this.hideBox.visible = isshow;\n\t };\n\t return FrontBoxs;\n\t}(engine.Container));\n\n\tvar BackBoxs = (function (_super) {\n\t tslib.__extends(BackBoxs, _super);\n\t function BackBoxs() {\n\t var _this = _super.call(this) || this;\n\t _this.backBoxs = [];\n\t return _this;\n\t }\n\t BackBoxs.prototype.setup = function () {\n\t var initX, initY = 0;\n\t for (var i = 0; i < props.dollNum; i++) {\n\t this.backBoxs[i] = new engine.Sprite(getTextureByName('backbox_' + i));\n\t initX = this.backBoxs[0].x = props.backInitX;\n\t initY = this.backBoxs[0].y = props.backInitY - props.initOffsetTop;\n\t this.backBoxs[i]['npcType'] = 'box' + i;\n\t }\n\t this.backBoxs[props.dollNum] = new engine.Sprite(getTextureByName('backbox_0'));\n\t this.backBoxs[props.dollNum]['npcType'] = 'box' + props.dollNum;\n\t for (var i = 0; i < this.backBoxs.length; i++) {\n\t if (i == 0) {\n\t this.backBoxs[i].x = initX;\n\t }\n\t else {\n\t this.backBoxs[i].x = this.backBoxs[i - 1].x + this.backBoxs[i].width + props.backmargin;\n\t }\n\t this.backBoxs[i].y = initY;\n\t this.addChild(this.backBoxs[i]);\n\t }\n\t this.addEventListener(engine.Event.ENTER_FRAME, this.frameMove, this);\n\t };\n\t BackBoxs.prototype.frameMove = function () {\n\t var _this = this;\n\t this.backBoxs.forEach(function (item) {\n\t item.x -= props.moveSpeed;\n\t if (item.x <= 0) {\n\t var lastitem = _this.backBoxs.shift();\n\t lastitem.x = _this.backBoxs[_this.backBoxs.length - 1].x + item.width + props.backmargin;\n\t _this.backBoxs.push(lastitem);\n\t }\n\t });\n\t };\n\t return BackBoxs;\n\t}(engine.Container));\n\t//# sourceMappingURL=backBox.js.map\n\n\tvar Zhuazi = (function (_super) {\n\t tslib.__extends(Zhuazi, _super);\n\t function Zhuazi() {\n\t var _this = _super.call(this) || this;\n\t _this.moveArr = [];\n\t _this.prizeBoxs = [];\n\t return _this;\n\t }\n\t Zhuazi.prototype.setup = function () {\n\t this.ganNode = new engine.Container();\n\t this.moveNode = new engine.Container();\n\t this.ganNode.x = 280;\n\t this.ganNode.y = 350;\n\t this.bashouGan = new engine.Sprite(getTextureByName(\"把手杆子\"));\n\t this.bashouGan.x = 60;\n\t this.bashouGan.y = 12;\n\t this.bashou = new engine.Sprite(getTextureByName(\"把手\"));\n\t this.bashou.x = 0;\n\t this.bashou.y = 0;\n\t this.ganzi = new engine.Sprite(getTextureByName(\"伸缩杆\"));\n\t this.ganzi.x = 97;\n\t this.ganzi.y = 27;\n\t this.connect = new engine.Sprite(getTextureByName(\"连接点\"));\n\t this.connect.x = 18;\n\t this.connect.y = -5;\n\t this.left_zhuazi = new engine.Sprite(getTextureByName(\"左爪\"));\n\t this.left_zhuazi.x = -15;\n\t this.left_zhuazi.y = 60;\n\t this.left_zhuazi.anchorX = this.left_zhuazi.width;\n\t this.left_zhuazi.anchorY = 0;\n\t this.right_zhuazi = new engine.Sprite(getTextureByName(\"右爪\"));\n\t this.right_zhuazi.x = 98;\n\t this.right_zhuazi.y = 60;\n\t this.ganNode.addChild(this.left_zhuazi);\n\t this.ganNode.addChild(this.right_zhuazi);\n\t this.ganNode.addChild(this.connect);\n\t this.ganNode.x = 30;\n\t this.ganNode.y = this.ganNode.y - 263;\n\t this.zhuaziY = this.ganNode.y;\n\t this.moveNode.addChild(this.ganzi);\n\t this.moveNode.addChild(this.ganNode);\n\t this.moveNode.addChild(this.bashou);\n\t this.moveNode.x = 262;\n\t this.bashouGan.y = this.bashouGan.y;\n\t this.moveNode.y = this.moveNode.y;\n\t this.addChild(this.bashouGan);\n\t this.addChild(this.moveNode);\n\t if (!props.ganziShow) {\n\t this.bashouGan.visible = false;\n\t }\n\t if (!props.bashouShow) {\n\t this.bashou.visible = false;\n\t }\n\t this.createPrizeBox();\n\t };\n\t Zhuazi.prototype.createPrizeBox = function () {\n\t var _this = this;\n\t for (var i = 0; i < props.dollNum; i++) {\n\t if (!new engine.Sprite(getTextureByName('prizebox_' + i))) {\n\t return;\n\t }\n\t this.prizeBoxs[i] = new engine.Sprite(getTextureByName('prizebox_' + i));\n\t this.prizeBoxs[i]['npcType'] = 'box' + i;\n\t }\n\t this.prizeBoxs[props.dollNum] = new engine.Sprite(getTextureByName('prizebox_0'));\n\t this.prizeBoxs[props.dollNum]['npcType'] = 'box' + props.dollNum;\n\t this.prizeBoxs.forEach(function (item) {\n\t _this.ganNode.addChild(item);\n\t item.visible = false;\n\t item.x = props.prizeBoxInitX;\n\t item.y = props.prizeBoxInitY;\n\t });\n\t };\n\t Zhuazi.prototype.showPrizeBox = function () {\n\t var _this = this;\n\t this.prizeBoxs.forEach(function (item) {\n\t console.log(_this.GameView.getBox()['npcType']);\n\t if (item['npcType'] === _this.GameView.getBox()['npcType']) {\n\t item.visible = true;\n\t _this.itemShow = item;\n\t }\n\t else {\n\t item.visible = false;\n\t }\n\t });\n\t };\n\t Zhuazi.prototype.move = function () {\n\t var _this = this;\n\t var rndist = Math.random();\n\t var halfWidth = this.bashou.width / 2;\n\t var randomX = rndist * (rndist > 0.5 ? 1 : -1) * props.bashouMoveDist;\n\t console.log(randomX);\n\t engine.Tween.get(this.moveNode).to({ x: 370 + halfWidth - 71 }, 1000).call(function () {\n\t _this.zhangkai();\n\t });\n\t };\n\t Zhuazi.prototype.zhangkai = function () {\n\t var _this = this;\n\t this.left_zhuazi.anchorX = this.left_zhuazi.width;\n\t this.left_zhuazi.anchorY = 0;\n\t engine.Tween.get(this.left_zhuazi, { loop: false }).to({ rotation: props.leftRotation }, 1000);\n\t engine.Tween.get(this.right_zhuazi, { loop: false }).to({ rotation: props.rightRotation }, 1000);\n\t setTimeout(function () {\n\t _this.getLong();\n\t }, 500);\n\t };\n\t Zhuazi.prototype.getLong = function () {\n\t var _this = this;\n\t var droptime = Number((this.GameView.getMoveX() / 60 - 1).toFixed(2)) * 1000;\n\t console.log('dr', droptime);\n\t var times = (props.ganMoveEndY - this.ganzi.y) / this.ganzi.height;\n\t console.log(Number(times.toFixed(2)));\n\t engine.Tween.get(this.ganzi).to({ scaleY: Number(times.toFixed(2)) }, droptime).to({ scaleY: 1 }, droptime);\n\t console.log('node', this.zhuaziY);\n\t engine.Tween.get(this.ganNode).to({ y: props.ganMoveEndY }, droptime).call(function () {\n\t _this.GameView.stopMove();\n\t if (_this.GameView.ifPrize) {\n\t _this.showPrizeBox();\n\t _this.GameView.setVisible(false);\n\t }\n\t }).to({ y: this.zhuaziY }, droptime).call(function () {\n\t if (_this.GameView.ifPrize) {\n\t _this.itemShow.visible = false;\n\t }\n\t engine.globalEvent.dispatchEvent('doll-machine2-game-end');\n\t });\n\t };\n\t Zhuazi.prototype.getReset = function () {\n\t this.left_zhuazi.anchorX = this.left_zhuazi.width;\n\t this.left_zhuazi.anchorY = 0;\n\t engine.Tween.get(this.moveNode, { loop: false }).to({ x: 262 }, 1000);\n\t engine.Tween.get(this.left_zhuazi, { loop: false }).to({ rotation: 0 }, 1000);\n\t engine.Tween.get(this.right_zhuazi, { loop: false }).to({ rotation: 0 }, 1000);\n\t this.GameView.resetMoveX();\n\t };\n\t return Zhuazi;\n\t}(engine.Container));\n\t//# sourceMappingURL=Zhuazi.js.map\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.startstatus = true;\n\t _this.ifPrize = true;\n\t _this.goodsItems = [];\n\t _this.once(engine.Event.ADDED_TO_STAGE, _this.setup, _this);\n\t return _this;\n\t }\n\t GameView.prototype.setup = function () {\n\t var _this = this;\n\t if (this._hasSetup) {\n\t return;\n\t }\n\t this._hasSetup = true;\n\t var frontBoxs = (this._frontBoxs = new FrontBoxs());\n\t this._frontBoxs.GameView = this;\n\t var backBoxs = (this._backBoxs = new BackBoxs());\n\t this._Zhuazi = new Zhuazi();\n\t this._Zhuazi.GameView = this;\n\t this.frontTransfer = new engine.Container();\n\t this.backTransfer = new engine.Container();\n\t this.frontTransfer.width = 0;\n\t this.frontTransfer.height = 0;\n\t this.frontTransfer.alpha = 1;\n\t this.backTransfer.width = 0;\n\t this.backTransfer.height = 0;\n\t this.backTransfer.alpha = 1;\n\t this.rect = new engine.Rect();\n\t this.rect.width = props.gameStageWidth;\n\t this.rect.height = props.gameStageHeight;\n\t this.rect.x = 65;\n\t this.rect.y = 0;\n\t this.NpcBg = new engine.Container();\n\t this.NpcBg.x = 0;\n\t this.NpcBg.y = 0;\n\t this.addChild(this.NpcBg);\n\t this.addChild(this.rect);\n\t this.frontDesk = new engine.Sprite(getTextureByName(\"前传输带\"));\n\t this.frontDesk.x = props.initOffsetLeft;\n\t this.frontDesk.y = props.frontDeskY - props.initOffsetTop;\n\t this.backDesk = new engine.Sprite(getTextureByName(\"后传输带\"));\n\t this.backDesk.x = props.initOffsetLeft;\n\t this.backDesk.y = props.backDeskY - props.initOffsetTop;\n\t if (props.single) {\n\t this.backDesk.visible = false;\n\t }\n\t var pcarr = [this.backDesk, this.frontDesk, this.backTransfer, this.frontTransfer, this._Zhuazi];\n\t pcarr.forEach(function (item) {\n\t _this.NpcBg.addChild(item);\n\t });\n\t this.NpcBg.mask = this.rect;\n\t this._Zhuazi.setup();\n\t this.backTransfer.addChild(this._backBoxs);\n\t this._backBoxs.setup();\n\t if (props.single) {\n\t this.backTransfer.visible = false;\n\t }\n\t this.frontTransfer.addChild(this._frontBoxs);\n\t this._frontBoxs.setup();\n\t };\n\t GameView.prototype.stopMove = function () {\n\t this._frontBoxs.stop();\n\t };\n\t GameView.prototype.setMoveX = function (x, item) {\n\t this.moveTime = x;\n\t this.prizeBox = item;\n\t this._Zhuazi.move();\n\t };\n\t GameView.prototype.setVisible = function (isshow) {\n\t this._frontBoxs.showHidePrizeBox(isshow);\n\t };\n\t GameView.prototype.getMoveX = function () {\n\t return this.moveTime;\n\t };\n\t GameView.prototype.resetMoveX = function () {\n\t this.moveTime = null;\n\t };\n\t GameView.prototype.getBox = function () {\n\t return this.prizeBox;\n\t };\n\t GameView.prototype.reset = function () {\n\t this.startstatus = false;\n\t this.ifPrize = false;\n\t this._Zhuazi.getReset();\n\t };\n\t GameView.prototype.start = function (type) {\n\t if (type === void 0) { type = null; }\n\t this.speed = 1;\n\t this.gameIng = true;\n\t console.log('执行', type);\n\t this.startstatus = true;\n\t this.ifPrize = type && type.prize || false;\n\t };\n\t GameView.prototype.beginNpc = function () {\n\t var _this = this;\n\t this.timer = setTimeout(function () {\n\t if (_this.gameIng) ;\n\t }, 2000 / this.speed);\n\t };\n\t GameView.prototype.pause = function () {\n\t this.gameIng = false;\n\t };\n\t GameView.prototype.revive = function () {\n\t this.gameIng = true;\n\t };\n\t GameView.prototype.resume = function () {\n\t this.reset();\n\t this.start();\n\t };\n\t return GameView;\n\t}(engine.Container));\n\t//# sourceMappingURL=GameView.js.map\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('doll-machine2-game-init', _this.reset, _this);\n\t engine.globalEvent.addEventListener('doll-machine2-game-start', _this.start, _this);\n\t var gameView = _this._gameView = new GameView();\n\t _this.addChild(gameView);\n\t return _this;\n\t }\n\t GameWrapper.prototype.reset = function (event) {\n\t injectProps(event.data);\n\t this._gameView.visible = true;\n\t this._gameView.reset();\n\t };\n\t GameWrapper.prototype.start = function (event) {\n\t console.log('监听开始');\n\t injectProps(event.data);\n\t this._gameView.start(event.data);\n\t };\n\t GameWrapper.prototype.pause = function () {\n\t this._gameView.pause();\n\t };\n\t GameWrapper.prototype.resume = function () {\n\t this._gameView.resume();\n\t };\n\t GameWrapper.prototype.revive = function () {\n\t this._gameView.revive();\n\t };\n\t GameWrapper.prototype.clear = function () {\n\t this._gameView.visible = false;\n\t };\n\t GameWrapper.prototype.onTap = function (event) {\n\t };\n\t return GameWrapper;\n\t}(engine.Container));\n\t//# sourceMappingURL=GameWrapper.js.map\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\t//# sourceMappingURL=index.js.map\n\n\treturn index;\n\n})));\n"
"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['doll-machine2'] = factory(global.tslib));\n}(this, (function (tslib) { 'use strict';\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\t//# sourceMappingURL=props.js.map\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\t//# sourceMappingURL=utils.js.map\n\n\tvar FrontBoxs = (function (_super) {\n\t tslib.__extends(FrontBoxs, _super);\n\t function FrontBoxs() {\n\t var _this = _super.call(this) || this;\n\t _this.frontBoxs = [];\n\t return _this;\n\t }\n\t FrontBoxs.prototype.setup = function () {\n\t var initX, initY = 0;\n\t for (var i = 0; i < props.dollNum; i++) {\n\t if (!new engine.Sprite(getTextureByName('frontbox_' + i))) {\n\t return;\n\t }\n\t this.frontBoxs[i] = new engine.Sprite(getTextureByName('frontbox_' + i));\n\t initX = this.frontBoxs[0].x = props.frontInitX;\n\t initY = this.frontBoxs[0].y = props.frontInitY;\n\t this.frontBoxs[i]['npcType'] = 'box' + i;\n\t }\n\t this.frontBoxs[props.dollNum] = new engine.Sprite(getTextureByName('frontbox_0'));\n\t this.frontBoxs[props.dollNum]['npcType'] = 'box' + props.dollNum;\n\t console.log(this.frontBoxs);\n\t for (var i = 0; i < this.frontBoxs.length; i++) {\n\t if (i == 0) {\n\t this.frontBoxs[i].x = initX;\n\t }\n\t else {\n\t this.frontBoxs[i].x = this.frontBoxs[i - 1].x - this.frontBoxs[0].width - props.frontmargin;\n\t }\n\t console.log(this.frontBoxs[i].x);\n\t this.frontBoxs[i].y = initY;\n\t this.addChild(this.frontBoxs[i]);\n\t console.log('aaa', this.frontBoxs[i].x);\n\t }\n\t this.addEventListener(engine.Event.ENTER_FRAME, this.frameMove, this);\n\t };\n\t FrontBoxs.prototype.frameMove = function () {\n\t var _this = this;\n\t this.frontBoxs.forEach(function (item, index) {\n\t item.x += props.moveSpeed;\n\t if (item.x <= 0 && !item.visible) {\n\t item.visible = true;\n\t }\n\t if (item.x >= 750) {\n\t var tmpIndex = 0;\n\t if (index <= 0) {\n\t tmpIndex = _this.frontBoxs.length - 1;\n\t }\n\t else {\n\t tmpIndex = index - 1;\n\t }\n\t item.x = _this.frontBoxs[tmpIndex].x - _this.frontBoxs[0].width - props.frontmargin;\n\t if (!_this.GameView.getMoveX() && item.x <= 0 && _this.GameView.startstatus) {\n\t _this.GameView.setMoveX((370 - item.x - 13) / props.moveSpeed, item);\n\t _this.hideBox = item;\n\t }\n\t }\n\t });\n\t };\n\t FrontBoxs.prototype.stop = function () {\n\t };\n\t FrontBoxs.prototype.showHidePrizeBox = function (isshow) {\n\t this.hideBox.visible = isshow;\n\t };\n\t return FrontBoxs;\n\t}(engine.Container));\n\t//# sourceMappingURL=frontBox.js.map\n\n\tvar BackBoxs = (function (_super) {\n\t tslib.__extends(BackBoxs, _super);\n\t function BackBoxs() {\n\t var _this = _super.call(this) || this;\n\t _this.backBoxs = [];\n\t return _this;\n\t }\n\t BackBoxs.prototype.setup = function () {\n\t var initX, initY = 0;\n\t for (var i = 0; i < props.dollNum; i++) {\n\t this.backBoxs[i] = new engine.Sprite(getTextureByName('backbox_' + i));\n\t initX = this.backBoxs[0].x = props.backInitX;\n\t initY = this.backBoxs[0].y = props.backInitY - props.initOffsetTop;\n\t this.backBoxs[i]['npcType'] = 'box' + i;\n\t }\n\t this.backBoxs[props.dollNum] = new engine.Sprite(getTextureByName('backbox_0'));\n\t this.backBoxs[props.dollNum]['npcType'] = 'box' + props.dollNum;\n\t for (var i = 0; i < this.backBoxs.length; i++) {\n\t if (i == 0) {\n\t this.backBoxs[i].x = initX;\n\t }\n\t else {\n\t this.backBoxs[i].x = this.backBoxs[i - 1].x + this.backBoxs[i].width + props.backmargin;\n\t }\n\t this.backBoxs[i].y = initY;\n\t this.addChild(this.backBoxs[i]);\n\t }\n\t this.addEventListener(engine.Event.ENTER_FRAME, this.frameMove, this);\n\t };\n\t BackBoxs.prototype.frameMove = function () {\n\t var _this = this;\n\t this.backBoxs.forEach(function (item) {\n\t item.x -= props.moveSpeed;\n\t if (item.x <= 0) {\n\t var lastitem = _this.backBoxs.shift();\n\t lastitem.x = _this.backBoxs[_this.backBoxs.length - 1].x + item.width + props.backmargin;\n\t _this.backBoxs.push(lastitem);\n\t }\n\t });\n\t };\n\t return BackBoxs;\n\t}(engine.Container));\n\t//# sourceMappingURL=backBox.js.map\n\n\tvar Zhuazi = (function (_super) {\n\t tslib.__extends(Zhuazi, _super);\n\t function Zhuazi() {\n\t var _this = _super.call(this) || this;\n\t _this.moveArr = [];\n\t _this.prizeBoxs = [];\n\t return _this;\n\t }\n\t Zhuazi.prototype.setup = function () {\n\t this.ganNode = new engine.Container();\n\t this.moveNode = new engine.Container();\n\t this.ganNode.x = 280;\n\t this.ganNode.y = 350;\n\t this.bashouGan = new engine.Sprite(getTextureByName(\"把手杆子\"));\n\t this.bashouGan.x = 60;\n\t this.bashouGan.y = 12;\n\t this.bashou = new engine.Sprite(getTextureByName(\"把手\"));\n\t this.bashou.x = 0;\n\t this.bashou.y = 0;\n\t this.ganzi = new engine.Sprite(getTextureByName(\"伸缩杆\"));\n\t this.ganzi.x = 97;\n\t this.ganzi.y = 27;\n\t this.connect = new engine.Sprite(getTextureByName(\"连接点\"));\n\t this.connect.x = 18;\n\t this.connect.y = -5;\n\t this.left_zhuazi = new engine.Sprite(getTextureByName(\"左爪\"));\n\t this.left_zhuazi.x = props.leftLocX;\n\t this.left_zhuazi.y = props.leftLocY;\n\t this.left_zhuazi.anchorX = this.left_zhuazi.width;\n\t this.left_zhuazi.anchorY = 0;\n\t this.right_zhuazi = new engine.Sprite(getTextureByName(\"右爪\"));\n\t this.right_zhuazi.x = props.rightLocX;\n\t this.right_zhuazi.y = props.rightLocY;\n\t this.ganNode.addChild(this.left_zhuazi);\n\t this.ganNode.addChild(this.right_zhuazi);\n\t this.ganNode.addChild(this.connect);\n\t this.ganNode.x = 30;\n\t this.ganNode.y = this.ganNode.y - 263;\n\t this.zhuaziY = this.ganNode.y;\n\t this.moveNode.addChild(this.ganzi);\n\t this.moveNode.addChild(this.ganNode);\n\t this.moveNode.addChild(this.bashou);\n\t this.moveNode.x = 262;\n\t this.bashouGan.y = this.bashouGan.y;\n\t this.moveNode.y = this.moveNode.y;\n\t this.addChild(this.bashouGan);\n\t this.addChild(this.moveNode);\n\t if (!props.ganziShow) {\n\t this.bashouGan.visible = false;\n\t }\n\t if (!props.bashouShow) {\n\t this.bashou.visible = false;\n\t }\n\t this.createPrizeBox();\n\t };\n\t Zhuazi.prototype.createPrizeBox = function () {\n\t var _this = this;\n\t for (var i = 0; i < props.dollNum; i++) {\n\t if (!new engine.Sprite(getTextureByName('prizebox_' + i))) {\n\t return;\n\t }\n\t this.prizeBoxs[i] = new engine.Sprite(getTextureByName('prizebox_' + i));\n\t this.prizeBoxs[i]['npcType'] = 'box' + i;\n\t }\n\t this.prizeBoxs[props.dollNum] = new engine.Sprite(getTextureByName('prizebox_0'));\n\t this.prizeBoxs[props.dollNum]['npcType'] = 'box' + props.dollNum;\n\t this.prizeBoxs.forEach(function (item) {\n\t _this.ganNode.addChild(item);\n\t item.visible = false;\n\t item.x = props.prizeBoxInitX;\n\t item.y = props.prizeBoxInitY;\n\t });\n\t };\n\t Zhuazi.prototype.showPrizeBox = function () {\n\t var _this = this;\n\t this.prizeBoxs.forEach(function (item) {\n\t console.log(_this.GameView.getBox()['npcType']);\n\t if (item['npcType'] === _this.GameView.getBox()['npcType']) {\n\t item.visible = true;\n\t _this.itemShow = item;\n\t }\n\t else {\n\t item.visible = false;\n\t }\n\t });\n\t };\n\t Zhuazi.prototype.move = function () {\n\t var _this = this;\n\t var rndist = Math.random();\n\t var halfWidth = this.bashou.width / 2;\n\t var randomX = rndist * (rndist > 0.5 ? 1 : -1) * props.bashouMoveDist;\n\t console.log(randomX);\n\t engine.Tween.get(this.moveNode).to({ x: 370 + halfWidth - 71 }, 1000).call(function () {\n\t _this.zhangkai();\n\t });\n\t };\n\t Zhuazi.prototype.zhangkai = function () {\n\t var _this = this;\n\t this.left_zhuazi.anchorX = this.left_zhuazi.width;\n\t this.left_zhuazi.anchorY = 0;\n\t engine.Tween.get(this.left_zhuazi, { loop: false }).to({ rotation: props.leftRotation }, 1000);\n\t engine.Tween.get(this.right_zhuazi, { loop: false }).to({ rotation: props.rightRotation }, 1000);\n\t setTimeout(function () {\n\t _this.getLong();\n\t }, 500);\n\t };\n\t Zhuazi.prototype.getLong = function () {\n\t var _this = this;\n\t var droptime = Number((this.GameView.getMoveX() / 60 - 1).toFixed(2)) * 1000 - 130;\n\t console.log('dr', droptime);\n\t var times = (props.ganMoveEndY - this.ganzi.y) / this.ganzi.height;\n\t console.log(Number(times.toFixed(2)));\n\t engine.Tween.get(this.ganzi).to({ scaleY: Number(times.toFixed(2)) }, droptime).to({ scaleY: 1 }, droptime);\n\t console.log('node', this.zhuaziY);\n\t engine.Tween.get(this.ganNode).to({ y: props.ganMoveEndY }, droptime).call(function () {\n\t _this.GameView.stopMove();\n\t if (_this.GameView.ifPrize) {\n\t _this.showPrizeBox();\n\t _this.GameView.setVisible(false);\n\t }\n\t }).to({ y: this.zhuaziY }, droptime).call(function () {\n\t if (_this.GameView.ifPrize) {\n\t _this.itemShow.visible = false;\n\t }\n\t engine.globalEvent.dispatchEvent('doll-machine2-game-end');\n\t });\n\t };\n\t Zhuazi.prototype.getReset = function () {\n\t this.left_zhuazi.anchorX = this.left_zhuazi.width;\n\t this.left_zhuazi.anchorY = 0;\n\t engine.Tween.get(this.moveNode, { loop: false }).to({ x: 262 }, 1000);\n\t engine.Tween.get(this.left_zhuazi, { loop: false }).to({ rotation: 0 }, 1000);\n\t engine.Tween.get(this.right_zhuazi, { loop: false }).to({ rotation: 0 }, 1000);\n\t this.GameView.resetMoveX();\n\t };\n\t return Zhuazi;\n\t}(engine.Container));\n\t//# sourceMappingURL=Zhuazi.js.map\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.startstatus = false;\n\t _this.ifPrize = false;\n\t _this.goodsItems = [];\n\t _this.once(engine.Event.ADDED_TO_STAGE, _this.setup, _this);\n\t return _this;\n\t }\n\t GameView.prototype.setup = function () {\n\t var _this = this;\n\t if (this._hasSetup) {\n\t return;\n\t }\n\t this._hasSetup = true;\n\t var frontBoxs = (this._frontBoxs = new FrontBoxs());\n\t this._frontBoxs.GameView = this;\n\t var backBoxs = (this._backBoxs = new BackBoxs());\n\t this._Zhuazi = new Zhuazi();\n\t this._Zhuazi.GameView = this;\n\t this.frontTransfer = new engine.Container();\n\t this.backTransfer = new engine.Container();\n\t this.frontTransfer.width = 0;\n\t this.frontTransfer.height = 0;\n\t this.frontTransfer.alpha = 1;\n\t this.backTransfer.width = 0;\n\t this.backTransfer.height = 0;\n\t this.backTransfer.alpha = 1;\n\t this.rect = new engine.Rect();\n\t this.rect.width = props.gameStageWidth;\n\t this.rect.height = props.gameStageHeight;\n\t this.rect.x = 65;\n\t this.rect.y = 0;\n\t this.NpcBg = new engine.Container();\n\t this.NpcBg.x = 0;\n\t this.NpcBg.y = 0;\n\t this.addChild(this.NpcBg);\n\t this.addChild(this.rect);\n\t this.frontDesk = new engine.Sprite(getTextureByName(\"前传输带\"));\n\t this.frontDesk.x = props.initOffsetLeft;\n\t this.frontDesk.y = props.frontDeskY - props.initOffsetTop;\n\t this.backDesk = new engine.Sprite(getTextureByName(\"后传输带\"));\n\t this.backDesk.x = props.initOffsetLeft;\n\t this.backDesk.y = props.backDeskY - props.initOffsetTop;\n\t if (props.single) {\n\t this.backDesk.visible = false;\n\t }\n\t var pcarr = [this.backDesk, this.frontDesk, this.backTransfer, this.frontTransfer, this._Zhuazi];\n\t pcarr.forEach(function (item) {\n\t _this.NpcBg.addChild(item);\n\t });\n\t this.NpcBg.mask = this.rect;\n\t this._Zhuazi.setup();\n\t this.backTransfer.addChild(this._backBoxs);\n\t this._backBoxs.setup();\n\t if (props.single) {\n\t this.backTransfer.visible = false;\n\t }\n\t this.frontTransfer.addChild(this._frontBoxs);\n\t this._frontBoxs.setup();\n\t };\n\t GameView.prototype.stopMove = function () {\n\t this._frontBoxs.stop();\n\t };\n\t GameView.prototype.setMoveX = function (x, item) {\n\t this.moveTime = x;\n\t this.prizeBox = item;\n\t this._Zhuazi.move();\n\t };\n\t GameView.prototype.setVisible = function (isshow) {\n\t this._frontBoxs.showHidePrizeBox(isshow);\n\t };\n\t GameView.prototype.getMoveX = function () {\n\t return this.moveTime;\n\t };\n\t GameView.prototype.resetMoveX = function () {\n\t this.moveTime = null;\n\t };\n\t GameView.prototype.getBox = function () {\n\t return this.prizeBox;\n\t };\n\t GameView.prototype.reset = function () {\n\t this.startstatus = false;\n\t this.ifPrize = false;\n\t this._Zhuazi.getReset();\n\t };\n\t GameView.prototype.start = function (type) {\n\t if (type === void 0) { type = null; }\n\t this.speed = 1;\n\t this.gameIng = true;\n\t console.log('执行', type);\n\t this.startstatus = true;\n\t this.ifPrize = type && type.prize || false;\n\t };\n\t GameView.prototype.beginNpc = function () {\n\t var _this = this;\n\t this.timer = setTimeout(function () {\n\t if (_this.gameIng) ;\n\t }, 2000 / this.speed);\n\t };\n\t GameView.prototype.pause = function () {\n\t this.gameIng = false;\n\t };\n\t GameView.prototype.revive = function () {\n\t this.gameIng = true;\n\t };\n\t GameView.prototype.resume = function () {\n\t this.reset();\n\t this.start();\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('doll-machine2-game-init', _this.reset, _this);\n\t engine.globalEvent.addEventListener('doll-machine2-game-start', _this.start, _this);\n\t var gameView = _this._gameView = new GameView();\n\t _this.addChild(gameView);\n\t return _this;\n\t }\n\t GameWrapper.prototype.reset = function (event) {\n\t injectProps(event.data);\n\t this._gameView.visible = true;\n\t this._gameView.reset();\n\t };\n\t GameWrapper.prototype.start = function (event) {\n\t console.log('监听开始');\n\t injectProps(event.data);\n\t this._gameView.start(event.data);\n\t };\n\t GameWrapper.prototype.pause = function () {\n\t this._gameView.pause();\n\t };\n\t GameWrapper.prototype.resume = function () {\n\t this._gameView.resume();\n\t };\n\t GameWrapper.prototype.revive = function () {\n\t this._gameView.revive();\n\t };\n\t GameWrapper.prototype.clear = function () {\n\t this._gameView.visible = false;\n\t };\n\t GameWrapper.prototype.onTap = function (event) {\n\t };\n\t return GameWrapper;\n\t}(engine.Container));\n\t//# sourceMappingURL=GameWrapper.js.map\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\t//# sourceMappingURL=index.js.map\n\n\treturn index;\n\n})));\n"
}
......@@ -31,7 +31,7 @@
}
FrontBoxs.prototype.setup = function () {
var initX, initY = 0;
for (var i = 0; i < +props.dollNum + 1; i++) {
for (var i = 0; i < props.dollNum; i++) {
if (!new engine.Sprite(getTextureByName('frontbox_' + i))) {
return;
}
......@@ -40,6 +40,9 @@
initY = this.frontBoxs[0].y = props.frontInitY;
this.frontBoxs[i]['npcType'] = 'box' + i;
}
this.frontBoxs[props.dollNum] = new engine.Sprite(getTextureByName('frontbox_0'));
this.frontBoxs[props.dollNum]['npcType'] = 'box' + props.dollNum;
console.log(this.frontBoxs);
for (var i = 0; i < this.frontBoxs.length; i++) {
if (i == 0) {
this.frontBoxs[i].x = initX;
......@@ -62,13 +65,18 @@
item.visible = true;
}
if (item.x >= 750) {
var lastitem = _this.frontBoxs.shift();
lastitem.x = _this.frontBoxs[_this.frontBoxs.length - 1].x - _this.frontBoxs[0].width - props.frontmargin;
var tmpIndex = 0;
if (index <= 0) {
tmpIndex = _this.frontBoxs.length - 1;
}
else {
tmpIndex = index - 1;
}
item.x = _this.frontBoxs[tmpIndex].x - _this.frontBoxs[0].width - props.frontmargin;
if (!_this.GameView.getMoveX() && item.x <= 0 && _this.GameView.startstatus) {
_this.GameView.setMoveX((370 - item.x - 13) / props.moveSpeed, item);
_this.hideBox = item;
}
_this.frontBoxs.push(lastitem);
}
});
};
......@@ -79,6 +87,7 @@
};
return FrontBoxs;
}(engine.Container));
//# sourceMappingURL=frontBox.js.map
var BackBoxs = (function (_super) {
tslib.__extends(BackBoxs, _super);
......@@ -150,13 +159,13 @@
this.connect.x = 18;
this.connect.y = -5;
this.left_zhuazi = new engine.Sprite(getTextureByName("左爪"));
this.left_zhuazi.x = -15;
this.left_zhuazi.y = 60;
this.left_zhuazi.x = props.leftLocX;
this.left_zhuazi.y = props.leftLocY;
this.left_zhuazi.anchorX = this.left_zhuazi.width;
this.left_zhuazi.anchorY = 0;
this.right_zhuazi = new engine.Sprite(getTextureByName("右爪"));
this.right_zhuazi.x = 98;
this.right_zhuazi.y = 60;
this.right_zhuazi.x = props.rightLocX;
this.right_zhuazi.y = props.rightLocY;
this.ganNode.addChild(this.left_zhuazi);
this.ganNode.addChild(this.right_zhuazi);
this.ganNode.addChild(this.connect);
......@@ -232,7 +241,7 @@
};
Zhuazi.prototype.getLong = function () {
var _this = this;
var droptime = Number((this.GameView.getMoveX() / 60 - 1).toFixed(2)) * 1000;
var droptime = Number((this.GameView.getMoveX() / 60 - 1).toFixed(2)) * 1000 - 130;
console.log('dr', droptime);
var times = (props.ganMoveEndY - this.ganzi.y) / this.ganzi.height;
console.log(Number(times.toFixed(2)));
......@@ -267,8 +276,8 @@
tslib.__extends(GameView, _super);
function GameView() {
var _this = _super.call(this) || this;
_this.startstatus = true;
_this.ifPrize = true;
_this.startstatus = false;
_this.ifPrize = false;
_this.goodsItems = [];
_this.once(engine.Event.ADDED_TO_STAGE, _this.setup, _this);
return _this;
......@@ -376,7 +385,6 @@
};
return GameView;
}(engine.Container));
//# sourceMappingURL=GameView.js.map
var GameWrapper = (function (_super) {
tslib.__extends(GameWrapper, _super);
......
{"version":3,"file":"index.js","sources":["src/custom/doll-machine2/src/props.ts","src/custom/doll-machine2/src/game/utils.ts","src/custom/doll-machine2/src/game/frontBox.ts","src/custom/doll-machine2/src/game/backBox.ts","src/custom/doll-machine2/src/game/Zhuazi.ts","src/custom/doll-machine2/src/game/GameView.ts","src/custom/doll-machine2/src/game/GameWrapper.ts","src/custom/doll-machine2/src/index.ts"],"sourcesContent":["/**\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","/**\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}","import { getTextureByName } from \"./utils\";\nimport GameView from './GameView';\nimport { props } from \"../props\";\nexport class FrontBoxs extends engine.Container {\n //盒子1\n private box1: engine.Container;\n //盒子2\n private box2: engine.Container;\n //盒子3 \n private box3: engine.Container;\n //盒子4\n private box4: engine.Container;\n //盒子5\n private box5: engine.Container;\n // 需隐藏的盒子\n private hideBox: engine.Container;\n private frontBoxs=[];\n public GameView: GameView;\n constructor() {\n super();\n }\n setup() {\n let initX , initY = 0;\n for(let i = 0; i < +props.dollNum+1; i++) {\n if (!new engine.Sprite(getTextureByName('frontbox_' + i))) {\n return;\n }\n this.frontBoxs[i] = new engine.Sprite(getTextureByName('frontbox_'+i));\n initX = this.frontBoxs[0].x = props.frontInitX;\n initY = this.frontBoxs[0].y = props.frontInitY;\n this.frontBoxs[i]['npcType'] = 'box'+i;\n }\n // this.frontBoxs[props.dollNum] = new engine.Sprite(getTextureByName('frontbox_0'));\n // this.frontBoxs[props.dollNum]['npcType'] = 'box' + props.dollNum;\n \n for(let i = 0; i < this.frontBoxs.length; i++) {\n if(i == 0) {\n this.frontBoxs[i].x = initX ;\n } else {\n this.frontBoxs[i].x = this.frontBoxs[i - 1].x - this.frontBoxs[0].width - props.frontmargin;\n }\n console.log(this.frontBoxs[i].x);\n this.frontBoxs[i].y = initY;\n this.addChild(this.frontBoxs[i]);\n console.log('aaa', this.frontBoxs[i].x);\n }\n // console.log(this.frontBoxs);\n this.addEventListener(engine.Event.ENTER_FRAME, this.frameMove, this);\n }\n frameMove() {\n this.frontBoxs.forEach((item, index) => {\n item.x += props.moveSpeed;\n if(item.x <=0 && !item.visible) {\n item.visible = true;\n }\n if(item.x >= 750) {\n let lastitem = this.frontBoxs.shift();\n lastitem.x = this.frontBoxs[this.frontBoxs.length - 1].x - this.frontBoxs[0].width - props.frontmargin;\n \n if (!this.GameView.getMoveX() && item.x <= 0 && this.GameView.startstatus) {\n this.GameView.setMoveX((370 - item.x - 13) / props.moveSpeed, item);\n this.hideBox = item;\n }\n this.frontBoxs.push(lastitem);\n }\n })\n }\n stop() {\n // this.removeEventListener(engine.Event.ENTER_FRAME, this.frameMove, this);\n }\n showHidePrizeBox(isshow) {\n this.hideBox.visible = isshow\n }\n}","import { getTextureByName } from \"./utils\";\nimport { props } from \"../props\";\nexport class BackBoxs extends engine.Container {\n private backBoxs=[];\n constructor() {\n super();\n }\n setup() {\n let initX , initY = 0;\n for (let i = 0; i < props.dollNum; i++) {\n this.backBoxs[i] = new engine.Sprite(getTextureByName('backbox_' + i));\n initX = this.backBoxs[0].x = props.backInitX;\n initY = this.backBoxs[0].y = props.backInitY - props.initOffsetTop;\n this.backBoxs[i]['npcType'] = 'box' + i;\n }\n this.backBoxs[props.dollNum] = new engine.Sprite(getTextureByName('backbox_0'));\n this.backBoxs[props.dollNum]['npcType'] = 'box' + props.dollNum;\n for (let i = 0; i < this.backBoxs.length; i++) {\n if(i == 0) {\n this.backBoxs[i].x = initX;\n } else {\n this.backBoxs[i].x = this.backBoxs[i - 1].x + this.backBoxs[i].width + props.backmargin;\n }\n this.backBoxs[i].y = initY;\n \n this.addChild(this.backBoxs[i]);\n }\n this.addEventListener(engine.Event.ENTER_FRAME, this.frameMove, this);\n }\n frameMove() {\n this.backBoxs.forEach((item) => {\n item.x -= props.moveSpeed;\n if (item.x <= 0) {\n let lastitem = this.backBoxs.shift();\n lastitem.x = this.backBoxs[this.backBoxs.length - 1].x + item.width + props.backmargin;\n this.backBoxs.push(lastitem);\n }\n })\n }\n}","import { getTextureByName } from \"./utils\";\nimport { props } from \"../props\";\nimport GameView from './GameView';\nexport class Zhuazi extends engine.Container {\n private bashouGan: engine.Sprite;\n private bashou: engine.Sprite;\n private ganzi: engine.Sprite;\n private left_zhuazi: engine.Sprite;\n private right_zhuazi: engine.Sprite;\n private connect: engine.Sprite;\n private ganNode: engine.Container;\n private moveNode: engine.Container;\n private moveArr = [];\n private zhuaziY;\n private itemShow: engine.Container;\n private prizeBoxs = [];\n public GameView: GameView;\n constructor() {\n super();\n }\n setup() {\n this.ganNode = new engine.Container();\n this.moveNode = new engine.Container();\n this.ganNode.x = 280;\n this.ganNode.y = 350;\n this.bashouGan = new engine.Sprite(getTextureByName(\"把手杆子\"));\n this.bashouGan.x = 60;\n this.bashouGan.y = 12;\n this.bashou = new engine.Sprite(getTextureByName(\"把手\"));\n this.bashou.x = 0;\n this.bashou.y = 0;\n this.ganzi = new engine.Sprite(getTextureByName(\"伸缩杆\"));\n this.ganzi.x = 97;\n this.ganzi.y = 27;\n this.connect = new engine.Sprite(getTextureByName(\"连接点\"));\n this.connect.x = 18;\n this.connect.y = -5;\n this.left_zhuazi = new engine.Sprite(getTextureByName(\"左爪\"));\n this.left_zhuazi.x = -15;\n this.left_zhuazi.y = 60;\n this.left_zhuazi.anchorX = this.left_zhuazi.width;\n this.left_zhuazi.anchorY = 0;\n this.right_zhuazi = new engine.Sprite(getTextureByName(\"右爪\"));\n this.right_zhuazi.x = 98;\n this.right_zhuazi.y = 60;\n this.ganNode.addChild(this.left_zhuazi);\n this.ganNode.addChild(this.right_zhuazi);\n this.ganNode.addChild(this.connect);\n this.ganNode.x = 30;\n this.ganNode.y = this.ganNode.y - 263;\n this.zhuaziY = this.ganNode.y;\n this.moveNode.addChild(this.ganzi);\n this.moveNode.addChild(this.ganNode);\n this.moveNode.addChild(this.bashou);\n this.moveNode.x = 262;\n this.bashouGan.y = this.bashouGan.y;\n this.moveNode.y = this.moveNode.y;\n this.addChild(this.bashouGan);\n this.addChild(this.moveNode);\n if (!props.ganziShow) {\n this.bashouGan.visible = false;\n }\n if (!props.bashouShow) {\n this.bashou.visible = false;\n }\n this.createPrizeBox();\n \n }\n createPrizeBox() {\n for (let i = 0; i < props.dollNum; i++) {\n if (!new engine.Sprite(getTextureByName('prizebox_' + i))) {\n return;\n }\n this.prizeBoxs[i] = new engine.Sprite(getTextureByName('prizebox_' + i));\n this.prizeBoxs[i]['npcType'] = 'box' + i;\n }\n this.prizeBoxs[props.dollNum] = new engine.Sprite(getTextureByName('prizebox_0'));\n this.prizeBoxs[props.dollNum]['npcType'] = 'box' + props.dollNum;\n\n this.prizeBoxs.forEach(item => {\n this.ganNode.addChild(item);\n item.visible = false;\n item.x = props.prizeBoxInitX;\n item.y = props.prizeBoxInitY;\n })\n }\n showPrizeBox() {\n this.prizeBoxs.forEach(item => {\n console.log(this.GameView.getBox()['npcType']);\n if (item['npcType'] === this.GameView.getBox()['npcType']) {\n item.visible = true;\n this.itemShow = item;\n } else {\n item.visible = false;\n }\n })\n \n }\n move() {\n let rndist = Math.random();\n let halfWidth = this.bashou.width / 2;\n let randomX = rndist * (rndist > 0.5 ? 1 : -1) * props.bashouMoveDist;\n console.log(randomX);\n engine.Tween.get(this.moveNode).to({ x: 370 + halfWidth - 71}, 1000).call(() => {\n this.zhangkai();\n });\n }\n zhangkai() {\n this.left_zhuazi.anchorX = this.left_zhuazi.width;\n this.left_zhuazi.anchorY = 0;\n engine.Tween.get(this.left_zhuazi, { loop: false }).to({ rotation: props.leftRotation}, 1000);\n engine.Tween.get(this.right_zhuazi, { loop: false }).to({ rotation: props.rightRotation }, 1000);\n setTimeout(() => {\n this.getLong();\n }, 500);\n }\n getLong() {\n let droptime = Number((this.GameView.getMoveX() / 60 - 1).toFixed(2)) * 1000;\n console.log('dr', droptime);\n let times = (props.ganMoveEndY - this.ganzi.y ) / this.ganzi.height;\n console.log(Number(times.toFixed(2)) );\n engine.Tween.get(this.ganzi).to({ scaleY: Number(times.toFixed(2)) }, droptime).to({ scaleY: 1 }, droptime)\n console.log('node', this.zhuaziY);\n engine.Tween.get(this.ganNode).to({ y: props.ganMoveEndY }, droptime).call(() => {\n this.GameView.stopMove();\n if (this.GameView.ifPrize) {\n this.showPrizeBox();\n this.GameView.setVisible(false);\n }\n }).to({ y: this.zhuaziY }, droptime).call(() => {\n // this.getReset();\n if (this.GameView.ifPrize) {\n this.itemShow.visible = false;\n }\n engine.globalEvent.dispatchEvent('doll-machine2-game-end');\n })\n }\n getReset() {\n // if (this.GameView.ifPrize) {\n // this.itemShow.visible = false;\n // }\n this.left_zhuazi.anchorX = this.left_zhuazi.width;\n this.left_zhuazi.anchorY = 0;\n engine.Tween.get(this.moveNode, {loop: false}).to({x: 262}, 1000);\n engine.Tween.get(this.left_zhuazi, { loop: false }).to({ rotation: 0 }, 1000);\n engine.Tween.get(this.right_zhuazi, { loop: false }).to({ rotation: 0 }, 1000);\n this.GameView.resetMoveX();\n }\n}","/**\n * Created by rockyl on 2018/8/16.\n */\n\nimport { props } from \"../props\";\nimport { playSound, createSvga } from \"./utils\";\nimport ObjectPool = engine.ObjectPool;\nimport { getTextureByName } from \"./utils\";\nimport { Goods } from \"./Goods\";\nimport { PoolName } from \"./object-pool-init\";\nimport { FrontBoxs } from \"./frontBox\";\nimport { BackBoxs } from \"./backBox\";\nimport { Zhuazi } from './Zhuazi';\n\nexport default class GameView extends engine.Container {\n private _hasSetup;\n\n //触摸层\n private rectBg: engine.Rect;\n //npc层\n private NpcBg: engine.Container;\n //盒子1\n private box1: engine.Container;\n //盒子2\n private box2: engine.Container;\n //盒子3\n private box3: engine.Container;\n //盒子4\n private box4: engine.Container;\n //盒子5\n private box5: engine.Container;\n //前传输区域\n private frontTransfer: engine.Container;\n //后传输区域\n private backTransfer: engine.Container;\n //前台板\n private frontDesk: engine.Sprite;\n //后台板\n private backDesk: engine.Sprite;\n private _frontBoxs: FrontBoxs;\n\tprivate _backBoxs: BackBoxs;\n\tprivate _Zhuazi: Zhuazi;\n\tprivate prizeBox: engine.Container;\n\tprivate rect;\n //当前分数\n\tprivate score;\n\t\n\t//中奖盒子移动距离\n\tprivate moveTime;\n\n //游戏状态\n private gameIng;\n //是否已获取位移值\n public startstatus=true;\n //是否中奖\n public ifPrize=true;\n //npc出身计时器\n private timer;\n //倒计时计时器\n private countdownTimer: any;\n //倒计时\n private countdown: number;\n\n //当前速度\n private speed: number;\n\n // 当前场景上面的物品\n private goodsItems = [];\n\n private _goods: Goods;\n\n constructor() {\n super();\n this.once(engine.Event.ADDED_TO_STAGE, this.setup, this);\n }\n\n // private waterSvga;\n // private boomSvga;\n // private playerSvga;\n\n setup() {\n if (this._hasSetup) {\n return;\n }\n\n this._hasSetup = true;\n\t\tconst frontBoxs = (this._frontBoxs = new FrontBoxs());\n\t\tthis._frontBoxs.GameView = this;\n\t\tconst backBoxs = (this._backBoxs = new BackBoxs());\n\t\tthis._Zhuazi = new Zhuazi();\n\t\tthis._Zhuazi.GameView = this;\n this.frontTransfer = new engine.Container();\n this.backTransfer = new engine.Container();\n this.frontTransfer.width = 0;\n this.frontTransfer.height = 0;\n this.frontTransfer.alpha = 1;\n // this.frontTransfer.x = 0;\n // this.frontTransfer.y = 434;\n\n this.backTransfer.width = 0;\n this.backTransfer.height = 0;\n this.backTransfer.alpha = 1;\n // this.backTransfer.x = 0;\n // this.backTransfer.y = 390;\n\t\tthis.rect = new engine.Rect();\n this.rect.width = props.gameStageWidth;\n this.rect.height = props.gameStageHeight;\n\t\tthis.rect.x = 65;\n this.rect.y = 0;\n this.NpcBg = new engine.Container();\n this.NpcBg.x = 0;\n this.NpcBg.y = 0;\n\t\tthis.addChild(this.NpcBg);\n\t\tthis.addChild(this.rect);\n\t\t\n\t\t\n\t\t\n\t\t// let gameBg = new engine.Sprite(getTextureByName(\"游戏背景\"));\n\t\t// gameBg.x = 65;\n\t\t// gameBg.y = 263;\n\t\t// this.NpcBg.addChild(gameBg);\n\t\t\n this.frontDesk = new engine.Sprite(getTextureByName(\"前传输带\"));\n this.frontDesk.x = props.initOffsetLeft;\n this.frontDesk.y = props.frontDeskY - props.initOffsetTop;\n\n this.backDesk = new engine.Sprite(getTextureByName(\"后传输带\"));\n this.backDesk.x = props.initOffsetLeft;\n this.backDesk.y = props.backDeskY - props.initOffsetTop;\n if(props.single) {\n this.backDesk.visible = false;\n }\n let pcarr = [this.backDesk, this.frontDesk, this.backTransfer, this.frontTransfer, this._Zhuazi];\n pcarr.forEach(item => {\n this.NpcBg.addChild(item);\n })\n\t\tthis.NpcBg.mask = this.rect;\n\t\tthis._Zhuazi.setup();\n\t\t\n\t\t// this._Zhuazi.move();\n\t\tthis.backTransfer.addChild(this._backBoxs);\n this._backBoxs.setup();\n if (props.single) {\n this.backTransfer.visible = false;\n }\n\t\tthis.frontTransfer.addChild(this._frontBoxs);\n\t\tthis._frontBoxs.setup();\n\t}\n\t/**\n\t * \n\t * @param 暂停move\n\t */\n\tstopMove() {\n\t\tthis._frontBoxs.stop();\n\t}\n\t/**\n\t * 赋值x距离值\n\t */\n\tsetMoveX(x, item) {\n\t\tthis.moveTime = x;\n this.prizeBox = item;\n\t\tthis._Zhuazi.move();\n }\n\t/**\n\t * 显示隐藏盒子\n\t */\n\tsetVisible(isshow) {\n\t\tthis._frontBoxs.showHidePrizeBox(isshow);\n\t}\n\t/**\n\t * 获取中奖盒子移动的距离\n\t */\n\tgetMoveX() {\n\t\treturn this.moveTime;\n }\n /**\n * 重置moveTime\n */\n resetMoveX() {\n this.moveTime = null;\n }\n\t/**\n\t * 获取中奖盒子\n\t */\n\tgetBox() {\n\t\treturn this.prizeBox;\n\t}\n /**\n * 重置场景\n */\n reset() {\n this.startstatus = false;\n this.ifPrize = false;\n\t\tthis._Zhuazi.getReset();\n }\n\n /**\n * 开始\n */\n start(type=null) {\n this.speed = 1;\n this.gameIng = true;\n console.log('执行', type);\n this.startstatus = true;\n this.ifPrize = type && type.prize || false;\n }\n\n /**\n * npc开始掉落\n */\n beginNpc() {\n this.timer = setTimeout(() => {\n if (this.gameIng) {\n // this.speed += props.acceleratedSpeed;\n // this.creatNpc()\n }\n //递归执行\n // this.beginNpc();\n }, 2000 / this.speed);\n }\n\n /**\n * 暂停\n */\n pause() {\n this.gameIng = false;\n }\n\n /**\n * 恢复\n */\n revive() {\n this.gameIng = true;\n }\n\n /**\n * 重新开始\n */\n resume() {\n this.reset();\n this.start();\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\tprivate _status;\n\tprivate _gameView: GameView;\n\n\n\n\n\n\tconstructor() {\n\t\tsuper();\n\t\tengine.globalEvent.addEventListener('doll-machine2-game-init', this.reset, this);\n\t\tengine.globalEvent.addEventListener('doll-machine2-game-start', this.start, this);\n\n\t\tlet gameView = this._gameView = new GameView();\n\t\tthis.addChild(gameView);\n\t\t// gameView.reset();\n\t\t// gameView.start()\n\t}\n\n\treset(event: engine.Event) {\t\t\n\t\tinjectProps(event.data);\n\t\tthis._gameView.visible = true;\n\t\tthis._gameView.reset();\n\t}\n\n\tstart(event: engine.Event) {\n\t\tconsole.log('监听开始');\n\t\tinjectProps(event.data);\n\t\t// this._status = 1;\n\t\tthis._gameView.start(event.data);\n\t}\n\n\tpause() {\n\t\tthis._gameView.pause();\n\t}\n\n\tresume() {\n\t\tthis._gameView.resume();\n\t}\n\n\trevive() {\n\t\tthis._gameView.revive();\n\t}\n\n\tclear() {\n\t\tthis._gameView.visible = false;\n\t}\n\n\tprivate onTap(event) {\n\t//\tthis._gameView.tap(event);\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\treturn instance;\n}\n"],"names":["__extends"],"mappings":";;;;;;CAIO,IAAI,KAAK,GAAQ,EAAE,CAAC;UAEX,YAAY;KAC3B,IAAI,SAAS,GAAG,QAAQ,EAAE,CAAC;KAE3B,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;CACrC,CAAC;UAEe,WAAW,CAAC,CAAC;KAC5B,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;CAC7B,CAAC;;;UCVe,UAAU,CAAC,IAAI;KAC9B,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;CACvD,CAAC;AAED,UAAgB,gBAAgB,CAAC,IAAI;KACpC,OAAO,UAAU,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;CACrD,CAAC;AAED;;CCTA;KAA+BA,mCAAgB;KAe7C;SAAA,YACE,iBAAO,SACR;SAJO,eAAS,GAAC,EAAE,CAAC;;MAIpB;KACD,yBAAK,GAAL;SACE,IAAI,KAAK,EAAG,KAAK,GAAG,CAAC,CAAC;SACtB,KAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,GAAC,CAAC,EAAE,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AAC,SAAS,CAAC,MAAM,EAAE,CAAC;MACxB;KAED,2BAAK,GAAL;SACC,IAAI,CAAC,SAAS,CAAC,OAAO,GAAG,KAAK,CAAC;MAC/B;KAEO,2BAAK,GAAb,UAAc,KAAK;MAElB;KACF,kBAAC;CAAD,CAAC,CAnDgC,MAAM,CAAC,SAAS,GAmDhD;;;iBCpDwB,KAAK;KAC7B,YAAY,EAAE,CAAC;KACf,WAAW,CAAC,KAAK,CAAC,CAAC;KAEnB,IAAI,QAAQ,GAAG,IAAI,WAAW,EAAE,CAAC;KACjC,OAAO,QAAQ,CAAC;CACjB,CAAC;;;;;;;;;"}
\ No newline at end of file
{"version":3,"file":"index.js","sources":["src/custom/doll-machine2/src/props.ts","src/custom/doll-machine2/src/game/utils.ts","src/custom/doll-machine2/src/game/frontBox.ts","src/custom/doll-machine2/src/game/backBox.ts","src/custom/doll-machine2/src/game/Zhuazi.ts","src/custom/doll-machine2/src/game/GameView.ts","src/custom/doll-machine2/src/game/GameWrapper.ts","src/custom/doll-machine2/src/index.ts"],"sourcesContent":["/**\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","/**\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}","import { getTextureByName } from \"./utils\";\nimport GameView from './GameView';\nimport { props } from \"../props\";\nexport class FrontBoxs extends engine.Container {\n //盒子1\n private box1: engine.Container;\n //盒子2\n private box2: engine.Container;\n //盒子3 \n private box3: engine.Container;\n //盒子4\n private box4: engine.Container;\n //盒子5\n private box5: engine.Container;\n // 需隐藏的盒子\n private hideBox: engine.Container;\n private frontBoxs=[];\n public GameView: GameView;\n constructor() {\n super();\n }\n setup() {\n let initX , initY = 0;\n for(let i = 0; i < props.dollNum; i++) {\n if (!new engine.Sprite(getTextureByName('frontbox_' + i))) {\n return;\n }\n\n this.frontBoxs[i] = new engine.Sprite(getTextureByName('frontbox_'+i));\n initX = this.frontBoxs[0].x = props.frontInitX;\n initY = this.frontBoxs[0].y = props.frontInitY;\n this.frontBoxs[i]['npcType'] = 'box'+i;\n }\n this.frontBoxs[props.dollNum] = new engine.Sprite(getTextureByName('frontbox_0'));\n this.frontBoxs[props.dollNum]['npcType'] = 'box' + props.dollNum;\n console.log(this.frontBoxs);\n \n for(let i = 0; i < this.frontBoxs.length; i++) {\n if(i == 0) {\n this.frontBoxs[i].x = initX ;\n } else {\n this.frontBoxs[i].x = this.frontBoxs[i - 1].x - this.frontBoxs[0].width - props.frontmargin;\n }\n console.log(this.frontBoxs[i].x);\n this.frontBoxs[i].y = initY;\n this.addChild(this.frontBoxs[i]);\n console.log('aaa', this.frontBoxs[i].x);\n }\n // console.log(this.frontBoxs);\n this.addEventListener(engine.Event.ENTER_FRAME, this.frameMove, this);\n }\n frameMove() {\n this.frontBoxs.forEach((item, index) => {\n item.x += props.moveSpeed;\n if (item.x <= 0 && !item.visible) {\n item.visible = true;\n }\n if (item.x >= 750) {\n //let lastitem = this.frontBoxs.shift();\n let tmpIndex = 0;\n if (index <= 0) {\n tmpIndex = this.frontBoxs.length - 1;\n } else {\n tmpIndex = index - 1;\n }\n\n item.x = this.frontBoxs[tmpIndex].x - this.frontBoxs[0].width - props.frontmargin;\n\n if (!this.GameView.getMoveX() && item.x <= 0 && this.GameView.startstatus) {\n this.GameView.setMoveX((370 - item.x - 13) / props.moveSpeed, item);\n this.hideBox = item;\n }\n //this.frontBoxs.push(lastitem);\n }\n })\n }\n stop() {\n // this.removeEventListener(engine.Event.ENTER_FRAME, this.frameMove, this);\n }\n showHidePrizeBox(isshow) {\n this.hideBox.visible = isshow\n }\n}","import { getTextureByName } from \"./utils\";\nimport { props } from \"../props\";\nexport class BackBoxs extends engine.Container {\n private backBoxs=[];\n constructor() {\n super();\n }\n setup() {\n let initX , initY = 0;\n for (let i = 0; i < props.dollNum; i++) {\n this.backBoxs[i] = new engine.Sprite(getTextureByName('backbox_' + i));\n initX = this.backBoxs[0].x = props.backInitX;\n initY = this.backBoxs[0].y = props.backInitY - props.initOffsetTop;\n this.backBoxs[i]['npcType'] = 'box' + i;\n }\n this.backBoxs[props.dollNum] = new engine.Sprite(getTextureByName('backbox_0'));\n this.backBoxs[props.dollNum]['npcType'] = 'box' + props.dollNum;\n for (let i = 0; i < this.backBoxs.length; i++) {\n if(i == 0) {\n this.backBoxs[i].x = initX;\n } else {\n this.backBoxs[i].x = this.backBoxs[i - 1].x + this.backBoxs[i].width + props.backmargin;\n }\n this.backBoxs[i].y = initY;\n \n this.addChild(this.backBoxs[i]);\n }\n this.addEventListener(engine.Event.ENTER_FRAME, this.frameMove, this);\n }\n frameMove() {\n this.backBoxs.forEach((item) => {\n item.x -= props.moveSpeed;\n if (item.x <= 0) {\n let lastitem = this.backBoxs.shift();\n lastitem.x = this.backBoxs[this.backBoxs.length - 1].x + item.width + props.backmargin;\n this.backBoxs.push(lastitem);\n }\n })\n }\n}","import { getTextureByName } from \"./utils\";\nimport { props } from \"../props\";\nimport GameView from './GameView';\nexport class Zhuazi extends engine.Container {\n private bashouGan: engine.Sprite;\n private bashou: engine.Sprite;\n private ganzi: engine.Sprite;\n private left_zhuazi: engine.Sprite;\n private right_zhuazi: engine.Sprite;\n private connect: engine.Sprite;\n private ganNode: engine.Container;\n private moveNode: engine.Container;\n private moveArr = [];\n private zhuaziY;\n private itemShow: engine.Container;\n private prizeBoxs = [];\n public GameView: GameView;\n constructor() {\n super();\n }\n setup() {\n this.ganNode = new engine.Container();\n this.moveNode = new engine.Container();\n this.ganNode.x = 280;\n this.ganNode.y = 350;\n this.bashouGan = new engine.Sprite(getTextureByName(\"把手杆子\"));\n this.bashouGan.x = 60;\n this.bashouGan.y = 12;\n this.bashou = new engine.Sprite(getTextureByName(\"把手\"));\n this.bashou.x = 0;\n this.bashou.y = 0;\n this.ganzi = new engine.Sprite(getTextureByName(\"伸缩杆\"));\n this.ganzi.x = 97;\n this.ganzi.y = 27;\n this.connect = new engine.Sprite(getTextureByName(\"连接点\"));\n this.connect.x = 18;\n this.connect.y = -5;\n this.left_zhuazi = new engine.Sprite(getTextureByName(\"左爪\"));\n this.left_zhuazi.x = props.leftLocX;\n this.left_zhuazi.y = props.leftLocY;\n this.left_zhuazi.anchorX = this.left_zhuazi.width;\n this.left_zhuazi.anchorY = 0;\n this.right_zhuazi = new engine.Sprite(getTextureByName(\"右爪\"));\n this.right_zhuazi.x = props.rightLocX;\n this.right_zhuazi.y = props.rightLocY;\n this.ganNode.addChild(this.left_zhuazi);\n this.ganNode.addChild(this.right_zhuazi);\n this.ganNode.addChild(this.connect);\n this.ganNode.x = 30;\n this.ganNode.y = this.ganNode.y - 263;\n this.zhuaziY = this.ganNode.y;\n this.moveNode.addChild(this.ganzi);\n this.moveNode.addChild(this.ganNode);\n this.moveNode.addChild(this.bashou);\n this.moveNode.x = 262;\n this.bashouGan.y = this.bashouGan.y;\n this.moveNode.y = this.moveNode.y;\n this.addChild(this.bashouGan);\n this.addChild(this.moveNode);\n if (!props.ganziShow) {\n this.bashouGan.visible = false;\n }\n if (!props.bashouShow) {\n this.bashou.visible = false;\n }\n this.createPrizeBox();\n \n }\n createPrizeBox() {\n for (let i = 0; i < props.dollNum; i++) {\n if (!new engine.Sprite(getTextureByName('prizebox_' + i))) {\n return;\n }\n this.prizeBoxs[i] = new engine.Sprite(getTextureByName('prizebox_' + i));\n this.prizeBoxs[i]['npcType'] = 'box' + i;\n }\n this.prizeBoxs[props.dollNum] = new engine.Sprite(getTextureByName('prizebox_0'));\n this.prizeBoxs[props.dollNum]['npcType'] = 'box' + props.dollNum;\n\n this.prizeBoxs.forEach(item => {\n this.ganNode.addChild(item);\n item.visible = false;\n item.x = props.prizeBoxInitX;\n item.y = props.prizeBoxInitY;\n })\n }\n showPrizeBox() {\n this.prizeBoxs.forEach(item => {\n console.log(this.GameView.getBox()['npcType']);\n if (item['npcType'] === this.GameView.getBox()['npcType']) {\n item.visible = true;\n this.itemShow = item;\n } else {\n item.visible = false;\n }\n })\n \n }\n move() {\n let rndist = Math.random();\n let halfWidth = this.bashou.width / 2;\n let randomX = rndist * (rndist > 0.5 ? 1 : -1) * props.bashouMoveDist;\n console.log(randomX);\n engine.Tween.get(this.moveNode).to({ x: 370 + halfWidth - 71}, 1000).call(() => {\n this.zhangkai();\n });\n }\n zhangkai() {\n this.left_zhuazi.anchorX = this.left_zhuazi.width;\n this.left_zhuazi.anchorY = 0;\n engine.Tween.get(this.left_zhuazi, { loop: false }).to({ rotation: props.leftRotation}, 1000);\n engine.Tween.get(this.right_zhuazi, { loop: false }).to({ rotation: props.rightRotation }, 1000);\n setTimeout(() => {\n this.getLong();\n }, 500);\n }\n getLong() {\n let droptime = Number((this.GameView.getMoveX() / 60 - 1).toFixed(2)) * 1000 -130;\n console.log('dr', droptime);\n let times = (props.ganMoveEndY - this.ganzi.y ) / this.ganzi.height;\n console.log(Number(times.toFixed(2)) );\n engine.Tween.get(this.ganzi).to({ scaleY: Number(times.toFixed(2)) }, droptime).to({ scaleY: 1 }, droptime)\n console.log('node', this.zhuaziY);\n engine.Tween.get(this.ganNode).to({ y: props.ganMoveEndY }, droptime).call(() => {\n this.GameView.stopMove();\n if (this.GameView.ifPrize) {\n this.showPrizeBox();\n this.GameView.setVisible(false);\n }\n }).to({ y: this.zhuaziY }, droptime).call(() => {\n // this.getReset();\n if (this.GameView.ifPrize) {\n this.itemShow.visible = false;\n }\n engine.globalEvent.dispatchEvent('doll-machine2-game-end');\n })\n }\n getReset() {\n // if (this.GameView.ifPrize) {\n // this.itemShow.visible = false;\n // }\n this.left_zhuazi.anchorX = this.left_zhuazi.width;\n this.left_zhuazi.anchorY = 0;\n engine.Tween.get(this.moveNode, {loop: false}).to({x: 262}, 1000);\n engine.Tween.get(this.left_zhuazi, { loop: false }).to({ rotation: 0 }, 1000);\n engine.Tween.get(this.right_zhuazi, { loop: false }).to({ rotation: 0 }, 1000);\n this.GameView.resetMoveX();\n }\n}","/**\n * Created by rockyl on 2018/8/16.\n */\n\nimport { props } from \"../props\";\nimport { playSound, createSvga } from \"./utils\";\nimport ObjectPool = engine.ObjectPool;\nimport { getTextureByName } from \"./utils\";\nimport { Goods } from \"./Goods\";\nimport { PoolName } from \"./object-pool-init\";\nimport { FrontBoxs } from \"./frontBox\";\nimport { BackBoxs } from \"./backBox\";\nimport { Zhuazi } from './Zhuazi';\n\nexport default class GameView extends engine.Container {\n private _hasSetup;\n\n //触摸层\n private rectBg: engine.Rect;\n //npc层\n private NpcBg: engine.Container;\n //盒子1\n private box1: engine.Container;\n //盒子2\n private box2: engine.Container;\n //盒子3\n private box3: engine.Container;\n //盒子4\n private box4: engine.Container;\n //盒子5\n private box5: engine.Container;\n //前传输区域\n private frontTransfer: engine.Container;\n //后传输区域\n private backTransfer: engine.Container;\n //前台板\n private frontDesk: engine.Sprite;\n //后台板\n private backDesk: engine.Sprite;\n private _frontBoxs: FrontBoxs;\n\tprivate _backBoxs: BackBoxs;\n\tprivate _Zhuazi: Zhuazi;\n\tprivate prizeBox: engine.Container;\n\tprivate rect;\n //当前分数\n\tprivate score;\n\t\n\t//中奖盒子移动距离\n\tprivate moveTime;\n\n //游戏状态\n private gameIng;\n //是否已获取位移值\n public startstatus=false;\n //是否中奖\n public ifPrize=false;\n //npc出身计时器\n private timer;\n //倒计时计时器\n private countdownTimer: any;\n //倒计时\n private countdown: number;\n\n //当前速度\n private speed: number;\n\n // 当前场景上面的物品\n private goodsItems = [];\n\n private _goods: Goods;\n\n constructor() {\n super();\n this.once(engine.Event.ADDED_TO_STAGE, this.setup, this);\n }\n\n // private waterSvga;\n // private boomSvga;\n // private playerSvga;\n\n setup() {\n if (this._hasSetup) {\n return;\n }\n\n this._hasSetup = true;\n\t\tconst frontBoxs = (this._frontBoxs = new FrontBoxs());\n\t\tthis._frontBoxs.GameView = this;\n\t\tconst backBoxs = (this._backBoxs = new BackBoxs());\n\t\tthis._Zhuazi = new Zhuazi();\n\t\tthis._Zhuazi.GameView = this;\n this.frontTransfer = new engine.Container();\n this.backTransfer = new engine.Container();\n this.frontTransfer.width = 0;\n this.frontTransfer.height = 0;\n this.frontTransfer.alpha = 1;\n // this.frontTransfer.x = 0;\n // this.frontTransfer.y = 434;\n\n this.backTransfer.width = 0;\n this.backTransfer.height = 0;\n this.backTransfer.alpha = 1;\n // this.backTransfer.x = 0;\n // this.backTransfer.y = 390;\n\t\tthis.rect = new engine.Rect();\n this.rect.width = props.gameStageWidth;\n this.rect.height = props.gameStageHeight;\n\t\tthis.rect.x = 65;\n this.rect.y = 0;\n this.NpcBg = new engine.Container();\n this.NpcBg.x = 0;\n this.NpcBg.y = 0;\n\t\tthis.addChild(this.NpcBg);\n\t\tthis.addChild(this.rect);\n\t\t\n\t\t\n\t\t\n\t\t// let gameBg = new engine.Sprite(getTextureByName(\"游戏背景\"));\n\t\t// gameBg.x = 65;\n\t\t// gameBg.y = 263;\n\t\t// this.NpcBg.addChild(gameBg);\n\t\t\n this.frontDesk = new engine.Sprite(getTextureByName(\"前传输带\"));\n this.frontDesk.x = props.initOffsetLeft;\n this.frontDesk.y = props.frontDeskY - props.initOffsetTop;\n\n this.backDesk = new engine.Sprite(getTextureByName(\"后传输带\"));\n this.backDesk.x = props.initOffsetLeft;\n this.backDesk.y = props.backDeskY - props.initOffsetTop;\n if(props.single) {\n this.backDesk.visible = false;\n }\n let pcarr = [this.backDesk, this.frontDesk, this.backTransfer, this.frontTransfer, this._Zhuazi];\n pcarr.forEach(item => {\n this.NpcBg.addChild(item);\n })\n\t\tthis.NpcBg.mask = this.rect;\n\t\tthis._Zhuazi.setup();\n\t\t\n\t\t// this._Zhuazi.move();\n\t\tthis.backTransfer.addChild(this._backBoxs);\n this._backBoxs.setup();\n if (props.single) {\n this.backTransfer.visible = false;\n }\n\t\tthis.frontTransfer.addChild(this._frontBoxs);\n\t\tthis._frontBoxs.setup();\n\t}\n\t/**\n\t * \n\t * @param 暂停move\n\t */\n\tstopMove() {\n\t\tthis._frontBoxs.stop();\n\t}\n\t/**\n\t * 赋值x距离值\n\t */\n\tsetMoveX(x, item) {\n\t\tthis.moveTime = x;\n this.prizeBox = item;\n\t\tthis._Zhuazi.move();\n }\n\t/**\n\t * 显示隐藏盒子\n\t */\n\tsetVisible(isshow) {\n\t\tthis._frontBoxs.showHidePrizeBox(isshow);\n\t}\n\t/**\n\t * 获取中奖盒子移动的距离\n\t */\n\tgetMoveX() {\n\t\treturn this.moveTime;\n }\n /**\n * 重置moveTime\n */\n resetMoveX() {\n this.moveTime = null;\n }\n\t/**\n\t * 获取中奖盒子\n\t */\n\tgetBox() {\n\t\treturn this.prizeBox;\n\t}\n /**\n * 重置场景\n */\n reset() {\n this.startstatus = false;\n this.ifPrize = false;\n\t\tthis._Zhuazi.getReset();\n }\n\n /**\n * 开始\n */\n start(type=null) {\n this.speed = 1;\n this.gameIng = true;\n console.log('执行', type);\n this.startstatus = true;\n this.ifPrize = type && type.prize || false;\n }\n\n /**\n * npc开始掉落\n */\n beginNpc() {\n this.timer = setTimeout(() => {\n if (this.gameIng) {\n // this.speed += props.acceleratedSpeed;\n // this.creatNpc()\n }\n //递归执行\n // this.beginNpc();\n }, 2000 / this.speed);\n }\n\n /**\n * 暂停\n */\n pause() {\n this.gameIng = false;\n }\n\n /**\n * 恢复\n */\n revive() {\n this.gameIng = true;\n }\n\n /**\n * 重新开始\n */\n resume() {\n this.reset();\n this.start();\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\tprivate _status;\n\tprivate _gameView: GameView;\n\n\n\n\n\n\tconstructor() {\n\t\tsuper();\n\t\tengine.globalEvent.addEventListener('doll-machine2-game-init', this.reset, this);\n\t\tengine.globalEvent.addEventListener('doll-machine2-game-start', this.start, this);\n\n\t\tlet gameView = this._gameView = new GameView();\n\t\tthis.addChild(gameView);\n\t\t// gameView.reset();\n\t\t// gameView.start()\n\t}\n\n\treset(event: engine.Event) {\t\t\n\t\tinjectProps(event.data);\n\t\tthis._gameView.visible = true;\n\t\tthis._gameView.reset();\n\t}\n\n\tstart(event: engine.Event) {\n\t\tconsole.log('监听开始');\n\t\tinjectProps(event.data);\n\t\t// this._status = 1;\n\t\tthis._gameView.start(event.data);\n\t}\n\n\tpause() {\n\t\tthis._gameView.pause();\n\t}\n\n\tresume() {\n\t\tthis._gameView.resume();\n\t}\n\n\trevive() {\n\t\tthis._gameView.revive();\n\t}\n\n\tclear() {\n\t\tthis._gameView.visible = false;\n\t}\n\n\tprivate onTap(event) {\n\t//\tthis._gameView.tap(event);\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\treturn instance;\n}\n"],"names":["__extends"],"mappings":";;;;;;CAIO,IAAI,KAAK,GAAQ,EAAE,CAAC;UAEX,YAAY;KAC3B,IAAI,SAAS,GAAG,QAAQ,EAAE,CAAC;KAE3B,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;CACrC,CAAC;UAEe,WAAW,CAAC,CAAC;KAC5B,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;CAC7B,CAAC;;;UCVe,UAAU,CAAC,IAAI;KAC9B,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,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default": 20
},
"leftLocX": {
"alias": "左边爪子X位置",
"type": "number",
"default": -15
},
"leftLocY": {
"alias": "左边爪子Y位置",
"type": "number",
"default": 60
},
"rightRotation": {
"alias": "右边爪子旋转角度",
"type": "number",
"default": -20
},
"rightLocX": {
"alias": "右边爪子X位置",
"type": "number",
"default": 98
},
"rightLocY": {
"alias": "右边爪子Y位置",
"type": "number",
"default": 60
},
"prizeBoxInitX": {
"alias": "中奖娃娃的x位置",
"type": "number",
......@@ -148,12 +168,6 @@
"url": "//yun.duiba.com.cn/aurora/assets/fde8c60981791e5136c7914274c2a2d0936626cd.png",
"uuid": "aa30ee7c-a6ad-4e10-9b6a-13b139664ab1",
"ext": ".png"
},
{
"name": "frontbox_4",
"url": "//yun.duiba.com.cn/aurora/assets/fde8c60981791e5136c7914274c2a2d0936626cd.png",
"uuid": "aa30ee7c-a6ad-4e10-9b6a-13b139664ab2",
"ext": ".png"
},
{
"name": "backbox_0",
......
......@@ -51,9 +51,9 @@ export default class GameView extends engine.Container {
//游戏状态
private gameIng;
//是否已获取位移值
public startstatus=true;
public startstatus=false;
//是否中奖
public ifPrize=true;
public ifPrize=false;
//npc出身计时器
private timer;
//倒计时计时器
......
......@@ -36,13 +36,13 @@ export class Zhuazi extends engine.Container {
this.connect.x = 18;
this.connect.y = -5;
this.left_zhuazi = new engine.Sprite(getTextureByName("左爪"));
this.left_zhuazi.x = -15;
this.left_zhuazi.y = 60;
this.left_zhuazi.x = props.leftLocX;
this.left_zhuazi.y = props.leftLocY;
this.left_zhuazi.anchorX = this.left_zhuazi.width;
this.left_zhuazi.anchorY = 0;
this.right_zhuazi = new engine.Sprite(getTextureByName("右爪"));
this.right_zhuazi.x = 98;
this.right_zhuazi.y = 60;
this.right_zhuazi.x = props.rightLocX;
this.right_zhuazi.y = props.rightLocY;
this.ganNode.addChild(this.left_zhuazi);
this.ganNode.addChild(this.right_zhuazi);
this.ganNode.addChild(this.connect);
......@@ -115,7 +115,7 @@ export class Zhuazi extends engine.Container {
}, 500);
}
getLong() {
let droptime = Number((this.GameView.getMoveX() / 60 - 1).toFixed(2)) * 1000;
let droptime = Number((this.GameView.getMoveX() / 60 - 1).toFixed(2)) * 1000 -130;
console.log('dr', droptime);
let times = (props.ganMoveEndY - this.ganzi.y ) / this.ganzi.height;
console.log(Number(times.toFixed(2)) );
......
......@@ -21,17 +21,19 @@ export class FrontBoxs extends engine.Container {
}
setup() {
let initX , initY = 0;
for(let i = 0; i < +props.dollNum+1; i++) {
for(let i = 0; i < props.dollNum; i++) {
if (!new engine.Sprite(getTextureByName('frontbox_' + i))) {
return;
}
this.frontBoxs[i] = new engine.Sprite(getTextureByName('frontbox_'+i));
initX = this.frontBoxs[0].x = props.frontInitX;
initY = this.frontBoxs[0].y = props.frontInitY;
this.frontBoxs[i]['npcType'] = 'box'+i;
}
// this.frontBoxs[props.dollNum] = new engine.Sprite(getTextureByName('frontbox_0'));
// this.frontBoxs[props.dollNum]['npcType'] = 'box' + props.dollNum;
this.frontBoxs[props.dollNum] = new engine.Sprite(getTextureByName('frontbox_0'));
this.frontBoxs[props.dollNum]['npcType'] = 'box' + props.dollNum;
console.log(this.frontBoxs);
for(let i = 0; i < this.frontBoxs.length; i++) {
if(i == 0) {
......@@ -50,18 +52,25 @@ export class FrontBoxs extends engine.Container {
frameMove() {
this.frontBoxs.forEach((item, index) => {
item.x += props.moveSpeed;
if(item.x <=0 && !item.visible) {
if (item.x <= 0 && !item.visible) {
item.visible = true;
}
if(item.x >= 750) {
let lastitem = this.frontBoxs.shift();
lastitem.x = this.frontBoxs[this.frontBoxs.length - 1].x - this.frontBoxs[0].width - props.frontmargin;
if (item.x >= 750) {
//let lastitem = this.frontBoxs.shift();
let tmpIndex = 0;
if (index <= 0) {
tmpIndex = this.frontBoxs.length - 1;
} else {
tmpIndex = index - 1;
}
item.x = this.frontBoxs[tmpIndex].x - this.frontBoxs[0].width - props.frontmargin;
if (!this.GameView.getMoveX() && item.x <= 0 && this.GameView.startstatus) {
this.GameView.setMoveX((370 - item.x - 13) / props.moveSpeed, item);
this.hideBox = item;
}
this.frontBoxs.push(lastitem);
//this.frontBoxs.push(lastitem);
}
})
}
......
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