Commit 26ce1641 authored by 13732208043's avatar 13732208043

茶叶更新

parent 1ac3d065
......@@ -253,5 +253,5 @@
}
},
"id": "pick-tea",
"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['pick-tea'] = factory(global.tslib));\n}(this, (function (tslib) { 'use strict';\n\n\tvar props = {};\r\n\tfunction prepareProps() {\r\n\t var metaProps = getProps();\r\n\t engine.injectProp(props, metaProps);\r\n\t}\r\n\tfunction injectProps(p) {\r\n\t engine.injectProp(props, p);\r\n\t}\n\n\tfunction getTexture(uuid) {\r\n\t return engine.Texture.from(getAssetByUUID(uuid).uuid);\r\n\t}\r\n\tfunction getTextureByName(name) {\r\n\t return getTexture(engine.getAssetByName(name).uuid);\r\n\t}\r\n\tfunction playSound(name) {\r\n\t engine.playSound(engine.getAssetByName(name).uuid, { keep: true });\r\n\t}\r\n\tfunction createSvga(name, anchorName) {\r\n\t var inst = new svga.Svga();\r\n\t inst.source = 'asset://' + engine.getAssetByName(name).uuid;\r\n\t return inst;\r\n\t}\r\n\tfunction showLog(abjname, obj) {\r\n\t}\n\n\tvar GameView = (function (_super) {\r\n\t tslib.__extends(GameView, _super);\r\n\t function GameView() {\r\n\t var _this = _super.call(this) || this;\r\n\t _this.nowPercentage = 0;\r\n\t _this.goodsItems = [];\r\n\t _this._touchEnabled = true;\r\n\t _this.once(engine.Event.ADDED_TO_STAGE, _this.setup, _this);\r\n\t return _this;\r\n\t }\r\n\t GameView.prototype.setup = function () {\r\n\t if (this._hasSetup) {\r\n\t return;\r\n\t }\r\n\t this._hasSetup = true;\r\n\t this.pickTeaBg = new engine.Container();\r\n\t this.basketLevel = null;\r\n\t this.addChild(this.pickTeaBg);\r\n\t this.teaHalfImg = new engine.Image();\r\n\t this.paperBasketSvga = createSvga(\"采茶童-纸篮子\");\r\n\t this.clothBasketSvga = createSvga(\"采茶童-布篮子\");\r\n\t this.bambooBasketSvga = createSvga(\"采茶童-竹编篮\");\r\n\t this.woodBasketSvga = createSvga(\"采茶童-木篮子\");\r\n\t this.addOneSvga = createSvga(\"+1\");\r\n\t this.pickTeaSvga = createSvga(\"采茶叶\");\r\n\t this.teaSkyUpSvga = createSvga(\"茶叶向上飞\");\r\n\t this.handGraspSvga = createSvga(\"手抓去\");\r\n\t this.frontImg = new engine.Image(getTextureByName('前景'));\r\n\t this.pickTeaBg.addChild(this.paperBasketSvga);\r\n\t this.pickTeaBg.addChild(this.clothBasketSvga);\r\n\t this.pickTeaBg.addChild(this.bambooBasketSvga);\r\n\t this.pickTeaBg.addChild(this.woodBasketSvga);\r\n\t this.pickTeaBg.addChild(this.pickTeaSvga);\r\n\t this.pickTeaBg.addChild(this.teaSkyUpSvga);\r\n\t this.basketSvgaGroup = [this.paperBasketSvga, this.clothBasketSvga, this.bambooBasketSvga, this.woodBasketSvga];\r\n\t this.progressbarBgImg = new engine.Image(getTextureByName('进度条底框'));\r\n\t this.progressbarImg = new engine.Image(getTextureByName('进度'));\r\n\t this.teaHalfFlagImg = new engine.Image(getTextureByName('茶叶进度缺'));\r\n\t this.teaFullFlagImg = new engine.Image(getTextureByName('茶叶进度满'));\r\n\t this.teaStarImg = new engine.Image(getTextureByName('小茶叶'));\r\n\t this.handGraspBgImg = new engine.Image(getTextureByName('茶叶收取底图'));\r\n\t this.verseImg = new engine.Image(getTextureByName('气泡框'));\r\n\t this.pickTeaBg.addChild(this.verseImg);\r\n\t var mask = new engine.Rect();\r\n\t mask.width = 600;\r\n\t mask.height = 50;\r\n\t mask.x = 10;\r\n\t mask.y = 0;\r\n\t mask.alpha = 1;\r\n\t this.progressbarImg.mask = mask;\r\n\t showLog(this.progressbarImg.mask);\r\n\t this.addChild(this.frontImg);\r\n\t this.progressbarBgImg.addChild(this.progressbarImg);\r\n\t this.progressbarBgImg.addChild(mask);\r\n\t this.progressbarBgImg.addChild(this.addOneSvga);\r\n\t this.progressbarBgImg.addChild(this.handGraspBgImg);\r\n\t this.handGraspBgImg.addChild(this.handGraspSvga);\r\n\t this.progressbarBgImg.addChild(this.teaHalfFlagImg);\r\n\t this.progressbarBgImg.addChild(this.teaFullFlagImg);\r\n\t this.progressbarBgImg.addChild(this.teaStarImg);\r\n\t this.pickTeaCount = new engine.Label();\r\n\t this.progressbarBgImg.addChild(this.pickTeaCount);\r\n\t this.addChild(this.progressbarBgImg);\r\n\t this.initView();\r\n\t };\r\n\t GameView.prototype.reset = function () {\r\n\t this.initView();\r\n\t };\r\n\t GameView.prototype.start = function () {\r\n\t };\r\n\t GameView.prototype.pause = function () {\r\n\t this.gameIng = false;\r\n\t };\r\n\t GameView.prototype.revive = function () {\r\n\t this.gameIng = true;\r\n\t };\r\n\t GameView.prototype.resume = function () {\r\n\t this.reset();\r\n\t this.start();\r\n\t };\r\n\t GameView.prototype.initView = function () {\r\n\t this.pickTeaBg.mouseEnabled = false;\r\n\t this.teaHalfImg.visible = false;\r\n\t this.pickTeaSvga.visible = false;\r\n\t this.teaSkyUpSvga.visible = false;\r\n\t this.verseImg.visible = false;\r\n\t this.frontImg.visible = props.showFrontImg == 1;\r\n\t this.initChildrenPos();\r\n\t };\r\n\t GameView.prototype.initChildrenPos = function () {\r\n\t for (var i = 0; i < this.basketSvgaGroup.length; i++) {\r\n\t this.basketSvgaGroup[i].visible = false;\r\n\t this.basketSvgaGroup[i].x = props.basketSvgaPos[0];\r\n\t this.basketSvgaGroup[i].y = props.basketSvgaPos[1];\r\n\t }\r\n\t var pickTeaSVGA = this.basketSvgaGroup[0];\r\n\t this.allFrames = pickTeaSVGA.children.length;\r\n\t this.verseImg.x = props.versePos[0];\r\n\t this.verseImg.y = props.versePos[1];\r\n\t this.addOneSvga.x = props.addOneSvgaPos[0];\r\n\t this.addOneSvga.y = props.addOneSvgaPos[1];\r\n\t this.pickTeaSvga.x = props.pickTeaSvgaPos[0];\r\n\t this.pickTeaSvga.y = props.pickTeaSvgaPos[1];\r\n\t this.teaSkyUpSvga.x = props.teaSkyUpSvgaPos[0];\r\n\t this.teaSkyUpSvga.y = props.teaSkyUpSvgaPos[1];\r\n\t this.handGraspSvga.x = props.handGraspSvgaPos[0];\r\n\t this.handGraspSvga.y = props.handGraspSvgaPos[1];\r\n\t this.handGraspBgImg.x = props.handGraspBgImgPos[0];\r\n\t this.handGraspBgImg.y = props.handGraspBgImgPos[1];\r\n\t this.progressbarBgImg.x = props.progressbarBgImgPos[0];\r\n\t this.progressbarBgImg.y = props.progressbarBgImgPos[1];\r\n\t this.progressbarImg.x = props.progressbarImgPos[0];\r\n\t this.progressbarImg.y = props.progressbarImgPos[1];\r\n\t this.teaHalfFlagImg.x = props.teaHalfFlagImgPos[0];\r\n\t this.teaHalfFlagImg.y = props.teaHalfFlagImgPos[1];\r\n\t this.teaHalfFlagImg.anchorX = this.teaHalfFlagImg.width / 2;\r\n\t this.teaHalfFlagImg.anchorY = this.teaHalfFlagImg.height / 2;\r\n\t this.teaFullFlagImg.x = props.teaHalfFlagImgPos[0];\r\n\t this.teaFullFlagImg.y = props.teaHalfFlagImgPos[1];\r\n\t this.frontImg.x = props.FrontImgPos[0];\r\n\t this.frontImg.y = props.FrontImgPos[1];\r\n\t this.teaFullFlagImg.visible = false;\r\n\t this.teaStarImg.x = props.teaStarImgPos[0];\r\n\t this.teaStarImg.y = props.teaStarImgPos[1];\r\n\t this.pickTeaCount.fillColor = 'white';\r\n\t this.pickTeaCount.size = 30;\r\n\t this.pickTeaCount.text = '';\r\n\t this.pickTeaCount.x = props.pickTeaCountPos[0];\r\n\t this.pickTeaCount.y = props.pickTeaCountPos[1];\r\n\t this.pickTeaCount.height = 50;\r\n\t this.pickTeaCount.width = 200;\r\n\t this.verseLabel = new engine.TextField();\r\n\t this.verseLabel.size = props.verseLabel[2];\r\n\t this.verseLabel.text = '';\r\n\t this.verseLabel.fillColor = props.verseColor[0];\r\n\t this.verseLabel.height = props.verseLabel[1];\r\n\t this.verseLabel.width = props.verseLabel[0];\r\n\t this.verseLabel.strokeColor = props.verseColor[1];\r\n\t this.verseLabel.stroke = 0.5;\r\n\t this.verseLabel.y = 15;\r\n\t this.verseLabel['textHeight'] = 14;\r\n\t this.verseLabel.textAlign = engine.TEXT_ALIGN.CENTER;\r\n\t this.verseImg.visible = false;\r\n\t this.verseImg.addChild(this.verseLabel);\r\n\t };\r\n\t GameView.prototype.showVerse = function () {\r\n\t var _this = this;\r\n\t this.verseImg.visible = true;\r\n\t var len = props.verses.length;\r\n\t var random = Math.floor(Math.random() * len);\r\n\t var verse = props.verses[random];\r\n\t this.verseLabel.text = verse;\r\n\t var y = this.verseImg.y;\r\n\t engine.Tween.get(this.verseImg)\r\n\t .to({ alpha: 0 }, 3000).call(function () {\r\n\t _this.verseImg.visible = false;\r\n\t _this.verseImg.alpha = 1;\r\n\t });\r\n\t };\r\n\t GameView.prototype.setTeaNum = function (TeaNums) {\r\n\t var _this = this;\r\n\t if (this.schedule) {\r\n\t clearInterval(this.schedule);\r\n\t }\r\n\t var totalNum = TeaNums.totalNum;\r\n\t var nowNum = TeaNums.nowNum;\r\n\t this.getTeaPercentage(nowNum, totalNum);\r\n\t var surplus = nowNum - totalNum;\r\n\t if (surplus == 0) {\r\n\t this.gotoMaxLength();\r\n\t return;\r\n\t }\r\n\t var width = this.progressbarImg.width;\r\n\t var myDate = new Date();\r\n\t var nowData = myDate.getTime();\r\n\t var serverData = TeaNums.serverData;\r\n\t var fbdvalue = Math.abs((nowData - serverData));\r\n\t var dataDiff = 0;\r\n\t var x = -width * (1 - (nowNum / totalNum));\r\n\t showLog('原先的X:', this.progressbarImg.x);\r\n\t this.progressbarImg.x = parseFloat(x.toFixed(5)) + this.teaFullFlagImg.width - Math.abs(this.teaFullFlagImg.x);\r\n\t showLog('减去长款的x', this.progressbarImg.x);\r\n\t showLog('this.teaFullFlagImg.width', this.teaFullFlagImg.width);\r\n\t if (this.progressbarImg.x > (this.teaFullFlagImg.width / 2)) {\r\n\t var minus = this.teaFullFlagImg.width - Math.abs(this.teaFullFlagImg.x) - this.progressbarImg.x;\r\n\t this.progressbarImg.x = this.progressbarImg.x - this.teaFullFlagImg.width / 2 + Math.abs(this.teaFullFlagImg.x);\r\n\t showLog('负段x重组', this.progressbarImg.x);\r\n\t }\r\n\t showLog('补宽的X', this.progressbarImg.x);\r\n\t showLog('this.progressbarImg.x', this.progressbarImg.x);\r\n\t var step = (this.teaFullFlagImg.width / 2 - this.progressbarImg.x) / surplus;\r\n\t var speed = props.pickTeaSpeed;\r\n\t if (!this.teaFullRotation) {\r\n\t this.teaFullRotation = engine.Tween.get(this.teaHalfFlagImg, { loop: true })\r\n\t .to({ rotation: 360 }, speed).call(function () {\r\n\t _this.teaHalfFlagImg.rotation = 0;\r\n\t });\r\n\t }\r\n\t this.teaHalfFlagImg.visible = true;\r\n\t this.teaFullFlagImg.visible = !this.teaHalfFlagImg.visible;\r\n\t this.addOneSvga.visible = this.teaHalfFlagImg.visible;\r\n\t engine.Tween.resumeTweens(this.teaFullRotation);\r\n\t this.schedule = setInterval(function () {\r\n\t nowNum++;\r\n\t _this.addOneSvga.play(1, true);\r\n\t if (nowNum == totalNum) {\r\n\t _this.gotoMaxLength();\r\n\t _this.getTeaPercentage(nowNum, totalNum);\r\n\t engine.Tween.pauseTweens(_this.teaFullRotation);\r\n\t return;\r\n\t }\r\n\t if (_this.progressbarImg.x < _this.teaFullFlagImg.width / 2) {\r\n\t _this.progressbarImg.x -= step;\r\n\t }\r\n\t _this.getTeaPercentage(nowNum, totalNum);\r\n\t dataDiff += speed;\r\n\t myDate = new Date();\r\n\t nowData = myDate.getTime();\r\n\t if (Math.abs((nowData - serverData)) - dataDiff > (fbdvalue + 3000)) {\r\n\t showLog(_this.schedule);\r\n\t clearInterval(_this.schedule);\r\n\t engine.Tween.pauseTweens(_this.teaFullRotation);\r\n\t engine.globalEvent.dispatchEvent('event-setchange-TeaNum');\r\n\t _this.addOneSvga.visible = false;\r\n\t _this.addOneSvga.stop();\r\n\t return;\r\n\t }\r\n\t }, speed);\r\n\t };\r\n\t GameView.prototype.getTeaPercentage = function (nowNum, totalNum) {\r\n\t if (nowNum > totalNum) {\r\n\t return;\r\n\t }\r\n\t this.pickTeaCount.text = nowNum + '/' + totalNum;\r\n\t var teaPercentage = 2;\r\n\t var portion = totalNum / 3;\r\n\t if (nowNum < portion) {\r\n\t return;\r\n\t }\r\n\t if (nowNum < (portion * 2)) {\r\n\t teaPercentage = 1;\r\n\t }\r\n\t if (this.nowPercentage != teaPercentage) {\r\n\t this.nowPercentage = teaPercentage;\r\n\t this.updateTeaPercentage(teaPercentage);\r\n\t }\r\n\t };\r\n\t GameView.prototype.gotoMaxLength = function () {\r\n\t if (this.schedule) {\r\n\t clearInterval(this.schedule);\r\n\t }\r\n\t this.progressbarImg.x = this.teaFullFlagImg.width / 2;\r\n\t this.teaHalfFlagImg.visible = false;\r\n\t this.teaFullFlagImg.visible = !this.teaHalfFlagImg.visible;\r\n\t this.addOneSvga.visible = this.teaHalfFlagImg.visible;\r\n\t this.addOneSvga.stop();\r\n\t };\r\n\t GameView.prototype.updateTeaPercentage = function (teaPercentage) {\r\n\t if (teaPercentage === void 0) { teaPercentage = 0; }\r\n\t if (!this.basketLevel)\r\n\t this.basketLevel = 0;\r\n\t var pickTeaSVGA = this.basketSvgaGroup[this.basketLevel];\r\n\t var templength = pickTeaSVGA.children.length;\r\n\t if (this.allFrames < templength)\r\n\t pickTeaSVGA.removeChildAt(10);\r\n\t var originframes = pickTeaSVGA.children[7];\r\n\t if (!originframes) {\r\n\t return;\r\n\t }\r\n\t var teaBucketframes = JSON.parse(JSON.stringify(originframes.frames));\r\n\t if (teaPercentage == 1) {\r\n\t this.teaHalfImg = new engine.Image(getTextureByName('茶叶-少'));\r\n\t }\r\n\t else if (teaPercentage == 2) {\r\n\t this.teaHalfImg = new engine.Image(getTextureByName('茶叶-满'));\r\n\t }\r\n\t this.teaHalfImg.visible = false;\r\n\t this.teaHalfImg['frames'] = teaBucketframes;\r\n\t pickTeaSVGA.addChildAt(this.teaHalfImg, 10);\r\n\t };\r\n\t GameView.prototype.setPickTeaLevel = function (level) {\r\n\t var _this = this;\r\n\t this.basketLevel = level;\r\n\t var pickTeaSVGA = this.basketSvgaGroup[level];\r\n\t pickTeaSVGA.visible = true;\r\n\t console.log('总共有多少', pickTeaSVGA.children.length);\r\n\t setTimeout(function () {\r\n\t var originframes = pickTeaSVGA.children[7];\r\n\t _this.teaHalfImg.visible = true;\r\n\t var teaBucketframes = JSON.parse(JSON.stringify(originframes.frames));\r\n\t if (_this.teaHalfImg) {\r\n\t _this.teaHalfImg['frames'] = teaBucketframes;\r\n\t }\r\n\t showLog(_this.teaHalfImg);\r\n\t pickTeaSVGA.addChildAt(_this.teaHalfImg, 10);\r\n\t pickTeaSVGA.gotoAndPlay(1, true);\r\n\t }, 300);\r\n\t };\r\n\t GameView.prototype.handGrasp = function () {\r\n\t var that = this;\r\n\t this.updateTeaPercentage(0);\r\n\t setTimeout(function () {\r\n\t engine.Tween.get(that.handGraspSvga)\r\n\t .to({ x: props.handGraspMovePos[0], y: props.handGraspMovePos[1] }, 400).call(function () {\r\n\t that.handGraspSvga.play(1, true);\r\n\t setTimeout(function () {\r\n\t that.handGraspSvga.stop();\r\n\t that.handGraspSvga.x = props.handGraspSvgaPos[0];\r\n\t that.handGraspSvga.y = props.handGraspSvgaPos[1];\r\n\t }, 600);\r\n\t that.pickTeaSvga.visible = true;\r\n\t playSound('采茶叶');\r\n\t that.teaHalfImg.source = '';\r\n\t that.pickTeaSvga.play(1, false);\r\n\t });\r\n\t that.pickTeaSvga.addEventListener(engine.Event.END_FRAME, function () {\r\n\t that.teaSkyUpSvga.visible = true;\r\n\t playSound('茶叶飞起');\r\n\t that.teaSkyUpSvga.play(1, false);\r\n\t });\r\n\t that.teaSkyUpSvga.addEventListener(engine.Event.END_FRAME, function () {\r\n\t that.teaSkyUpSvga.visible = false;\r\n\t console.log('茶叶初始化');\r\n\t });\r\n\t }, 500);\r\n\t };\r\n\t return GameView;\r\n\t}(engine.Container));\n\n\tvar GameWrapper = (function (_super) {\r\n\t tslib.__extends(GameWrapper, _super);\r\n\t function GameWrapper() {\r\n\t var _this = _super.call(this) || this;\r\n\t engine.globalEvent.addEventListener('event-pickTeaGame-init', _this.reset, _this);\r\n\t engine.globalEvent.addEventListener('event-hand-grasp', _this.handGrasp, _this);\r\n\t engine.globalEvent.addEventListener('event-getClick-person', _this.clickPerson, _this);\r\n\t engine.globalEvent.addEventListener('event-getchange-TeaNum', _this.setTeaNum, _this);\r\n\t engine.globalEvent.addEventListener('event-getBasket-Type', _this.setPickTeaLevel, _this);\r\n\t var gameView = _this._gameView = new GameView();\r\n\t _this.addChild(gameView);\r\n\t return _this;\r\n\t }\r\n\t GameWrapper.prototype.setTeaNum = function (event) {\r\n\t injectProps(event.data);\r\n\t this._gameView.setTeaNum(event.data);\r\n\t };\r\n\t GameWrapper.prototype.setPickTeaLevel = function (event) {\r\n\t injectProps(event.data);\r\n\t this._gameView.setPickTeaLevel(event.data);\r\n\t };\r\n\t GameWrapper.prototype.handGrasp = function () {\r\n\t this._gameView.handGrasp();\r\n\t };\r\n\t GameWrapper.prototype.clickPerson = function () {\r\n\t this._gameView.showVerse();\r\n\t };\r\n\t GameWrapper.prototype.reset = function (event) {\r\n\t injectProps(event.data);\r\n\t this._gameView.visible = true;\r\n\t this._gameView.reset();\r\n\t };\r\n\t GameWrapper.prototype.start = function (event) {\r\n\t injectProps(event.data);\r\n\t this._status = 1;\r\n\t this._gameView.start();\r\n\t };\r\n\t GameWrapper.prototype.pause = function () {\r\n\t this._gameView.pause();\r\n\t };\r\n\t GameWrapper.prototype.resume = function () {\r\n\t this._gameView.resume();\r\n\t };\r\n\t GameWrapper.prototype.revive = function () {\r\n\t this._gameView.revive();\r\n\t };\r\n\t GameWrapper.prototype.clear = function () {\r\n\t this._gameView.visible = false;\r\n\t };\r\n\t GameWrapper.prototype.onTap = function (event) {\r\n\t };\r\n\t return GameWrapper;\r\n\t}(engine.Container));\n\n\tfunction index (props) {\r\n\t prepareProps();\r\n\t injectProps(props);\r\n\t var instance = new GameWrapper();\r\n\t return instance;\r\n\t}\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['pick-tea'] = factory(global.tslib));\n}(this, (function (tslib) { 'use strict';\n\n\tvar props = {};\r\n\tfunction prepareProps() {\r\n\t var metaProps = getProps();\r\n\t engine.injectProp(props, metaProps);\r\n\t}\r\n\tfunction injectProps(p) {\r\n\t engine.injectProp(props, p);\r\n\t}\r\n\t//# sourceMappingURL=props.js.map\n\n\tfunction getTexture(uuid) {\r\n\t return engine.Texture.from(getAssetByUUID(uuid).uuid);\r\n\t}\r\n\tfunction getTextureByName(name) {\r\n\t return getTexture(engine.getAssetByName(name).uuid);\r\n\t}\r\n\tfunction playSound(name) {\r\n\t engine.playSound(engine.getAssetByName(name).uuid, { keep: true });\r\n\t}\r\n\tfunction createSvga(name, anchorName) {\r\n\t var inst = new svga.Svga();\r\n\t inst.source = 'asset://' + engine.getAssetByName(name).uuid;\r\n\t return inst;\r\n\t}\r\n\tfunction showLog(abjname, obj) {\r\n\t}\r\n\t//# sourceMappingURL=utils.js.map\n\n\tvar GameView = (function (_super) {\r\n\t tslib.__extends(GameView, _super);\r\n\t function GameView() {\r\n\t var _this = _super.call(this) || this;\r\n\t _this.nowPercentage = 0;\r\n\t _this.goodsItems = [];\r\n\t _this._touchEnabled = true;\r\n\t _this.once(engine.Event.ADDED_TO_STAGE, _this.setup, _this);\r\n\t return _this;\r\n\t }\r\n\t GameView.prototype.setup = function () {\r\n\t if (this._hasSetup) {\r\n\t return;\r\n\t }\r\n\t this._hasSetup = true;\r\n\t this.pickTeaBg = new engine.Container();\r\n\t this.basketLevel = null;\r\n\t this.addChild(this.pickTeaBg);\r\n\t this.teaHalfImg = new engine.Image();\r\n\t this.paperBasketSvga = createSvga(\"采茶童-纸篮子\");\r\n\t this.clothBasketSvga = createSvga(\"采茶童-布篮子\");\r\n\t this.bambooBasketSvga = createSvga(\"采茶童-竹编篮\");\r\n\t this.woodBasketSvga = createSvga(\"采茶童-木篮子\");\r\n\t this.addOneSvga = createSvga(\"+1\");\r\n\t this.pickTeaSvga = createSvga(\"采茶叶\");\r\n\t this.teaSkyUpSvga = createSvga(\"茶叶向上飞\");\r\n\t this.handGraspSvga = createSvga(\"手抓去\");\r\n\t this.frontImg = new engine.Image(getTextureByName('前景'));\r\n\t this.pickTeaBg.addChild(this.paperBasketSvga);\r\n\t this.pickTeaBg.addChild(this.clothBasketSvga);\r\n\t this.pickTeaBg.addChild(this.bambooBasketSvga);\r\n\t this.pickTeaBg.addChild(this.woodBasketSvga);\r\n\t this.pickTeaBg.addChild(this.pickTeaSvga);\r\n\t this.pickTeaBg.addChild(this.teaSkyUpSvga);\r\n\t this.basketSvgaGroup = [this.paperBasketSvga, this.clothBasketSvga, this.bambooBasketSvga, this.woodBasketSvga];\r\n\t this.progressbarBgImg = new engine.Image(getTextureByName('进度条底框'));\r\n\t this.progressbarImg = new engine.Image(getTextureByName('进度'));\r\n\t this.teaHalfFlagImg = new engine.Image(getTextureByName('茶叶进度缺'));\r\n\t this.teaFullFlagImg = new engine.Image(getTextureByName('茶叶进度满'));\r\n\t this.teaStarImg = new engine.Image(getTextureByName('小茶叶'));\r\n\t this.handGraspBgImg = new engine.Image(getTextureByName('茶叶收取底图'));\r\n\t this.verseImg = new engine.Image(getTextureByName('气泡框'));\r\n\t this.pickTeaBg.addChild(this.verseImg);\r\n\t var mask = new engine.Rect();\r\n\t mask.width = 600;\r\n\t mask.height = 50;\r\n\t mask.x = 10;\r\n\t mask.y = 0;\r\n\t mask.alpha = 1;\r\n\t this.progressbarImg.mask = mask;\r\n\t showLog(this.progressbarImg.mask);\r\n\t this.addChild(this.frontImg);\r\n\t this.progressbarBgImg.addChild(this.progressbarImg);\r\n\t this.progressbarBgImg.addChild(mask);\r\n\t this.progressbarBgImg.addChild(this.addOneSvga);\r\n\t this.progressbarBgImg.addChild(this.handGraspBgImg);\r\n\t this.handGraspBgImg.addChild(this.handGraspSvga);\r\n\t this.progressbarBgImg.addChild(this.teaHalfFlagImg);\r\n\t this.progressbarBgImg.addChild(this.teaFullFlagImg);\r\n\t this.progressbarBgImg.addChild(this.teaStarImg);\r\n\t this.pickTeaCount = new engine.Label();\r\n\t this.progressbarBgImg.addChild(this.pickTeaCount);\r\n\t this.addChild(this.progressbarBgImg);\r\n\t this.initView();\r\n\t };\r\n\t GameView.prototype.reset = function () {\r\n\t this.initView();\r\n\t };\r\n\t GameView.prototype.start = function () {\r\n\t };\r\n\t GameView.prototype.pause = function () {\r\n\t this.gameIng = false;\r\n\t };\r\n\t GameView.prototype.revive = function () {\r\n\t this.gameIng = true;\r\n\t };\r\n\t GameView.prototype.resume = function () {\r\n\t this.reset();\r\n\t this.start();\r\n\t };\r\n\t GameView.prototype.initView = function () {\r\n\t this.pickTeaBg.mouseEnabled = false;\r\n\t this.teaHalfImg.visible = false;\r\n\t this.pickTeaSvga.visible = false;\r\n\t this.teaSkyUpSvga.visible = false;\r\n\t this.verseImg.visible = false;\r\n\t this.frontImg.visible = props.showFrontImg == 1;\r\n\t this.initChildrenPos();\r\n\t };\r\n\t GameView.prototype.initChildrenPos = function () {\r\n\t for (var i = 0; i < this.basketSvgaGroup.length; i++) {\r\n\t this.basketSvgaGroup[i].visible = false;\r\n\t this.basketSvgaGroup[i].x = props.basketSvgaPos[0];\r\n\t this.basketSvgaGroup[i].y = props.basketSvgaPos[1];\r\n\t }\r\n\t var pickTeaSVGA = this.basketSvgaGroup[0];\r\n\t this.allFrames = pickTeaSVGA.children.length;\r\n\t this.verseImg.x = props.versePos[0];\r\n\t this.verseImg.y = props.versePos[1];\r\n\t this.addOneSvga.x = props.addOneSvgaPos[0];\r\n\t this.addOneSvga.y = props.addOneSvgaPos[1];\r\n\t this.pickTeaSvga.x = props.pickTeaSvgaPos[0];\r\n\t this.pickTeaSvga.y = props.pickTeaSvgaPos[1];\r\n\t this.teaSkyUpSvga.x = props.teaSkyUpSvgaPos[0];\r\n\t this.teaSkyUpSvga.y = props.teaSkyUpSvgaPos[1];\r\n\t this.handGraspSvga.x = props.handGraspSvgaPos[0];\r\n\t this.handGraspSvga.y = props.handGraspSvgaPos[1];\r\n\t this.handGraspBgImg.x = props.handGraspBgImgPos[0];\r\n\t this.handGraspBgImg.y = props.handGraspBgImgPos[1];\r\n\t this.progressbarBgImg.x = props.progressbarBgImgPos[0];\r\n\t this.progressbarBgImg.y = props.progressbarBgImgPos[1];\r\n\t this.progressbarImg.x = props.progressbarImgPos[0];\r\n\t this.progressbarImg.y = props.progressbarImgPos[1];\r\n\t this.teaHalfFlagImg.x = props.teaHalfFlagImgPos[0];\r\n\t this.teaHalfFlagImg.y = props.teaHalfFlagImgPos[1];\r\n\t this.teaHalfFlagImg.anchorX = this.teaHalfFlagImg.width / 2;\r\n\t this.teaHalfFlagImg.anchorY = this.teaHalfFlagImg.height / 2;\r\n\t this.teaFullFlagImg.x = props.teaHalfFlagImgPos[0];\r\n\t this.teaFullFlagImg.y = props.teaHalfFlagImgPos[1];\r\n\t this.frontImg.x = props.FrontImgPos[0];\r\n\t this.frontImg.y = props.FrontImgPos[1];\r\n\t this.teaFullFlagImg.visible = false;\r\n\t this.teaStarImg.x = props.teaStarImgPos[0];\r\n\t this.teaStarImg.y = props.teaStarImgPos[1];\r\n\t this.pickTeaCount.fillColor = 'white';\r\n\t this.pickTeaCount.size = 30;\r\n\t this.pickTeaCount.text = '';\r\n\t this.pickTeaCount.x = props.pickTeaCountPos[0];\r\n\t this.pickTeaCount.y = props.pickTeaCountPos[1];\r\n\t this.pickTeaCount.height = 50;\r\n\t this.pickTeaCount.width = 200;\r\n\t this.verseLabel = new engine.TextField();\r\n\t this.verseLabel.size = props.verseLabel[2];\r\n\t this.verseLabel.text = '';\r\n\t this.verseLabel.fillColor = props.verseColor[0];\r\n\t this.verseLabel.height = props.verseLabel[1];\r\n\t this.verseLabel.width = props.verseLabel[0];\r\n\t this.verseLabel.strokeColor = props.verseColor[1];\r\n\t this.verseLabel.stroke = 0.5;\r\n\t this.verseLabel.y = 15;\r\n\t this.verseLabel['textHeight'] = 14;\r\n\t this.verseLabel.textAlign = engine.TEXT_ALIGN.CENTER;\r\n\t this.verseImg.visible = false;\r\n\t this.verseImg.addChild(this.verseLabel);\r\n\t };\r\n\t GameView.prototype.showVerse = function () {\r\n\t var _this = this;\r\n\t this.verseImg.visible = true;\r\n\t var len = props.verses.length;\r\n\t var random = Math.floor(Math.random() * len);\r\n\t var verse = props.verses[random];\r\n\t this.verseLabel.text = verse;\r\n\t var y = this.verseImg.y;\r\n\t engine.Tween.get(this.verseImg)\r\n\t .to({ alpha: 0 }, 3000).call(function () {\r\n\t _this.verseImg.visible = false;\r\n\t _this.verseImg.alpha = 1;\r\n\t });\r\n\t };\r\n\t GameView.prototype.setTeaNum = function (TeaNums) {\r\n\t var _this = this;\r\n\t if (this.schedule) {\r\n\t clearInterval(this.schedule);\r\n\t }\r\n\t var totalNum = TeaNums.totalNum;\r\n\t var nowNum = TeaNums.nowNum;\r\n\t this.getTeaPercentage(nowNum, totalNum);\r\n\t var surplus = nowNum - totalNum;\r\n\t if (surplus == 0) {\r\n\t this.gotoMaxLength();\r\n\t return;\r\n\t }\r\n\t var width = this.progressbarImg.width;\r\n\t var myDate = new Date();\r\n\t var nowData = myDate.getTime();\r\n\t var serverData = TeaNums.serverData;\r\n\t var fbdvalue = Math.abs((nowData - serverData));\r\n\t var dataDiff = 0;\r\n\t var x = -width * (1 - (nowNum / totalNum));\r\n\t showLog('原先的X:', this.progressbarImg.x);\r\n\t this.progressbarImg.x = parseFloat(x.toFixed(5)) + this.teaFullFlagImg.width - Math.abs(this.teaFullFlagImg.x);\r\n\t showLog('减去长款的x', this.progressbarImg.x);\r\n\t showLog('this.teaFullFlagImg.width', this.teaFullFlagImg.width);\r\n\t if (this.progressbarImg.x > (this.teaFullFlagImg.width / 2)) {\r\n\t var minus = this.teaFullFlagImg.width - Math.abs(this.teaFullFlagImg.x) - this.progressbarImg.x;\r\n\t this.progressbarImg.x = this.progressbarImg.x - this.teaFullFlagImg.width / 2 + Math.abs(this.teaFullFlagImg.x);\r\n\t showLog('负段x重组', this.progressbarImg.x);\r\n\t }\r\n\t showLog('补宽的X', this.progressbarImg.x);\r\n\t showLog('this.progressbarImg.x', this.progressbarImg.x);\r\n\t var step = (this.teaFullFlagImg.width / 2 - this.progressbarImg.x) / surplus;\r\n\t var speed = props.pickTeaSpeed;\r\n\t if (!this.teaFullRotation) {\r\n\t this.teaFullRotation = engine.Tween.get(this.teaHalfFlagImg, { loop: true })\r\n\t .to({ rotation: 360 }, speed).call(function () {\r\n\t _this.teaHalfFlagImg.rotation = 0;\r\n\t });\r\n\t }\r\n\t this.teaHalfFlagImg.visible = true;\r\n\t this.teaFullFlagImg.visible = !this.teaHalfFlagImg.visible;\r\n\t this.addOneSvga.visible = this.teaHalfFlagImg.visible;\r\n\t engine.Tween.resumeTweens(this.teaFullRotation);\r\n\t this.schedule = setInterval(function () {\r\n\t nowNum++;\r\n\t _this.addOneSvga.play(1, true);\r\n\t if (nowNum == totalNum) {\r\n\t _this.gotoMaxLength();\r\n\t _this.getTeaPercentage(nowNum, totalNum);\r\n\t engine.Tween.pauseTweens(_this.teaFullRotation);\r\n\t return;\r\n\t }\r\n\t if (_this.progressbarImg.x < _this.teaFullFlagImg.width / 2) {\r\n\t _this.progressbarImg.x -= step;\r\n\t }\r\n\t _this.getTeaPercentage(nowNum, totalNum);\r\n\t dataDiff += speed;\r\n\t myDate = new Date();\r\n\t nowData = myDate.getTime();\r\n\t if (Math.abs((nowData - serverData)) - dataDiff > (fbdvalue + 3000)) {\r\n\t showLog(_this.schedule);\r\n\t clearInterval(_this.schedule);\r\n\t engine.Tween.pauseTweens(_this.teaFullRotation);\r\n\t engine.globalEvent.dispatchEvent('event-setchange-TeaNum');\r\n\t _this.addOneSvga.visible = false;\r\n\t _this.addOneSvga.stop();\r\n\t return;\r\n\t }\r\n\t }, speed);\r\n\t };\r\n\t GameView.prototype.getTeaPercentage = function (nowNum, totalNum) {\r\n\t if (nowNum > totalNum) {\r\n\t return;\r\n\t }\r\n\t this.pickTeaCount.text = nowNum + '/' + totalNum;\r\n\t var teaPercentage = 2;\r\n\t var portion = totalNum / 3;\r\n\t if (nowNum < portion) {\r\n\t return;\r\n\t }\r\n\t if (nowNum < (portion * 2)) {\r\n\t teaPercentage = 1;\r\n\t }\r\n\t if (this.nowPercentage != teaPercentage) {\r\n\t this.nowPercentage = teaPercentage;\r\n\t this.updateTeaPercentage(teaPercentage);\r\n\t }\r\n\t };\r\n\t GameView.prototype.gotoMaxLength = function () {\r\n\t if (this.schedule) {\r\n\t clearInterval(this.schedule);\r\n\t }\r\n\t this.progressbarImg.x = this.teaFullFlagImg.width / 2;\r\n\t this.teaHalfFlagImg.visible = false;\r\n\t this.teaFullFlagImg.visible = !this.teaHalfFlagImg.visible;\r\n\t this.addOneSvga.visible = this.teaHalfFlagImg.visible;\r\n\t this.addOneSvga.stop();\r\n\t };\r\n\t GameView.prototype.updateTeaPercentage = function (teaPercentage) {\r\n\t if (teaPercentage === void 0) { teaPercentage = 0; }\r\n\t if (!this.basketLevel)\r\n\t this.basketLevel = 0;\r\n\t var pickTeaSVGA = this.basketSvgaGroup[this.basketLevel];\r\n\t var templength = pickTeaSVGA.children.length;\r\n\t if (this.allFrames < templength) {\r\n\t pickTeaSVGA.removeChildAt(10);\r\n\t }\r\n\t var originframes = pickTeaSVGA.children[7];\r\n\t if (!originframes) {\r\n\t return;\r\n\t }\r\n\t var teaBucketframes = JSON.parse(JSON.stringify(originframes.frames));\r\n\t if (teaPercentage == 1) {\r\n\t this.teaHalfImg = new engine.Image(getTextureByName('茶叶-少'));\r\n\t }\r\n\t else if (teaPercentage == 2) {\r\n\t this.teaHalfImg = new engine.Image(getTextureByName('茶叶-满'));\r\n\t }\r\n\t this.teaHalfImg.visible = false;\r\n\t this.teaHalfImg['frames'] = teaBucketframes;\r\n\t pickTeaSVGA.addChildAt(this.teaHalfImg, 10);\r\n\t };\r\n\t GameView.prototype.setPickTeaLevel = function (level) {\r\n\t this.basketLevel = level;\r\n\t var pickTeaSVGA = this.basketSvgaGroup[level];\r\n\t pickTeaSVGA.visible = true;\r\n\t var originframes = pickTeaSVGA.children[7];\r\n\t this.teaHalfImg.visible = true;\r\n\t var teaBucketframes = JSON.parse(JSON.stringify(originframes.frames));\r\n\t if (this.teaHalfImg) {\r\n\t this.teaHalfImg['frames'] = teaBucketframes;\r\n\t }\r\n\t showLog(this.teaHalfImg);\r\n\t pickTeaSVGA.addChildAt(this.teaHalfImg, 10);\r\n\t pickTeaSVGA.gotoAndPlay(1, true);\r\n\t };\r\n\t GameView.prototype.handGrasp = function () {\r\n\t var that = this;\r\n\t this.updateTeaPercentage(0);\r\n\t setTimeout(function () {\r\n\t engine.Tween.get(that.handGraspSvga)\r\n\t .to({ x: props.handGraspMovePos[0], y: props.handGraspMovePos[1] }, 400).call(function () {\r\n\t that.handGraspSvga.play(1, true);\r\n\t setTimeout(function () {\r\n\t that.handGraspSvga.stop();\r\n\t that.handGraspSvga.x = props.handGraspSvgaPos[0];\r\n\t that.handGraspSvga.y = props.handGraspSvgaPos[1];\r\n\t }, 600);\r\n\t that.pickTeaSvga.visible = true;\r\n\t playSound('采茶叶');\r\n\t that.teaHalfImg.source = '';\r\n\t that.pickTeaSvga.play(1, false);\r\n\t });\r\n\t that.pickTeaSvga.addEventListener(engine.Event.END_FRAME, function () {\r\n\t that.teaSkyUpSvga.visible = true;\r\n\t playSound('茶叶飞起');\r\n\t that.teaSkyUpSvga.play(1, false);\r\n\t });\r\n\t that.teaSkyUpSvga.addEventListener(engine.Event.END_FRAME, function () {\r\n\t that.teaSkyUpSvga.visible = false;\r\n\t console.log('茶叶初始化');\r\n\t });\r\n\t }, 500);\r\n\t };\r\n\t return GameView;\r\n\t}(engine.Container));\n\n\tvar GameWrapper = (function (_super) {\r\n\t tslib.__extends(GameWrapper, _super);\r\n\t function GameWrapper() {\r\n\t var _this = _super.call(this) || this;\r\n\t engine.globalEvent.addEventListener('event-pickTeaGame-init', _this.reset, _this);\r\n\t engine.globalEvent.addEventListener('event-hand-grasp', _this.handGrasp, _this);\r\n\t engine.globalEvent.addEventListener('event-getClick-person', _this.clickPerson, _this);\r\n\t engine.globalEvent.addEventListener('event-getchange-TeaNum', _this.setTeaNum, _this);\r\n\t engine.globalEvent.addEventListener('event-getBasket-Type', _this.setPickTeaLevel, _this);\r\n\t var gameView = _this._gameView = new GameView();\r\n\t _this.addChild(gameView);\r\n\t return _this;\r\n\t }\r\n\t GameWrapper.prototype.setTeaNum = function (event) {\r\n\t injectProps(event.data);\r\n\t this._gameView.setTeaNum(event.data);\r\n\t };\r\n\t GameWrapper.prototype.setPickTeaLevel = function (event) {\r\n\t injectProps(event.data);\r\n\t this._gameView.setPickTeaLevel(event.data);\r\n\t };\r\n\t GameWrapper.prototype.handGrasp = function () {\r\n\t this._gameView.handGrasp();\r\n\t };\r\n\t GameWrapper.prototype.clickPerson = function () {\r\n\t this._gameView.showVerse();\r\n\t };\r\n\t GameWrapper.prototype.reset = function (event) {\r\n\t injectProps(event.data);\r\n\t this._gameView.visible = true;\r\n\t this._gameView.reset();\r\n\t };\r\n\t GameWrapper.prototype.start = function (event) {\r\n\t injectProps(event.data);\r\n\t this._status = 1;\r\n\t this._gameView.start();\r\n\t };\r\n\t GameWrapper.prototype.pause = function () {\r\n\t this._gameView.pause();\r\n\t };\r\n\t GameWrapper.prototype.resume = function () {\r\n\t this._gameView.resume();\r\n\t };\r\n\t GameWrapper.prototype.revive = function () {\r\n\t this._gameView.revive();\r\n\t };\r\n\t GameWrapper.prototype.clear = function () {\r\n\t this._gameView.visible = false;\r\n\t };\r\n\t GameWrapper.prototype.onTap = function (event) {\r\n\t };\r\n\t return GameWrapper;\r\n\t}(engine.Container));\r\n\t//# sourceMappingURL=GameWrapper.js.map\n\n\tfunction index (props) {\r\n\t prepareProps();\r\n\t injectProps(props);\r\n\t var instance = new GameWrapper();\r\n\t return instance;\r\n\t}\r\n\t//# sourceMappingURL=index.js.map\n\n\treturn index;\n\n})));\n"
}
......@@ -12,6 +12,7 @@
function injectProps(p) {
engine.injectProp(props, p);
}
//# sourceMappingURL=props.js.map
function getTexture(uuid) {
return engine.Texture.from(getAssetByUUID(uuid).uuid);
......@@ -29,6 +30,7 @@
}
function showLog(abjname, obj) {
}
//# sourceMappingURL=utils.js.map
var GameView = (function (_super) {
tslib.__extends(GameView, _super);
......@@ -293,8 +295,9 @@
this.basketLevel = 0;
var pickTeaSVGA = this.basketSvgaGroup[this.basketLevel];
var templength = pickTeaSVGA.children.length;
if (this.allFrames < templength)
if (this.allFrames < templength) {
pickTeaSVGA.removeChildAt(10);
}
var originframes = pickTeaSVGA.children[7];
if (!originframes) {
return;
......@@ -311,22 +314,18 @@
pickTeaSVGA.addChildAt(this.teaHalfImg, 10);
};
GameView.prototype.setPickTeaLevel = function (level) {
var _this = this;
this.basketLevel = level;
var pickTeaSVGA = this.basketSvgaGroup[level];
pickTeaSVGA.visible = true;
console.log('总共有多少', pickTeaSVGA.children.length);
setTimeout(function () {
var originframes = pickTeaSVGA.children[7];
_this.teaHalfImg.visible = true;
this.teaHalfImg.visible = true;
var teaBucketframes = JSON.parse(JSON.stringify(originframes.frames));
if (_this.teaHalfImg) {
_this.teaHalfImg['frames'] = teaBucketframes;
if (this.teaHalfImg) {
this.teaHalfImg['frames'] = teaBucketframes;
}
showLog(_this.teaHalfImg);
pickTeaSVGA.addChildAt(_this.teaHalfImg, 10);
showLog(this.teaHalfImg);
pickTeaSVGA.addChildAt(this.teaHalfImg, 10);
pickTeaSVGA.gotoAndPlay(1, true);
}, 300);
};
GameView.prototype.handGrasp = function () {
var that = this;
......@@ -412,6 +411,7 @@
};
return GameWrapper;
}(engine.Container));
//# sourceMappingURL=GameWrapper.js.map
function index (props) {
prepareProps();
......@@ -419,6 +419,7 @@
var instance = new GameWrapper();
return instance;
}
//# sourceMappingURL=index.js.map
return index;
......
{"version":3,"file":"index.js","sources":["src/custom/pick-tea/src/props.ts","src/custom/pick-tea/src/game/utils.ts","src/custom/pick-tea/src/game/GameView.ts","src/custom/pick-tea/src/game/GameWrapper.ts","src/custom/pick-tea/src/index.ts"],"sourcesContent":["/**\r\n * Created by rockyl on 2020-01-21.\r\n */\r\n\r\nexport let props: any = {};\r\n\r\nexport function prepareProps() {\r\n\tlet metaProps = getProps();\r\n\r\n\tengine.injectProp(props, metaProps);\r\n}\r\n\r\nexport function injectProps(p) {\r\n\tengine.injectProp(props, p);\r\n}\r\n","/**\r\n * Created by rockyl on 2020-01-21.\r\n */\r\nconst showlog = false;\r\nexport function getTexture(uuid) {\r\n\treturn engine.Texture.from(getAssetByUUID(uuid).uuid);\r\n}\r\n\r\nexport function getTextureByName(name) {\r\n\treturn getTexture(engine.getAssetByName(name).uuid);\r\n}\r\n\r\nexport function playSound(name) {\r\n\t//console.log('playSound', name)\r\n\tengine.playSound(engine.getAssetByName(name).uuid, { keep: true });\r\n}\r\nexport function createSvga(name, anchorName?) {\r\n\tlet inst = new svga.Svga();\r\n\tinst.source = 'asset://' + engine.getAssetByName(name).uuid;\r\n\treturn inst;\r\n}\r\nexport function showLog(abjname, obj?) {\r\n\tif (showlog) {\r\n\t\tconsole.log(abjname)\r\n\t\tif (obj)\r\n\t\t\tconsole.log(obj)\r\n\t}\r\n\t// let inst = new svga.Svga();\r\n\t// inst.source = 'asset://' + engine.getAssetByName(name).uuid;\r\n\t// return inst;\r\n}","/**\r\n * Created by rockyl on 2018/8/16.\r\n */\r\n\r\nimport { props } from \"../props\";\r\nimport { playSound, createSvga } from \"./utils\";\r\nimport ObjectPool = engine.ObjectPool;\r\nimport { getTextureByName } from \"./utils\";\r\nimport { showLog } from \"./utils\";\r\nimport { Tealeaf } from \"./Tealeaf\";\r\n\r\n\r\nconst MAXX = -8;\r\nexport default class GameView extends engine.Container {\r\n\r\n\tprivate _hasSetup;\r\n\r\n\t/**采茶叶自定义模块*/\r\n\tprivate teaImgSource: any;\r\n\tprivate tealeaf: Tealeaf;\r\n\tprivate teaHalfImg: engine.Image;\r\n\tprivate nowPercentage: any = 0;\r\n\tprivate progressbarBgImg: engine.Image;\r\n\tprivate progressbarImg: engine.Image;\r\n\tprivate teaFullFlagImg: engine.Image;\r\n\tprivate teaHalfFlagImg: engine.Image;\r\n\tprivate teaStarImg: engine.Image;\r\n\tprivate frontImg: engine.Image;\r\n\tprivate verseImg: engine.Image;\r\n\tprivate handGraspBgImg: engine.Image;\r\n\t//采茶背景层\r\n\tprivate pickTeaBg: engine.Container;\r\n\t//采茶进度计时器\r\n\tprivate pickTeaTimer: any\r\n\t//茶叶的数量进度 100/240\r\n\tprivate pickTeaCount: engine.Label;\r\n\t//语句\r\n\tprivate verseLabel: engine.TextField;\r\n\t//篮子集合\r\n\tprivate basketSvgaGroup: any;\r\n\r\n\tprivate basketLevel: any;\r\n\t//纸篮子svga\r\n\tprivate paperBasketSvga\r\n\t//布篮子svga\r\n\tprivate clothBasketSvga\r\n\t//竹篮子svga\r\n\tprivate bambooBasketSvga\r\n\t//木篮子svga\r\n\tprivate woodBasketSvga\r\n\t//+1\r\n\tprivate addOneSvga\r\n\t//采茶叶\r\n\tprivate pickTeaSvga\r\n\t//茶叶向上飞\r\n\tprivate teaSkyUpSvga\r\n\t//手抓去\r\n\tprivate handGraspSvga\r\n\t//半缺旋转\r\n\tprivate teaFullRotation\r\n\r\n\tprivate allFrames;\r\n\t/**采茶叶自定义模块*/\r\n\r\n\t//玩家\r\n\tprivate player: engine.Container;\r\n\r\n\t//触摸层\r\n\tprivate rectBg: engine.Rect;\r\n\t//npc层\r\n\t//private NpcBg: engine.Container;\r\n\r\n\t//当前分数\r\n\tprivate score\r\n\t//游戏状态\r\n\tprivate gameIng;\r\n\t//npc出身计时器\r\n\tprivate timer\r\n\t//倒计时计时器\r\n\tprivate countdownTimer: any\r\n\t//倒计时\r\n\tprivate countdown: number\r\n\t//当前速度\r\n\tprivate speed: number\r\n\r\n\tprivate schedule: any\r\n\t// 当前场景上面的物品\r\n\tprivate goodsItems = []\r\n\r\n\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.once(engine.Event.ADDED_TO_STAGE, this.setup, this);\r\n\t}\r\n\r\n\tprivate waterSvga\r\n\tprivate boomSvga\r\n\tprivate playerSvga\r\n\tprivate _touchEnabled = true\r\n\tsetup() {\r\n\t\tif (this._hasSetup) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._hasSetup = true;\r\n\t\tthis.pickTeaBg = new engine.Container();\r\n\t\tthis.basketLevel = null;\r\n\t\t// let bgGroud = new engine.Image()\r\n\t\t// bgGroud.source = '//yun.duiba.com.cn/aurora/assets/a988c47db8d3131faad175c7c2944773392be643.png'\r\n\t\t// this.addChild(bgGroud);\r\n\r\n\t\tthis.addChild(this.pickTeaBg);\r\n\t\tthis.teaHalfImg = new engine.Image();\r\n\r\n\t\tthis.paperBasketSvga = createSvga(\"采茶童-纸篮子\");\r\n\t\tthis.clothBasketSvga = createSvga(\"采茶童-布篮子\");\r\n\t\tthis.bambooBasketSvga = createSvga(\"采茶童-竹编篮\");\r\n\t\tthis.woodBasketSvga = createSvga(\"采茶童-木篮子\");\r\n\t\tthis.addOneSvga = createSvga(\"+1\");\r\n\t\tthis.pickTeaSvga = createSvga(\"采茶叶\");\r\n\r\n\t\tthis.teaSkyUpSvga = createSvga(\"茶叶向上飞\");\r\n\t\tthis.handGraspSvga = createSvga(\"手抓去\");\r\n\r\n\t\tthis.frontImg = new engine.Image(getTextureByName('前景'));\r\n\r\n\t\tthis.pickTeaBg.addChild(this.paperBasketSvga);\r\n\t\tthis.pickTeaBg.addChild(this.clothBasketSvga);\r\n\t\tthis.pickTeaBg.addChild(this.bambooBasketSvga);\r\n\t\tthis.pickTeaBg.addChild(this.woodBasketSvga);\r\n\t\t//this.pickTeaBg.addChild(this.addOneSvga);\r\n\t\tthis.pickTeaBg.addChild(this.pickTeaSvga);\r\n\t\tthis.pickTeaBg.addChild(this.teaSkyUpSvga);\r\n\t\t//this.pickTeaBg.addChild(this.handGraspSvga);\r\n\t\tthis.basketSvgaGroup = [this.paperBasketSvga, this.clothBasketSvga, this.bambooBasketSvga, this.woodBasketSvga]\r\n\r\n\t\tthis.progressbarBgImg = new engine.Image(getTextureByName('进度条底框'));\r\n\t\tthis.progressbarImg = new engine.Image(getTextureByName('进度'));\r\n\t\tthis.teaHalfFlagImg = new engine.Image(getTextureByName('茶叶进度缺'));\r\n\t\tthis.teaFullFlagImg = new engine.Image(getTextureByName('茶叶进度满'));\r\n\t\tthis.teaStarImg = new engine.Image(getTextureByName('小茶叶'));\r\n\r\n\t\tthis.handGraspBgImg = new engine.Image(getTextureByName('茶叶收取底图'));\r\n\t\tthis.verseImg = new engine.Image(getTextureByName('气泡框'));\r\n\t\tthis.pickTeaBg.addChild(this.verseImg);\r\n\r\n\r\n\t\tlet mask = new engine.Rect();\r\n\t\tmask.width = 600;\r\n\t\tmask.height = 50;\r\n\t\tmask.x = 10;\r\n\t\tmask.y = 0;\r\n\t\tmask.alpha = 1;\r\n\r\n\t\tthis.progressbarImg.mask = mask\r\n\t\tshowLog(this.progressbarImg.mask)\r\n\r\n\t\tthis.addChild(this.frontImg);\r\n\r\n\t\tthis.progressbarBgImg.addChild(this.progressbarImg);\r\n\r\n\t\tthis.progressbarBgImg.addChild(mask);\r\n\t\tshowLog('遮罩坐标')\r\n\t\tshowLog(mask.x, mask.y)\r\n\t\tthis.progressbarBgImg.addChild(this.addOneSvga);\r\n\r\n\t\tthis.progressbarBgImg.addChild(this.handGraspBgImg);\r\n\r\n\t\tthis.handGraspBgImg.addChild(this.handGraspSvga);\r\n\r\n\t\tthis.progressbarBgImg.addChild(this.teaHalfFlagImg);\r\n\t\tthis.progressbarBgImg.addChild(this.teaFullFlagImg);\r\n\t\tthis.progressbarBgImg.addChild(this.teaStarImg);\r\n\t\tthis.pickTeaCount = new engine.Label();\r\n\t\tthis.progressbarBgImg.addChild(this.pickTeaCount);\r\n\r\n\t\tthis.addChild(this.progressbarBgImg);\r\n\t\tthis.initView();\r\n\r\n\t\t// setTimeout(() => {\r\n\t\t// \tthis.setPickTeaLevel(1)\r\n\t\t// \tthis.setTeaNum({ totalNum: 10, nowNum: 0, serverData: 1585290768011 })\r\n\t\t// \t//this.setTeaNum({ totalNum: 100, nowNum: 0 })\r\n\t\t// }, 500)\r\n\t\t// setTimeout(() => {\r\n\t\t// \tthis.handGrasp();\r\n\r\n\t\t// \tthis.setTeaNum({ totalNum: 10, nowNum: 0, serverData: 1585290768011 })\r\n\r\n\t\t// }, 12000)\r\n\t\t//playSound('采茶叶');\r\n\r\n\t}\r\n\treset() {\r\n\t\tthis.initView()\r\n\t}\r\n\tstart() {\r\n\r\n\t}\r\n\tpause() {\r\n\t\tthis.gameIng = false;\r\n\t}\r\n\trevive() {\r\n\t\tthis.gameIng = true;\r\n\t}\r\n\r\n\tresume() {\r\n\t\tthis.reset();\r\n\t\tthis.start()\r\n\t}\r\n\r\n\tinitView() {\r\n\t\tthis.pickTeaBg.mouseEnabled = false;\r\n\t\tthis.teaHalfImg.visible = false;\r\n\t\t//this.teaHalfImg.source = '';\r\n\t\tthis.pickTeaSvga.visible = false;\r\n\t\tthis.teaSkyUpSvga.visible = false;\r\n\t\tthis.verseImg.visible = false;\r\n\t\tthis.frontImg.visible = props.showFrontImg == 1;\r\n\t\tthis.initChildrenPos()\r\n\t}\r\n\tinitChildrenPos() {\r\n\t\tfor (let i = 0; i < this.basketSvgaGroup.length; i++) {\r\n\t\t\tthis.basketSvgaGroup[i].visible = false\r\n\t\t\tthis.basketSvgaGroup[i].x = props.basketSvgaPos[0];\r\n\t\t\tthis.basketSvgaGroup[i].y = props.basketSvgaPos[1];;\r\n\t\t\t//this.basketSvgaGroup[i].addEventListener(engine.MouseEvent.CLICK, this.showVerse, this);\r\n\t\t}\r\n\t\tlet pickTeaSVGA = this.basketSvgaGroup[0];\r\n\r\n\t\t//console.log('总共有多少',pickTeaSVGA.children.length)\r\n\t\tthis.allFrames = pickTeaSVGA.children.length;\r\n\r\n\t\tthis.verseImg.x = props.versePos[0]\r\n\t\tthis.verseImg.y = props.versePos[1]\r\n\t\tthis.addOneSvga.x = props.addOneSvgaPos[0]\r\n\t\tthis.addOneSvga.y = props.addOneSvgaPos[1];\r\n\t\tthis.pickTeaSvga.x = props.pickTeaSvgaPos[0];\r\n\t\tthis.pickTeaSvga.y = props.pickTeaSvgaPos[1];\r\n\r\n\t\tthis.teaSkyUpSvga.x = props.teaSkyUpSvgaPos[0];\r\n\t\tthis.teaSkyUpSvga.y = props.teaSkyUpSvgaPos[1];\r\n\r\n\t\tthis.handGraspSvga.x = props.handGraspSvgaPos[0];\r\n\t\tthis.handGraspSvga.y = props.handGraspSvgaPos[1];\r\n\r\n\t\tthis.handGraspBgImg.x = props.handGraspBgImgPos[0];\r\n\t\tthis.handGraspBgImg.y = props.handGraspBgImgPos[1];\r\n\r\n\t\tthis.progressbarBgImg.x = props.progressbarBgImgPos[0]\r\n\r\n\t\tthis.progressbarBgImg.y = props.progressbarBgImgPos[1]\r\n\r\n\t\tthis.progressbarImg.x = props.progressbarImgPos[0]\r\n\t\tthis.progressbarImg.y = props.progressbarImgPos[1]\r\n\r\n\t\tthis.teaHalfFlagImg.x = props.teaHalfFlagImgPos[0]\r\n\t\tthis.teaHalfFlagImg.y = props.teaHalfFlagImgPos[1]\r\n\t\tthis.teaHalfFlagImg.anchorX = this.teaHalfFlagImg.width / 2\r\n\t\tthis.teaHalfFlagImg.anchorY = this.teaHalfFlagImg.height / 2\r\n\r\n\t\tthis.teaFullFlagImg.x = props.teaHalfFlagImgPos[0]\r\n\t\tthis.teaFullFlagImg.y = props.teaHalfFlagImgPos[1]\r\n\r\n\t\tthis.frontImg.x = props.FrontImgPos[0]\r\n\t\tthis.frontImg.y = props.FrontImgPos[1]\r\n\r\n\t\tthis.teaFullFlagImg.visible = false;\r\n\r\n\t\tthis.teaStarImg.x = props.teaStarImgPos[0]\r\n\t\tthis.teaStarImg.y = props.teaStarImgPos[1]\r\n\r\n\t\tthis.pickTeaCount.fillColor = 'white';\r\n\t\tthis.pickTeaCount.size = 30;\r\n\t\tthis.pickTeaCount.text = ''\r\n\r\n\t\tthis.pickTeaCount.x = props.pickTeaCountPos[0]\r\n\t\tthis.pickTeaCount.y = props.pickTeaCountPos[1]\r\n\r\n\t\tthis.pickTeaCount.height = 50;\r\n\t\tthis.pickTeaCount.width = 200;\r\n\r\n\t\tthis.verseLabel = new engine.TextField();\r\n\t\tthis.verseLabel.size = props.verseLabel[2];\r\n\t\tthis.verseLabel.text = ''\r\n\t\tthis.verseLabel.fillColor = props.verseColor[0]\r\n\t\tthis.verseLabel.height = props.verseLabel[1];\r\n\t\tthis.verseLabel.width = props.verseLabel[0];\r\n\t\tthis.verseLabel.strokeColor = props.verseColor[1]\r\n\t\tthis.verseLabel.stroke = 0.5;\r\n\r\n\t\tthis.verseLabel.y = 15;\r\n\t\tthis.verseLabel['textHeight'] = 14;\r\n\t\tthis.verseLabel.textAlign = engine.TEXT_ALIGN.CENTER;\r\n\t\tthis.verseImg.visible = false;\r\n\t\tthis.verseImg.addChild(this.verseLabel);\r\n\r\n\t\t// label.x = (width - label.width) / 2;\r\n\t\t// label.y = guideHole.y + guideHole.height + 50;\r\n\t}\r\n\tshowVerse() {\r\n\t\tshowLog('显示诗句')\r\n\t\t// if (!this._touchEnabled) {\r\n\t\t// \treturn;\r\n\t\t// }\r\n\t\t//this._touchEnabled = false;\r\n\t\tthis.verseImg.visible = true;\r\n\t\tlet len = props.verses.length;\r\n\t\tlet random = Math.floor(Math.random() * len);\r\n\t\tshowLog('random', random)\r\n\t\tshowLog('props.verses')\r\n\t\tshowLog(props.verses)\r\n\t\tlet verse = props.verses[random];\r\n\t\tshowLog('verse', verse)\r\n\t\tthis.verseLabel.text = verse;\r\n\t\tlet y = this.verseImg.y\r\n\t\tengine.Tween.get(this.verseImg)\r\n\t\t\t.to({ alpha: 0 }, 3000).call(() => {\r\n\t\t\t\tthis.verseImg.visible = false;\r\n\t\t\t\tthis.verseImg.alpha = 1\r\n\t\t\t})\r\n\t};\r\n\t/*采茶叶活动*/\r\n\t//总量除以当前 小于3分之1 没有树叶 ,3分之1到3分之2一点点树叶 ,大于3分之2满树叶\r\n\tsetTeaNum(TeaNums) {\r\n\t\tif (this.schedule) {\r\n\t\t\tshowLog('清理定时器,重新设置同步')\r\n\t\t\tclearInterval(this.schedule);\r\n\t\t}\r\n\t\tlet totalNum = TeaNums.totalNum;\r\n\t\tlet nowNum = TeaNums.nowNum\r\n\t\tshowLog('nowNum:', nowNum)\r\n\t\tthis.getTeaPercentage(nowNum, totalNum);\r\n\t\tlet surplus = nowNum - totalNum;\r\n\t\tif (surplus == 0) {\r\n\t\t\tthis.gotoMaxLength();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tshowLog('surplus', surplus);\r\n\t\tlet width = this.progressbarImg.width;\r\n\t\tlet myDate = new Date();\r\n\t\tlet nowData = myDate.getTime();\r\n\t\tlet serverData = TeaNums.serverData;\r\n\t\t//前后端本身的差值\r\n\t\tlet fbdvalue = Math.abs((nowData - serverData))\r\n\t\tshowLog('fbdvalue', fbdvalue)\r\n\t\t/**/\r\n\t\t//设置数据校正\r\n\t\t// let serverData = 0;\r\n\t\tlet dataDiff = 0;\r\n\t\t/**/\r\n\t\t//let rate = (443 - width * (1 - nowNum / totalNum))\r\n\t\t//已经走得\r\n\t\tlet x = -width * (1 - (nowNum / totalNum))\r\n\r\n\t\tshowLog('原先的X:', this.progressbarImg.x)\r\n\t\tshowLog('比例后的X', x);\r\n\t\t//showLog('parseFloat(x.toFixed(3))', parseFloat(x.toFixed(5)))\r\n\r\n\t\tthis.progressbarImg.x = parseFloat(x.toFixed(5)) + this.teaFullFlagImg.width - Math.abs(this.teaFullFlagImg.x)\r\n\t\tshowLog('减去长款的x', this.progressbarImg.x)\r\n\t\tshowLog('this.teaFullFlagImg.width', this.teaFullFlagImg.width)\r\n\r\n\t\tif (this.progressbarImg.x > (this.teaFullFlagImg.width / 2)) {\r\n\t\t\tlet minus = this.teaFullFlagImg.width - Math.abs(this.teaFullFlagImg.x) - this.progressbarImg.x\r\n\t\t\tshowLog('minus', minus)\r\n\t\t\tthis.progressbarImg.x = this.progressbarImg.x - this.teaFullFlagImg.width / 2 + Math.abs(this.teaFullFlagImg.x)\r\n\t\t\tshowLog('负段x重组', this.progressbarImg.x)\r\n\t\t}\r\n\r\n\t\tshowLog('补宽的X', this.progressbarImg.x);\r\n\t\tshowLog('this.progressbarImg.x', this.progressbarImg.x)\r\n\t\tlet step = (this.teaFullFlagImg.width / 2 - this.progressbarImg.x) / surplus\r\n\t\tshowLog('step', step)\r\n\t\t//step = parseFloat(step.toFixed(6));\r\n\t\t//showLog('进图条每秒比例step', step)\r\n\t\tlet speed = props.pickTeaSpeed;\r\n\t\tif (!this.teaFullRotation) {\r\n\t\t\tthis.teaFullRotation = engine.Tween.get(this.teaHalfFlagImg, { loop: true })\r\n\t\t\t\t.to({ rotation: 360 }, speed).call(() => {\r\n\t\t\t\t\tthis.teaHalfFlagImg.rotation = 0;\r\n\t\t\t\t})\r\n\t\t}\r\n\t\tthis.teaHalfFlagImg.visible = true;\r\n\t\tthis.teaFullFlagImg.visible = !this.teaHalfFlagImg.visible\r\n\t\tthis.addOneSvga.visible = this.teaHalfFlagImg.visible\r\n\r\n\t\tengine.Tween.resumeTweens(this.teaFullRotation);\r\n\t\tthis.schedule = setInterval(() => {\r\n\t\t\t//showLog('nowNum', nowNum, 'totalNum', totalNum)\r\n\t\t\tnowNum++;\r\n\t\t\tthis.addOneSvga.play(1, true);\r\n\t\t\tif (nowNum == totalNum) {\r\n\t\t\t\tthis.gotoMaxLength();\r\n\t\t\t\tthis.getTeaPercentage(nowNum, totalNum);\r\n\t\t\t\tengine.Tween.pauseTweens(this.teaFullRotation);\r\n\t\t\t\t//this.setTeaNum({ totalNum: 100, nowNum: 0, serverData: 1585290768011 });\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (this.progressbarImg.x < this.teaFullFlagImg.width / 2) {\r\n\t\t\t\tthis.progressbarImg.x -= step;\r\n\t\t\t}\r\n\t\t\tthis.getTeaPercentage(nowNum, totalNum);\r\n\t\t\tdataDiff += speed;\r\n\t\t\tmyDate = new Date();\r\n\t\t\tnowData = myDate.getTime();\r\n\t\t\tif (Math.abs((nowData - serverData)) - dataDiff > (fbdvalue + 3000)) {\r\n\t\t\t\tshowLog('校准数据前后数据偏差过大');\r\n\t\t\t\tshowLog(Math.abs((nowData - serverData)) - dataDiff - (fbdvalue + 3000))\r\n\t\t\t\tshowLog(this.schedule)\r\n\t\t\t\tclearInterval(this.schedule);\r\n\t\t\t\tengine.Tween.pauseTweens(this.teaFullRotation);\r\n\t\t\t\tengine.globalEvent.dispatchEvent('event-setchange-TeaNum');\r\n\t\t\t\tthis.addOneSvga.visible = false;\r\n\t\t\t\tthis.addOneSvga.stop();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}, speed)\r\n\t}\r\n\tgetTeaPercentage(nowNum, totalNum) {\r\n\t\tif (nowNum > totalNum) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.pickTeaCount.text = nowNum + '/' + totalNum;\r\n\t\tlet teaPercentage = 2;\r\n\t\tlet portion = totalNum / 3\r\n\t\tif (nowNum < portion) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (nowNum < (portion * 2)) {\r\n\t\t\tteaPercentage = 1;\r\n\t\t}\r\n\t\tshowLog('teaPercentage', teaPercentage)\r\n\t\tif (this.nowPercentage != teaPercentage) {\r\n\t\t\tshowLog('状态改变')\r\n\t\t\tthis.nowPercentage = teaPercentage;\r\n\t\t\tthis.updateTeaPercentage(teaPercentage);\r\n\t\t}\r\n\t}\r\n\t//进度条达到最大长度\r\n\tgotoMaxLength() {\r\n\t\tshowLog('达到最大长度');\r\n\t\tif (this.schedule) {\r\n\t\t\tclearInterval(this.schedule);\r\n\t\t}\r\n\t\tthis.progressbarImg.x = this.teaFullFlagImg.width / 2\r\n\t\tthis.teaHalfFlagImg.visible = false;\r\n\t\tthis.teaFullFlagImg.visible = !this.teaHalfFlagImg.visible\r\n\t\tthis.addOneSvga.visible = this.teaHalfFlagImg.visible\r\n\t\tthis.addOneSvga.stop();\r\n\t}\r\n\t//需要更换茶叶数量皮肤\r\n\tupdateTeaPercentage(teaPercentage = 0) {\r\n\t\t// console.log('需要更换茶叶数量皮肤')\r\n\t\t// console.log('this.basketLevel', this.basketLevel)\r\n\t\tif (!this.basketLevel)\r\n\t\t\tthis.basketLevel = 0;\r\n\t\tlet pickTeaSVGA = this.basketSvgaGroup[this.basketLevel];\r\n\t\tlet templength = pickTeaSVGA.children.length;\r\n\t\t//console.log('templength',templength)\r\n\t\tif (this.allFrames < templength)\r\n\t\t\tpickTeaSVGA.removeChildAt(10);\r\n\t\tlet originframes = pickTeaSVGA.children[7];\r\n\t\tif (!originframes) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t//按照采茶叶的多少来 设置茶叶是不是满的图片\r\n\t\tlet teaBucketframes = JSON.parse(JSON.stringify(originframes.frames));\r\n\t\t//let teaNumImg = this.teaHalfImg;\r\n\r\n\t\tif (teaPercentage == 1) {\r\n\t\t\tthis.teaHalfImg = new engine.Image(getTextureByName('茶叶-少'));\r\n\t\t}\r\n\t\telse if (teaPercentage == 2) {\r\n\t\t\tthis.teaHalfImg = new engine.Image(getTextureByName('茶叶-满'));\r\n\t\t}\r\n\t\tthis.teaHalfImg.visible = false;\r\n\t\tthis.teaHalfImg['frames'] = teaBucketframes;\r\n\r\n\t\t//showLog('this.teaHalfImg');\r\n\t\t//showLog(this.teaHalfImg);\r\n\t\tpickTeaSVGA.addChildAt(this.teaHalfImg, 10)\r\n\t}\r\n\r\n\tsetPickTeaLevel(level) {\r\n\t\tshowLog('setPickTeaLevel', level);\r\n\t\tthis.basketLevel = level;\r\n\t\tlet pickTeaSVGA = this.basketSvgaGroup[level];\r\n\t\tpickTeaSVGA.visible = true;\r\n\t\tconsole.log('总共有多少', pickTeaSVGA.children.length)\r\n\t\t//showLog('littleTea url')\r\n\t\t//showLog(this.teaHalfImg['_source'])\r\n\t\t//需要svga缓存结束\r\n\t\tsetTimeout(() => {\r\n\t\t\tshowLog('延迟500ms')\r\n\t\t\tlet originframes = pickTeaSVGA.children[7];\r\n\r\n\t\t\t//按照采茶叶的多少来 设置茶叶是不是满的图片\r\n\t\t\tthis.teaHalfImg.visible = true;\r\n\t\t\tlet teaBucketframes = JSON.parse(JSON.stringify(originframes.frames));\r\n\t\t\t//this.teaHalfImg = //new engine.Image(getTextureByName('茶叶-少'));\r\n\t\t\tif (this.teaHalfImg) {\r\n\t\t\t\t//this.teaHalfImg.source = ''\r\n\t\t\t\tthis.teaHalfImg['frames'] = teaBucketframes;\r\n\t\t\t}\r\n\t\t\tshowLog('this.teaHalfImg');\r\n\t\t\tshowLog(this.teaHalfImg);\r\n\t\t\tpickTeaSVGA.addChildAt(this.teaHalfImg, 10)\r\n\t\t\tpickTeaSVGA.gotoAndPlay(1, true);\r\n\t\t}, 300)\r\n\t}\r\n\thandGrasp() {\r\n\t\tshowLog('handGrasp')\r\n\t\tlet that = this;\r\n\t\tthis.updateTeaPercentage(0);\r\n\t\tsetTimeout(() => {\r\n\t\t\t//that.handGraspSvga.play(1, true);\r\n\t\t\t// this.pickTeaSvga.play(1, false);\r\n\t\t\t// this.teaSkyUpSvga.play(1, false);\r\n\t\t\tengine.Tween.get(that.handGraspSvga)\r\n\t\t\t\t.to({ x: props.handGraspMovePos[0], y: props.handGraspMovePos[1] }, 400).call(() => {\r\n\t\t\t\t\tshowLog('this.pickTeaSvga.play')\r\n\t\t\t\t\tthat.handGraspSvga.play(1, true);\r\n\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\tthat.handGraspSvga.stop()\r\n\t\t\t\t\t\tthat.handGraspSvga.x = props.handGraspSvgaPos[0];\r\n\t\t\t\t\t\tthat.handGraspSvga.y = props.handGraspSvgaPos[1];\r\n\t\t\t\t\t}, 600)\r\n\t\t\t\t\tthat.pickTeaSvga.visible = true\r\n\t\t\t\t\tplaySound('采茶叶');\r\n\t\t\t\t\tthat.teaHalfImg.source = ''\r\n\t\t\t\t\tthat.pickTeaSvga.play(1, false);\r\n\t\t\t\t})\r\n\r\n\t\t\tthat.pickTeaSvga.addEventListener(engine.Event.END_FRAME, function () {\r\n\t\t\t\tshowLog('this.teaSkyUpSvga.play')\r\n\t\t\t\tthat.teaSkyUpSvga.visible = true\r\n\t\t\t\tplaySound('茶叶飞起');\r\n\t\t\t\tthat.teaSkyUpSvga.play(1, false);\r\n\r\n\t\t\t})\r\n\r\n\t\t\tthat.teaSkyUpSvga.addEventListener(engine.Event.END_FRAME, function () {\r\n\t\t\t\tthat.teaSkyUpSvga.visible = false;\r\n\t\t\t\t//that.updateTeaPercentage(0)\r\n\t\t\t\tconsole.log('茶叶初始化')\r\n\t\t\t})\r\n\t\t}, 500);\r\n\t}\r\n\r\n\t/*采茶叶活动*/\r\n}\r\n","/**\r\n * Created by rockyl on 2020-01-09.\r\n */\r\n\r\nimport GameView from \"./GameView\";\r\nimport { injectProps } from \"../props\";\r\n\r\n\r\nexport class GameWrapper extends engine.Container {\r\n\tprivate _status;\r\n\tprivate _gameView: GameView;\r\n\r\n\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\t/*\r\n\t\tevent-pickTeaGame-init //游戏初始化\r\n\t\t//event-wait-uplevel //待升级\r\n\t\tevent-add-oneScore //+1\r\n\t\tevent-pick-tea //采茶叶\r\n\t\tevent-tea-skyup //茶叶向上飞\r\n\t\tevent-hand-grasp //手抓去\r\n\t\tevent-change-TeaNum //茶叶数量 改变svga动画\r\n\t\tevent-getBasket-Type //获得篮子类型\r\n\t\tevent-setBasket-Type //设置篮子类型\r\n\t\t*/\r\n\t\t// event-getchange-TeaNum //茶叶数量{初始值totalNum,总量nowNum} 改变svga动画\r\n\t\t// event-getBasket-Type //获得篮子类型\r\n\t\t// event-hand-grasp //手抓去\r\n\r\n\t\t//event-pickTeaGame-init 游戏初始化\r\n\t\tengine.globalEvent.addEventListener('event-pickTeaGame-init', this.reset, this);\r\n\r\n\t\tengine.globalEvent.addEventListener('event-hand-grasp', this.handGrasp, this);\r\n\t\tengine.globalEvent.addEventListener('event-getClick-person', this.clickPerson, this);\r\n\t\tengine.globalEvent.addEventListener('event-getchange-TeaNum', this.setTeaNum, this);\r\n\t\tengine.globalEvent.addEventListener('event-getBasket-Type', this.setPickTeaLevel, this);\r\n\r\n\r\n\r\n\t\tlet gameView = this._gameView = new GameView();\r\n\t\tthis.addChild(gameView);\r\n\t}\r\n\r\n\t//设置茶叶数量\r\n\tsetTeaNum(event: engine.Event) {\r\n\t\tinjectProps(event.data);\r\n\t\tthis._gameView.setTeaNum(event.data);\r\n\t}\r\n\r\n\t//设置茶蓝等级\r\n\tsetPickTeaLevel(event: engine.Event) {\r\n\t\tinjectProps(event.data);\r\n\t\tthis._gameView.setPickTeaLevel(event.data);\r\n\t}\r\n\t\r\n\thandGrasp() {\r\n\t\tthis._gameView.handGrasp();\r\n\t}\r\n\t//点击人物\r\n\tclickPerson() {\r\n\t\tthis._gameView.showVerse();\r\n\t}\r\n\treset(event: engine.Event) {\r\n\t\tinjectProps(event.data);\r\n\t\tthis._gameView.visible = true;\r\n\t\tthis._gameView.reset();\r\n\t}\r\n\r\n\r\n\tstart(event: engine.Event) {\r\n\t\tinjectProps(event.data);\r\n\t\tthis._status = 1;\r\n\t\tthis._gameView.start();\r\n\t}\r\n\r\n\tpause() {\r\n\t\tthis._gameView.pause();\r\n\t}\r\n\r\n\tresume() {\r\n\t\tthis._gameView.resume();\r\n\t}\r\n\r\n\trevive() {\r\n\t\tthis._gameView.revive();\r\n\t}\r\n\r\n\tclear() {\r\n\t\tthis._gameView.visible = false;\r\n\t}\r\n\r\n\r\n\r\n\r\n\r\n\tprivate onTap(event) {\r\n\t\t//\tthis._gameView.tap(event);\r\n\t}\r\n}\r\n","/**\r\n * Created by rockyl on 2019-11-20.\r\n */\r\n\r\nimport {GameWrapper} from \"./game/GameWrapper\";\r\nimport {injectProps, prepareProps} from \"./props\";\r\n\r\nexport default function (props) {\r\n\tprepareProps();\r\n\tinjectProps(props);\r\n\r\n\tlet instance = new GameWrapper();\r\n\treturn instance;\r\n}\r\n"],"names":["__extends"],"mappings":";;;;;;CAIO,IAAI,KAAK,GAAQ,EAAE,CAAC;AAE3B,UAAgB,YAAY;KAC3B,IAAI,SAAS,GAAG,QAAQ,EAAE,CAAC;KAE3B,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;CACrC,CAAC;AAED,UAAgB,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,UAAgB,SAAS,CAAC,IAAI;KAE7B,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;CACpE,CAAC;AACD,UAAgB,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,CAAC;AACD,U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KAED,4BAAM,GAAN;SACC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;MACxB;KAED,4BAAM,GAAN;SACC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;MACxB;KAED,2BAAK,GAAL;SACC,IAAI,CAAC,SAAS,CAAC,OAAO,GAAG,KAAK,CAAC;MAC/B;KAMO,2BAAK,GAAb,UAAc,KAAK;MAElB;KACF,kBAAC;CAAD,CAAC,CA3FgC,MAAM,CAAC,SAAS,GA2FhD;;iBC5FwB,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/pick-tea/src/props.ts","src/custom/pick-tea/src/game/utils.ts","src/custom/pick-tea/src/game/GameView.ts","src/custom/pick-tea/src/game/GameWrapper.ts","src/custom/pick-tea/src/index.ts"],"sourcesContent":["/**\r\n * Created by rockyl on 2020-01-21.\r\n */\r\n\r\nexport let props: any = {};\r\n\r\nexport function prepareProps() {\r\n\tlet metaProps = getProps();\r\n\r\n\tengine.injectProp(props, metaProps);\r\n}\r\n\r\nexport function injectProps(p) {\r\n\tengine.injectProp(props, p);\r\n}\r\n","/**\r\n * Created by rockyl on 2020-01-21.\r\n */\r\nconst showlog = false;\r\nexport function getTexture(uuid) {\r\n\treturn engine.Texture.from(getAssetByUUID(uuid).uuid);\r\n}\r\n\r\nexport function getTextureByName(name) {\r\n\treturn getTexture(engine.getAssetByName(name).uuid);\r\n}\r\n\r\nexport function playSound(name) {\r\n\t//console.log('playSound', name)\r\n\tengine.playSound(engine.getAssetByName(name).uuid, { keep: true });\r\n}\r\nexport function createSvga(name, anchorName?) {\r\n\tlet inst = new svga.Svga();\r\n\tinst.source = 'asset://' + engine.getAssetByName(name).uuid;\r\n\treturn inst;\r\n}\r\nexport function showLog(abjname, obj?) {\r\n\tif (showlog) {\r\n\t\tconsole.log(abjname)\r\n\t\tif (obj)\r\n\t\t\tconsole.log(obj)\r\n\t}\r\n\t// let inst = new svga.Svga();\r\n\t// inst.source = 'asset://' + engine.getAssetByName(name).uuid;\r\n\t// return inst;\r\n}","/**\r\n * Created by rockyl on 2018/8/16.\r\n */\r\n\r\nimport { props } from \"../props\";\r\nimport { playSound, createSvga } from \"./utils\";\r\nimport ObjectPool = engine.ObjectPool;\r\nimport { getTextureByName } from \"./utils\";\r\nimport { showLog } from \"./utils\";\r\nimport { Tealeaf } from \"./Tealeaf\";\r\n\r\n\r\nconst MAXX = -8;\r\nexport default class GameView extends engine.Container {\r\n\r\n\tprivate _hasSetup;\r\n\r\n\t/**采茶叶自定义模块*/\r\n\tprivate teaImgSource: any;\r\n\tprivate tealeaf: Tealeaf;\r\n\tprivate teaHalfImg: engine.Image;\r\n\tprivate nowPercentage: any = 0;\r\n\tprivate progressbarBgImg: engine.Image;\r\n\tprivate progressbarImg: engine.Image;\r\n\tprivate teaFullFlagImg: engine.Image;\r\n\tprivate teaHalfFlagImg: engine.Image;\r\n\tprivate teaStarImg: engine.Image;\r\n\tprivate frontImg: engine.Image;\r\n\tprivate verseImg: engine.Image;\r\n\tprivate handGraspBgImg: engine.Image;\r\n\t//采茶背景层\r\n\tprivate pickTeaBg: engine.Container;\r\n\t//采茶进度计时器\r\n\tprivate pickTeaTimer: any\r\n\t//茶叶的数量进度 100/240\r\n\tprivate pickTeaCount: engine.Label;\r\n\t//语句\r\n\tprivate verseLabel: engine.TextField;\r\n\t//篮子集合\r\n\tprivate basketSvgaGroup: any;\r\n\r\n\tprivate basketLevel: any;\r\n\t//纸篮子svga\r\n\tprivate paperBasketSvga\r\n\t//布篮子svga\r\n\tprivate clothBasketSvga\r\n\t//竹篮子svga\r\n\tprivate bambooBasketSvga\r\n\t//木篮子svga\r\n\tprivate woodBasketSvga\r\n\t//+1\r\n\tprivate addOneSvga\r\n\t//采茶叶\r\n\tprivate pickTeaSvga\r\n\t//茶叶向上飞\r\n\tprivate teaSkyUpSvga\r\n\t//手抓去\r\n\tprivate handGraspSvga\r\n\t//半缺旋转\r\n\tprivate teaFullRotation\r\n\r\n\tprivate allFrames;\r\n\t/**采茶叶自定义模块*/\r\n\r\n\t//玩家\r\n\tprivate player: engine.Container;\r\n\r\n\t//触摸层\r\n\tprivate rectBg: engine.Rect;\r\n\t//npc层\r\n\t//private NpcBg: engine.Container;\r\n\r\n\t//当前分数\r\n\tprivate score\r\n\t//游戏状态\r\n\tprivate gameIng;\r\n\t//npc出身计时器\r\n\tprivate timer\r\n\t//倒计时计时器\r\n\tprivate countdownTimer: any\r\n\t//倒计时\r\n\tprivate countdown: number\r\n\t//当前速度\r\n\tprivate speed: number\r\n\r\n\tprivate schedule: any\r\n\t// 当前场景上面的物品\r\n\tprivate goodsItems = []\r\n\r\n\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.once(engine.Event.ADDED_TO_STAGE, this.setup, this);\r\n\t}\r\n\r\n\tprivate waterSvga\r\n\tprivate boomSvga\r\n\tprivate playerSvga\r\n\tprivate _touchEnabled = true\r\n\tsetup() {\r\n\t\tif (this._hasSetup) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._hasSetup = true;\r\n\t\tthis.pickTeaBg = new engine.Container();\r\n\t\tthis.basketLevel = null;\r\n\t\t// let bgGroud = new engine.Image()\r\n\t\t// bgGroud.source = '//yun.duiba.com.cn/aurora/assets/a988c47db8d3131faad175c7c2944773392be643.png'\r\n\t\t// this.addChild(bgGroud);\r\n\r\n\t\tthis.addChild(this.pickTeaBg);\r\n\t\tthis.teaHalfImg = new engine.Image();\r\n\r\n\t\tthis.paperBasketSvga = createSvga(\"采茶童-纸篮子\");\r\n\t\tthis.clothBasketSvga = createSvga(\"采茶童-布篮子\");\r\n\t\tthis.bambooBasketSvga = createSvga(\"采茶童-竹编篮\");\r\n\t\tthis.woodBasketSvga = createSvga(\"采茶童-木篮子\");\r\n\t\tthis.addOneSvga = createSvga(\"+1\");\r\n\t\tthis.pickTeaSvga = createSvga(\"采茶叶\");\r\n\r\n\t\tthis.teaSkyUpSvga = createSvga(\"茶叶向上飞\");\r\n\t\tthis.handGraspSvga = createSvga(\"手抓去\");\r\n\r\n\t\tthis.frontImg = new engine.Image(getTextureByName('前景'));\r\n\r\n\t\tthis.pickTeaBg.addChild(this.paperBasketSvga);\r\n\t\tthis.pickTeaBg.addChild(this.clothBasketSvga);\r\n\t\tthis.pickTeaBg.addChild(this.bambooBasketSvga);\r\n\t\tthis.pickTeaBg.addChild(this.woodBasketSvga);\r\n\t\t//this.pickTeaBg.addChild(this.addOneSvga);\r\n\t\tthis.pickTeaBg.addChild(this.pickTeaSvga);\r\n\t\tthis.pickTeaBg.addChild(this.teaSkyUpSvga);\r\n\t\t//this.pickTeaBg.addChild(this.handGraspSvga);\r\n\t\tthis.basketSvgaGroup = [this.paperBasketSvga, this.clothBasketSvga, this.bambooBasketSvga, this.woodBasketSvga]\r\n\r\n\t\tthis.progressbarBgImg = new engine.Image(getTextureByName('进度条底框'));\r\n\t\tthis.progressbarImg = new engine.Image(getTextureByName('进度'));\r\n\t\tthis.teaHalfFlagImg = new engine.Image(getTextureByName('茶叶进度缺'));\r\n\t\tthis.teaFullFlagImg = new engine.Image(getTextureByName('茶叶进度满'));\r\n\t\tthis.teaStarImg = new engine.Image(getTextureByName('小茶叶'));\r\n\r\n\t\tthis.handGraspBgImg = new engine.Image(getTextureByName('茶叶收取底图'));\r\n\t\tthis.verseImg = new engine.Image(getTextureByName('气泡框'));\r\n\t\tthis.pickTeaBg.addChild(this.verseImg);\r\n\r\n\r\n\t\tlet mask = new engine.Rect();\r\n\t\tmask.width = 600;\r\n\t\tmask.height = 50;\r\n\t\tmask.x = 10;\r\n\t\tmask.y = 0;\r\n\t\tmask.alpha = 1;\r\n\r\n\t\tthis.progressbarImg.mask = mask\r\n\t\tshowLog(this.progressbarImg.mask)\r\n\r\n\t\tthis.addChild(this.frontImg);\r\n\r\n\t\tthis.progressbarBgImg.addChild(this.progressbarImg);\r\n\r\n\t\tthis.progressbarBgImg.addChild(mask);\r\n\t\tshowLog('遮罩坐标')\r\n\t\tshowLog(mask.x, mask.y)\r\n\t\tthis.progressbarBgImg.addChild(this.addOneSvga);\r\n\r\n\t\tthis.progressbarBgImg.addChild(this.handGraspBgImg);\r\n\r\n\t\tthis.handGraspBgImg.addChild(this.handGraspSvga);\r\n\r\n\t\tthis.progressbarBgImg.addChild(this.teaHalfFlagImg);\r\n\t\tthis.progressbarBgImg.addChild(this.teaFullFlagImg);\r\n\t\tthis.progressbarBgImg.addChild(this.teaStarImg);\r\n\t\tthis.pickTeaCount = new engine.Label();\r\n\t\tthis.progressbarBgImg.addChild(this.pickTeaCount);\r\n\r\n\t\tthis.addChild(this.progressbarBgImg);\r\n\t\tthis.initView();\r\n\r\n\t\t// setTimeout(() => {\r\n\t\t// \tthis.setPickTeaLevel(1)\r\n\t\t// \tthis.setTeaNum({ totalNum: 150, nowNum: 60, serverData: 1585290768011 })\r\n\t\t// \t//this.setTeaNum({ totalNum: 100, nowNum: 0 })\r\n\t\t// }, 500)\r\n\t\t// setTimeout(() => {\r\n\t\t// \tthis.handGrasp();\r\n\r\n\t\t// \tthis.setTeaNum({ totalNum: 10, nowNum: 0, serverData: 1585290768011 })\r\n\r\n\t\t// }, 12000)\r\n\t\t//playSound('采茶叶');\r\n\r\n\t}\r\n\treset() {\r\n\t\tthis.initView()\r\n\t}\r\n\tstart() {\r\n\r\n\t}\r\n\tpause() {\r\n\t\tthis.gameIng = false;\r\n\t}\r\n\trevive() {\r\n\t\tthis.gameIng = true;\r\n\t}\r\n\r\n\tresume() {\r\n\t\tthis.reset();\r\n\t\tthis.start()\r\n\t}\r\n\r\n\tinitView() {\r\n\t\tthis.pickTeaBg.mouseEnabled = false;\r\n\t\tthis.teaHalfImg.visible = false;\r\n\t\t//this.teaHalfImg.source = '';\r\n\t\tthis.pickTeaSvga.visible = false;\r\n\t\tthis.teaSkyUpSvga.visible = false;\r\n\t\tthis.verseImg.visible = false;\r\n\t\tthis.frontImg.visible = props.showFrontImg == 1;\r\n\t\tthis.initChildrenPos()\r\n\t}\r\n\tinitChildrenPos() {\r\n\t\tfor (let i = 0; i < this.basketSvgaGroup.length; i++) {\r\n\t\t\tthis.basketSvgaGroup[i].visible = false\r\n\t\t\tthis.basketSvgaGroup[i].x = props.basketSvgaPos[0];\r\n\t\t\tthis.basketSvgaGroup[i].y = props.basketSvgaPos[1];;\r\n\t\t\t//this.basketSvgaGroup[i].addEventListener(engine.MouseEvent.CLICK, this.showVerse, this);\r\n\t\t}\r\n\t\tlet pickTeaSVGA = this.basketSvgaGroup[0];\r\n\r\n\t\t//console.log('总共有多少',pickTeaSVGA.children.length)\r\n\t\tthis.allFrames = pickTeaSVGA.children.length;\r\n\r\n\t\tthis.verseImg.x = props.versePos[0]\r\n\t\tthis.verseImg.y = props.versePos[1]\r\n\t\tthis.addOneSvga.x = props.addOneSvgaPos[0]\r\n\t\tthis.addOneSvga.y = props.addOneSvgaPos[1];\r\n\t\tthis.pickTeaSvga.x = props.pickTeaSvgaPos[0];\r\n\t\tthis.pickTeaSvga.y = props.pickTeaSvgaPos[1];\r\n\r\n\t\tthis.teaSkyUpSvga.x = props.teaSkyUpSvgaPos[0];\r\n\t\tthis.teaSkyUpSvga.y = props.teaSkyUpSvgaPos[1];\r\n\r\n\t\tthis.handGraspSvga.x = props.handGraspSvgaPos[0];\r\n\t\tthis.handGraspSvga.y = props.handGraspSvgaPos[1];\r\n\r\n\t\tthis.handGraspBgImg.x = props.handGraspBgImgPos[0];\r\n\t\tthis.handGraspBgImg.y = props.handGraspBgImgPos[1];\r\n\r\n\t\tthis.progressbarBgImg.x = props.progressbarBgImgPos[0]\r\n\r\n\t\tthis.progressbarBgImg.y = props.progressbarBgImgPos[1]\r\n\r\n\t\tthis.progressbarImg.x = props.progressbarImgPos[0]\r\n\t\tthis.progressbarImg.y = props.progressbarImgPos[1]\r\n\r\n\t\tthis.teaHalfFlagImg.x = props.teaHalfFlagImgPos[0]\r\n\t\tthis.teaHalfFlagImg.y = props.teaHalfFlagImgPos[1]\r\n\t\tthis.teaHalfFlagImg.anchorX = this.teaHalfFlagImg.width / 2\r\n\t\tthis.teaHalfFlagImg.anchorY = this.teaHalfFlagImg.height / 2\r\n\r\n\t\tthis.teaFullFlagImg.x = props.teaHalfFlagImgPos[0]\r\n\t\tthis.teaFullFlagImg.y = props.teaHalfFlagImgPos[1]\r\n\r\n\t\tthis.frontImg.x = props.FrontImgPos[0]\r\n\t\tthis.frontImg.y = props.FrontImgPos[1]\r\n\r\n\t\tthis.teaFullFlagImg.visible = false;\r\n\r\n\t\tthis.teaStarImg.x = props.teaStarImgPos[0]\r\n\t\tthis.teaStarImg.y = props.teaStarImgPos[1]\r\n\r\n\t\tthis.pickTeaCount.fillColor = 'white';\r\n\t\tthis.pickTeaCount.size = 30;\r\n\t\tthis.pickTeaCount.text = ''\r\n\r\n\t\tthis.pickTeaCount.x = props.pickTeaCountPos[0]\r\n\t\tthis.pickTeaCount.y = props.pickTeaCountPos[1]\r\n\r\n\t\tthis.pickTeaCount.height = 50;\r\n\t\tthis.pickTeaCount.width = 200;\r\n\r\n\t\tthis.verseLabel = new engine.TextField();\r\n\t\tthis.verseLabel.size = props.verseLabel[2];\r\n\t\tthis.verseLabel.text = ''\r\n\t\tthis.verseLabel.fillColor = props.verseColor[0]\r\n\t\tthis.verseLabel.height = props.verseLabel[1];\r\n\t\tthis.verseLabel.width = props.verseLabel[0];\r\n\t\tthis.verseLabel.strokeColor = props.verseColor[1]\r\n\t\tthis.verseLabel.stroke = 0.5;\r\n\r\n\t\tthis.verseLabel.y = 15;\r\n\t\tthis.verseLabel['textHeight'] = 14;\r\n\t\tthis.verseLabel.textAlign = engine.TEXT_ALIGN.CENTER;\r\n\t\tthis.verseImg.visible = false;\r\n\t\tthis.verseImg.addChild(this.verseLabel);\r\n\r\n\t\t// label.x = (width - label.width) / 2;\r\n\t\t// label.y = guideHole.y + guideHole.height + 50;\r\n\t}\r\n\tshowVerse() {\r\n\t\tshowLog('显示诗句')\r\n\t\t// if (!this._touchEnabled) {\r\n\t\t// \treturn;\r\n\t\t// }\r\n\t\t//this._touchEnabled = false;\r\n\t\tthis.verseImg.visible = true;\r\n\t\tlet len = props.verses.length;\r\n\t\tlet random = Math.floor(Math.random() * len);\r\n\t\tshowLog('random', random)\r\n\t\tshowLog('props.verses')\r\n\t\tshowLog(props.verses)\r\n\t\tlet verse = props.verses[random];\r\n\t\tshowLog('verse', verse)\r\n\t\tthis.verseLabel.text = verse;\r\n\t\tlet y = this.verseImg.y\r\n\t\tengine.Tween.get(this.verseImg)\r\n\t\t\t.to({ alpha: 0 }, 3000).call(() => {\r\n\t\t\t\tthis.verseImg.visible = false;\r\n\t\t\t\tthis.verseImg.alpha = 1\r\n\t\t\t})\r\n\t};\r\n\t/*采茶叶活动*/\r\n\t//总量除以当前 小于3分之1 没有树叶 ,3分之1到3分之2一点点树叶 ,大于3分之2满树叶\r\n\tsetTeaNum(TeaNums) {\r\n\t\tif (this.schedule) {\r\n\t\t\tshowLog('清理定时器,重新设置同步')\r\n\t\t\tclearInterval(this.schedule);\r\n\t\t}\r\n\t\tlet totalNum = TeaNums.totalNum;\r\n\t\tlet nowNum = TeaNums.nowNum\r\n\t\tshowLog('nowNum:', nowNum)\r\n\t\tthis.getTeaPercentage(nowNum, totalNum);\r\n\t\tlet surplus = nowNum - totalNum;\r\n\t\tif (surplus == 0) {\r\n\t\t\tthis.gotoMaxLength();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tshowLog('surplus', surplus);\r\n\t\tlet width = this.progressbarImg.width;\r\n\t\tlet myDate = new Date();\r\n\t\tlet nowData = myDate.getTime();\r\n\t\tlet serverData = TeaNums.serverData;\r\n\t\t//前后端本身的差值\r\n\t\tlet fbdvalue = Math.abs((nowData - serverData))\r\n\t\tshowLog('fbdvalue', fbdvalue)\r\n\t\t/**/\r\n\t\t//设置数据校正\r\n\t\t// let serverData = 0;\r\n\t\tlet dataDiff = 0;\r\n\t\t/**/\r\n\t\t//let rate = (443 - width * (1 - nowNum / totalNum))\r\n\t\t//已经走得\r\n\t\tlet x = -width * (1 - (nowNum / totalNum))\r\n\r\n\t\tshowLog('原先的X:', this.progressbarImg.x)\r\n\t\tshowLog('比例后的X', x);\r\n\t\t//showLog('parseFloat(x.toFixed(3))', parseFloat(x.toFixed(5)))\r\n\r\n\t\tthis.progressbarImg.x = parseFloat(x.toFixed(5)) + this.teaFullFlagImg.width - Math.abs(this.teaFullFlagImg.x)\r\n\t\tshowLog('减去长款的x', this.progressbarImg.x)\r\n\t\tshowLog('this.teaFullFlagImg.width', this.teaFullFlagImg.width)\r\n\r\n\t\tif (this.progressbarImg.x > (this.teaFullFlagImg.width / 2)) {\r\n\t\t\tlet minus = this.teaFullFlagImg.width - Math.abs(this.teaFullFlagImg.x) - this.progressbarImg.x\r\n\t\t\tshowLog('minus', minus)\r\n\t\t\tthis.progressbarImg.x = this.progressbarImg.x - this.teaFullFlagImg.width / 2 + Math.abs(this.teaFullFlagImg.x)\r\n\t\t\tshowLog('负段x重组', this.progressbarImg.x)\r\n\t\t}\r\n\r\n\t\tshowLog('补宽的X', this.progressbarImg.x);\r\n\t\tshowLog('this.progressbarImg.x', this.progressbarImg.x)\r\n\t\tlet step = (this.teaFullFlagImg.width / 2 - this.progressbarImg.x) / surplus\r\n\t\tshowLog('step', step)\r\n\t\t//step = parseFloat(step.toFixed(6));\r\n\t\t//showLog('进图条每秒比例step', step)\r\n\t\tlet speed = props.pickTeaSpeed;\r\n\t\tif (!this.teaFullRotation) {\r\n\t\t\tthis.teaFullRotation = engine.Tween.get(this.teaHalfFlagImg, { loop: true })\r\n\t\t\t\t.to({ rotation: 360 }, speed).call(() => {\r\n\t\t\t\t\tthis.teaHalfFlagImg.rotation = 0;\r\n\t\t\t\t})\r\n\t\t}\r\n\t\tthis.teaHalfFlagImg.visible = true;\r\n\t\tthis.teaFullFlagImg.visible = !this.teaHalfFlagImg.visible\r\n\t\tthis.addOneSvga.visible = this.teaHalfFlagImg.visible\r\n\r\n\t\tengine.Tween.resumeTweens(this.teaFullRotation);\r\n\t\tthis.schedule = setInterval(() => {\r\n\t\t\t//showLog('nowNum', nowNum, 'totalNum', totalNum)\r\n\t\t\tnowNum++;\r\n\t\t\tthis.addOneSvga.play(1, true);\r\n\t\t\tif (nowNum == totalNum) {\r\n\t\t\t\tthis.gotoMaxLength();\r\n\t\t\t\tthis.getTeaPercentage(nowNum, totalNum);\r\n\t\t\t\tengine.Tween.pauseTweens(this.teaFullRotation);\r\n\t\t\t\t//this.setTeaNum({ totalNum: 100, nowNum: 0, serverData: 1585290768011 });\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (this.progressbarImg.x < this.teaFullFlagImg.width / 2) {\r\n\t\t\t\tthis.progressbarImg.x -= step;\r\n\t\t\t}\r\n\t\t\tthis.getTeaPercentage(nowNum, totalNum);\r\n\t\t\tdataDiff += speed;\r\n\t\t\tmyDate = new Date();\r\n\t\t\tnowData = myDate.getTime();\r\n\t\t\tif (Math.abs((nowData - serverData)) - dataDiff > (fbdvalue + 3000)) {\r\n\t\t\t\tshowLog('校准数据前后数据偏差过大');\r\n\t\t\t\tshowLog(Math.abs((nowData - serverData)) - dataDiff - (fbdvalue + 3000))\r\n\t\t\t\tshowLog(this.schedule)\r\n\t\t\t\tclearInterval(this.schedule);\r\n\t\t\t\tengine.Tween.pauseTweens(this.teaFullRotation);\r\n\t\t\t\tengine.globalEvent.dispatchEvent('event-setchange-TeaNum');\r\n\t\t\t\tthis.addOneSvga.visible = false;\r\n\t\t\t\tthis.addOneSvga.stop();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}, speed)\r\n\t}\r\n\tgetTeaPercentage(nowNum, totalNum) {\r\n\t\tif (nowNum > totalNum) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.pickTeaCount.text = nowNum + '/' + totalNum;\r\n\t\tlet teaPercentage = 2;\r\n\t\tlet portion = totalNum / 3\r\n\t\tif (nowNum < portion) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (nowNum < (portion * 2)) {\r\n\t\t\tteaPercentage = 1;\r\n\t\t}\r\n\t\tshowLog('teaPercentage', teaPercentage)\r\n\t\tif (this.nowPercentage != teaPercentage) {\r\n\t\t\tshowLog('状态改变')\r\n\t\t\tthis.nowPercentage = teaPercentage;\r\n\t\t\tthis.updateTeaPercentage(teaPercentage);\r\n\t\t}\r\n\t}\r\n\t//进度条达到最大长度\r\n\tgotoMaxLength() {\r\n\t\tshowLog('达到最大长度');\r\n\t\tif (this.schedule) {\r\n\t\t\tclearInterval(this.schedule);\r\n\t\t}\r\n\t\tthis.progressbarImg.x = this.teaFullFlagImg.width / 2\r\n\t\tthis.teaHalfFlagImg.visible = false;\r\n\t\tthis.teaFullFlagImg.visible = !this.teaHalfFlagImg.visible\r\n\t\tthis.addOneSvga.visible = this.teaHalfFlagImg.visible\r\n\t\tthis.addOneSvga.stop();\r\n\t}\r\n\t//需要更换茶叶数量皮肤\r\n\tupdateTeaPercentage(teaPercentage = 0) {\r\n\t\t// console.log('需要更换茶叶数量皮肤')\r\n\t\t// console.log('this.basketLevel', this.basketLevel)\r\n\t\tif (!this.basketLevel)\r\n\t\t\tthis.basketLevel = 0;\r\n\t\tlet pickTeaSVGA = this.basketSvgaGroup[this.basketLevel];\r\n\t\tlet templength = pickTeaSVGA.children.length;\r\n\t\t//console.log('templength',templength)\r\n\t\tif (this.allFrames < templength) {\r\n\t\t\tpickTeaSVGA.removeChildAt(10);\r\n\t\t}\r\n\r\n\t\tlet originframes = pickTeaSVGA.children[7];\r\n\t\tif (!originframes) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t//按照采茶叶的多少来 设置茶叶是不是满的图片\r\n\t\tlet teaBucketframes = JSON.parse(JSON.stringify(originframes.frames));\r\n\t\t//let teaNumImg = this.teaHalfImg;\r\n\r\n\t\tif (teaPercentage == 1) {\r\n\t\t\tthis.teaHalfImg = new engine.Image(getTextureByName('茶叶-少'));\r\n\t\t}\r\n\t\telse if (teaPercentage == 2) {\r\n\t\t\tthis.teaHalfImg = new engine.Image(getTextureByName('茶叶-满'));\r\n\t\t}\r\n\t\tthis.teaHalfImg.visible = false;\r\n\t\tthis.teaHalfImg['frames'] = teaBucketframes;\r\n\r\n\t\t//showLog('this.teaHalfImg');\r\n\t\t//showLog(this.teaHalfImg);\r\n\t\tpickTeaSVGA.addChildAt(this.teaHalfImg, 10)\r\n\t}\r\n\r\n\tsetPickTeaLevel(level) {\r\n\t\tshowLog('setPickTeaLevel', level);\r\n\t\tthis.basketLevel = level;\r\n\t\tlet pickTeaSVGA = this.basketSvgaGroup[level];\r\n\t\tpickTeaSVGA.visible = true;\r\n\t\t//console.log('总共有多少', pickTeaSVGA.children.length)\r\n\t\t//showLog('littleTea url')\r\n\t\t//showLog(this.teaHalfImg['_source'])\r\n\t\t//需要svga缓存结束\r\n\t\t//setTimeout(() => {\r\n\t\tshowLog('延迟500ms')\r\n\t\tlet originframes = pickTeaSVGA.children[7];\r\n\r\n\t\t//按照采茶叶的多少来 设置茶叶是不是满的图片\r\n\t\tthis.teaHalfImg.visible = true;\r\n\t\tlet teaBucketframes = JSON.parse(JSON.stringify(originframes.frames));\r\n\t\t//this.teaHalfImg = //new engine.Image(getTextureByName('茶叶-少'));\r\n\t\tif (this.teaHalfImg) {\r\n\t\t\t//this.teaHalfImg.source = ''\r\n\t\t\tthis.teaHalfImg['frames'] = teaBucketframes;\r\n\t\t}\r\n\t\tshowLog('this.teaHalfImg');\r\n\t\tshowLog(this.teaHalfImg);\r\n\t\tpickTeaSVGA.addChildAt(this.teaHalfImg, 10)\r\n\t\tpickTeaSVGA.gotoAndPlay(1, true);\r\n\t\t//}, 300)\r\n\t}\r\n\thandGrasp() {\r\n\t\tshowLog('handGrasp')\r\n\t\tlet that = this;\r\n\t\tthis.updateTeaPercentage(0);\r\n\t\tsetTimeout(() => {\r\n\t\t\t//that.handGraspSvga.play(1, true);\r\n\t\t\t// this.pickTeaSvga.play(1, false);\r\n\t\t\t// this.teaSkyUpSvga.play(1, false);\r\n\t\t\tengine.Tween.get(that.handGraspSvga)\r\n\t\t\t\t.to({ x: props.handGraspMovePos[0], y: props.handGraspMovePos[1] }, 400).call(() => {\r\n\t\t\t\t\tshowLog('this.pickTeaSvga.play')\r\n\t\t\t\t\tthat.handGraspSvga.play(1, true);\r\n\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\tthat.handGraspSvga.stop()\r\n\t\t\t\t\t\tthat.handGraspSvga.x = props.handGraspSvgaPos[0];\r\n\t\t\t\t\t\tthat.handGraspSvga.y = props.handGraspSvgaPos[1];\r\n\t\t\t\t\t}, 600)\r\n\t\t\t\t\tthat.pickTeaSvga.visible = true\r\n\t\t\t\t\tplaySound('采茶叶');\r\n\t\t\t\t\tthat.teaHalfImg.source = ''\r\n\t\t\t\t\tthat.pickTeaSvga.play(1, false);\r\n\t\t\t\t})\r\n\r\n\t\t\tthat.pickTeaSvga.addEventListener(engine.Event.END_FRAME, function () {\r\n\t\t\t\tshowLog('this.teaSkyUpSvga.play')\r\n\t\t\t\tthat.teaSkyUpSvga.visible = true\r\n\t\t\t\tplaySound('茶叶飞起');\r\n\t\t\t\tthat.teaSkyUpSvga.play(1, false);\r\n\r\n\t\t\t})\r\n\r\n\t\t\tthat.teaSkyUpSvga.addEventListener(engine.Event.END_FRAME, function () {\r\n\t\t\t\tthat.teaSkyUpSvga.visible = false;\r\n\t\t\t\t//that.updateTeaPercentage(0)\r\n\t\t\t\tconsole.log('茶叶初始化')\r\n\t\t\t})\r\n\t\t}, 500);\r\n\t}\r\n\r\n\t/*采茶叶活动*/\r\n}\r\n","/**\r\n * Created by rockyl on 2020-01-09.\r\n */\r\n\r\nimport GameView from \"./GameView\";\r\nimport { injectProps } from \"../props\";\r\n\r\n\r\nexport class GameWrapper extends engine.Container {\r\n\tprivate _status;\r\n\tprivate _gameView: GameView;\r\n\r\n\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\t/*\r\n\t\tevent-pickTeaGame-init //游戏初始化\r\n\t\t//event-wait-uplevel //待升级\r\n\t\tevent-add-oneScore //+1\r\n\t\tevent-pick-tea //采茶叶\r\n\t\tevent-tea-skyup //茶叶向上飞\r\n\t\tevent-hand-grasp //手抓去\r\n\t\tevent-change-TeaNum //茶叶数量 改变svga动画\r\n\t\tevent-getBasket-Type //获得篮子类型\r\n\t\tevent-setBasket-Type //设置篮子类型\r\n\t\t*/\r\n\t\t// event-getchange-TeaNum //茶叶数量{初始值totalNum,总量nowNum} 改变svga动画\r\n\t\t// event-getBasket-Type //获得篮子类型\r\n\t\t// event-hand-grasp //手抓去\r\n\r\n\t\t//event-pickTeaGame-init 游戏初始化\r\n\t\tengine.globalEvent.addEventListener('event-pickTeaGame-init', this.reset, this);\r\n\r\n\t\tengine.globalEvent.addEventListener('event-hand-grasp', this.handGrasp, this);\r\n\t\tengine.globalEvent.addEventListener('event-getClick-person', this.clickPerson, this);\r\n\t\tengine.globalEvent.addEventListener('event-getchange-TeaNum', this.setTeaNum, this);\r\n\t\tengine.globalEvent.addEventListener('event-getBasket-Type', this.setPickTeaLevel, this);\r\n\r\n\r\n\r\n\t\tlet gameView = this._gameView = new GameView();\r\n\t\tthis.addChild(gameView);\r\n\t}\r\n\r\n\t//设置茶叶数量\r\n\tsetTeaNum(event: engine.Event) {\r\n\t\tinjectProps(event.data);\r\n\t\tthis._gameView.setTeaNum(event.data);\r\n\t}\r\n\r\n\t//设置茶蓝等级\r\n\tsetPickTeaLevel(event: engine.Event) {\r\n\t\tinjectProps(event.data);\r\n\t\tthis._gameView.setPickTeaLevel(event.data);\r\n\t}\r\n\t\r\n\thandGrasp() {\r\n\t\tthis._gameView.handGrasp();\r\n\t}\r\n\t//点击人物\r\n\tclickPerson() {\r\n\t\tthis._gameView.showVerse();\r\n\t}\r\n\treset(event: engine.Event) {\r\n\t\tinjectProps(event.data);\r\n\t\tthis._gameView.visible = true;\r\n\t\tthis._gameView.reset();\r\n\t}\r\n\r\n\r\n\tstart(event: engine.Event) {\r\n\t\tinjectProps(event.data);\r\n\t\tthis._status = 1;\r\n\t\tthis._gameView.start();\r\n\t}\r\n\r\n\tpause() {\r\n\t\tthis._gameView.pause();\r\n\t}\r\n\r\n\tresume() {\r\n\t\tthis._gameView.resume();\r\n\t}\r\n\r\n\trevive() {\r\n\t\tthis._gameView.revive();\r\n\t}\r\n\r\n\tclear() {\r\n\t\tthis._gameView.visible = false;\r\n\t}\r\n\r\n\r\n\r\n\r\n\r\n\tprivate onTap(event) {\r\n\t\t//\tthis._gameView.tap(event);\r\n\t}\r\n}\r\n","/**\r\n * Created by rockyl on 2019-11-20.\r\n */\r\n\r\nimport {GameWrapper} from \"./game/GameWrapper\";\r\nimport {injectProps, prepareProps} from \"./props\";\r\n\r\nexport default function (props) {\r\n\tprepareProps();\r\n\tinjectProps(props);\r\n\r\n\tlet instance = new GameWrapper();\r\n\treturn instance;\r\n}\r\n"],"names":["__extends"],"mappings":";;;;;;CAIO,IAAI,KAAK,GAAQ,EAAE,CAAC;AAE3B,UAAgB,YAAY;KAC3B,IAAI,SAAS,GAAG,QAAQ,EAAE,CAAC;KAE3B,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;CACrC,CAAC;AAED,UAAgB,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;AA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KAAK,EAAE,CAAC;MACvB;KAGD,2BAAK,GAAL,UAAM,KAAmB;SACxB,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;SACxB,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;SACjB,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;MACvB;KAED,2BAAK,GAAL;SACC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;MACvB;KAED,4BAAM,GAAN;SACC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;MACxB;KAED,4BAAM,GAAN;SACC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;MACxB;KAED,2BAAK,GAAL;SACC,IAAI,CAAC,SAAS,CAAC,OAAO,GAAG,KAAK,CAAC;MAC/B;KAMO,2BAAK,GAAb,UAAc,KAAK;MAElB;KACF,kBAAC;CAAD,CAAC,CA3FgC,MAAM,CAAC,SAAS,GA2FhD;;;iBC5FwB,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
......@@ -178,7 +178,7 @@ export default class GameView extends engine.Container {
// setTimeout(() => {
// this.setPickTeaLevel(1)
// this.setTeaNum({ totalNum: 10, nowNum: 0, serverData: 1585290768011 })
// this.setTeaNum({ totalNum: 150, nowNum: 60, serverData: 1585290768011 })
// //this.setTeaNum({ totalNum: 100, nowNum: 0 })
// }, 500)
// setTimeout(() => {
......@@ -457,8 +457,10 @@ export default class GameView extends engine.Container {
let pickTeaSVGA = this.basketSvgaGroup[this.basketLevel];
let templength = pickTeaSVGA.children.length;
//console.log('templength',templength)
if (this.allFrames < templength)
if (this.allFrames < templength) {
pickTeaSVGA.removeChildAt(10);
}
let originframes = pickTeaSVGA.children[7];
if (!originframes) {
return;
......@@ -486,11 +488,11 @@ export default class GameView extends engine.Container {
this.basketLevel = level;
let pickTeaSVGA = this.basketSvgaGroup[level];
pickTeaSVGA.visible = true;
console.log('总共有多少', pickTeaSVGA.children.length)
//console.log('总共有多少', pickTeaSVGA.children.length)
//showLog('littleTea url')
//showLog(this.teaHalfImg['_source'])
//需要svga缓存结束
setTimeout(() => {
//setTimeout(() => {
showLog('延迟500ms')
let originframes = pickTeaSVGA.children[7];
......@@ -506,7 +508,7 @@ export default class GameView extends engine.Container {
showLog(this.teaHalfImg);
pickTeaSVGA.addChildAt(this.teaHalfImg, 10)
pickTeaSVGA.gotoAndPlay(1, true);
}, 300)
//}, 300)
}
handGrasp() {
showLog('handGrasp')
......
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