Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-libs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
劳工
zeroing-libs
Commits
7393d156
Commit
7393d156
authored
Mar 27, 2020
by
13732208043
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
最新采茶叶
parent
af3ba169
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
217 additions
and
202 deletions
+217
-202
pick-tea.json
dist/customs/pick-tea.json
+215
-0
main.js
src/custom/pick-tea/debug/main.js
+1
-82
main.js.map
src/custom/pick-tea/debug/main.js.map
+1
-1
GameView.ts
src/custom/pick-tea/src/game/GameView.ts
+0
-22
Goods.ts
src/custom/pick-tea/src/game/Goods.ts
+0
-83
object-pool-init.ts
src/custom/pick-tea/src/game/object-pool-init.ts
+0
-14
No files found.
dist/customs/pick-tea.json
0 → 100644
View file @
7393d156
{
"name"
:
"采茶叶"
,
"desc"
:
"采茶叶模块"
,
"props"
:
{
"versePos"
:
{
"alias"
:
"诗句的起始位置"
,
"type"
:
"array<number>"
,
"default"
:
"160,360"
},
"verses"
:
{
"alias"
:
"诗句"
,
"type"
:
"array<string>"
,
"default"
:
"今朝有酒今朝醉,今宵更有湘江月,找出霏霏满碗花,雨过林霏清石气,秋将山翠入诗心,生怕芳丛鹰嘴芽,老郎封寄谪仙家"
},
"verseLabel"
:
{
"alias"
:
"提示语框xys"
,
"type"
:
"array<number>"
,
"default"
:
"396,50,22"
},
"verseColor"
:
{
"alias"
:
"颜色描边"
,
"type"
:
"array<string>"
,
"default"
:
"#33628b,#99b1c5"
},
"pickTeaSpeed"
:
{
"alias"
:
"采集茶叶的速度ms"
,
"type"
:
"number"
,
"default"
:
1000
},
"basketSvgaPos"
:
{
"alias"
:
"人物的位置"
,
"type"
:
"array<number>"
,
"default"
:
"110,420"
},
"addOneSvgaPos"
:
{
"alias"
:
"+1SVGA的位置"
,
"type"
:
"array<number>"
,
"default"
:
"70,720"
},
"pickTeaSvgaPos"
:
{
"alias"
:
"采茶叶SVGA的位置"
,
"type"
:
"array<number>"
,
"default"
:
"377,530"
},
"teaSkyUpSvgaPos"
:
{
"alias"
:
"收集茶叶SVGA的位置"
,
"type"
:
"array<number>"
,
"default"
:
"320,192"
},
"handGraspSvgaPos"
:
{
"alias"
:
"手点击SVGA的位置"
,
"type"
:
"array<number>"
,
"default"
:
"543,791"
},
"handGraspMovePos"
:
{
"alias"
:
"手点击移动的位置"
,
"type"
:
"array<number>"
,
"default"
:
"460,700"
},
"progressbarBgImgPos"
:
{
"alias"
:
"进度条底图的位置"
,
"type"
:
"array<number>"
,
"default"
:
"69,818"
},
"progressbarImgPos"
:
{
"alias"
:
"进度条的位置"
,
"type"
:
"array<number>"
,
"default"
:
"-443,4"
},
"teaStarImgPos"
:
{
"alias"
:
"小茶叶的位置"
,
"type"
:
"array<number>"
,
"default"
:
"9,7"
},
"teaHalfFlagImgPos"
:
{
"alias"
:
"满缺的位置"
,
"type"
:
"array<number>"
,
"default"
:
"-15,-15"
},
"pickTeaCountPos"
:
{
"alias"
:
"文本进度的位置"
,
"type"
:
"array<number>"
,
"default"
:
"180,10"
}
},
"assets"
:
[
{
"name"
:
"气泡框"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/585743f25262b6992ac97015e22d91054d506821.png"
,
"uuid"
:
"1e6c4615-e1f4-43fe-b5de-9bfdaa27888c"
,
"ext"
:
".png"
},
{
"name"
:
"进度条底框"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/e394fce3576ddeed52fa4dceededc98820318f15.png"
,
"uuid"
:
"7436ffbc-8906-4cdc-9e9a-80a3f7126e30"
,
"ext"
:
".png"
},
{
"name"
:
"进度"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/047218962662ed238192f211719c109fa107e8e1.png"
,
"uuid"
:
"23e7861c-75a9-46bd-93f8-2825d4810d31"
,
"ext"
:
".png"
},
{
"name"
:
"茶叶进度缺"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/a99ad1582f44237f9391aeffa53b72c316a8ea83.png"
,
"uuid"
:
"cc4f6b6c-0542-4b8d-b83d-1ee31e9c0e39"
,
"ext"
:
".png"
},
{
"name"
:
"茶叶进度满"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/7b1ac4e33309adfde360c92c1cdc8299a3e1efd0.png"
,
"uuid"
:
"81728f22-c616-4133-8c78-c041cde68b79"
,
"ext"
:
".png"
},
{
"name"
:
"小茶叶"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/e938df1513919985c573128e1ed8074c9cc19dd5.png"
,
"uuid"
:
"b30b3093-6097-4cc5-9364-ad1050f86c6e"
,
"ext"
:
".png"
},
{
"name"
:
"茶叶-满"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/acd219c8c8d472a3469183ba8d32568372e75797.png"
,
"uuid"
:
"41431fe5-523c-4e21-a2bc-9dc4641d27e8"
,
"ext"
:
".png"
},
{
"name"
:
"茶叶-少"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/38f1874d0688fb8b621dfb1d3028d6f8ac61374d.png"
,
"uuid"
:
"5765bb2b-3e7b-48fe-9e06-3c76a78c92dc"
,
"ext"
:
".png"
},
{
"name"
:
"采茶童-纸篮子"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/52f24f84d31709faea0fc35193692b134fe2e40d.svga"
,
"uuid"
:
"8a7801dd-b802-4571-9f8e-e9acfb9c4527"
,
"ext"
:
".svga"
},
{
"name"
:
"采茶童-布篮子"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/7ca607d0fd5471d33a4bb58c0d92122fe4ae425f.svga"
,
"uuid"
:
"ba183e10-4059-4c3e-b9ec-c78192d5e980"
,
"ext"
:
".svga"
},
{
"name"
:
"采茶童-竹编篮"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/91b8f35ce06b9c65cb504c59ac6c3961f625fb2e.svga"
,
"uuid"
:
"c7414e60-5312-4586-984a-d8b45a614621"
,
"ext"
:
".svga"
},
{
"name"
:
"采茶童-木篮子"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/de210099641d4d4fb2d323cc9da17f2f4e48a038.svga"
,
"uuid"
:
"c492cbd4-aa42-4425-846f-86a91fd3f198"
,
"ext"
:
".svga"
},
{
"name"
:
"待升级"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/80834a2a25aca30b79dae655003fb7d6b8dc1b49.svga"
,
"uuid"
:
"eb1f7929-f812-4b88-8345-5d61977fce39"
,
"ext"
:
".svga"
},
{
"name"
:
"+1"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/72c631a1da7b7969b7995fa16ccc1f435b9b57db.svga"
,
"uuid"
:
"16a57950-0201-4904-8c65-6378fab65f59"
,
"ext"
:
".svga"
},
{
"name"
:
"采茶叶"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/6b89b11a26d0f91f1dad9e14b2d099e0d8450032.svga"
,
"uuid"
:
" 81428208-0274-4e73-9f5e-27bb4a57f80a"
,
"ext"
:
".svga"
},
{
"name"
:
"茶叶向上飞"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/676ff9aabe60a49ca92f6ade26e62c6bb76be922.svga"
,
"uuid"
:
"de7273ab-41be-4248-9f05-cdf8a7e3585b"
,
"ext"
:
".svga"
},
{
"name"
:
"手抓去"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/6b774da91be08d1c9f773d88ace4927c3c5de583.svga"
,
"uuid"
:
"f1e7a7cf-95c7-4c91-a30b-935e31ea0084"
,
"ext"
:
".svga"
}
],
"events"
:
{
"in"
:
{
"event-getchange-TeaNum"
:
{
"alias"
:
"茶叶数量{初始值totalNum,总量nowNum} "
},
"event-getBasket-Type"
:
{
"alias"
:
"获得篮子类型"
},
"event-hand-grasp"
:
{
"alias"
:
"手抓去"
}
},
"out"
:
{
"event-setchange-TeaNum"
:
{
"alias"
:
""
,
"data"
:
{}
},
"event-setBasket-Typ"
:
{
"alias"
:
""
,
"data"
:
{}
}
}
},
"id"
:
"pick-tea"
,
"code"
:
"(function (global, factory) {
\n\t
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('tslib')) :
\n\t
typeof 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\t
var props = {};
\r\n\t
function prepareProps() {
\r\n\t
var metaProps = getProps();
\r\n\t
engine.injectProp(props, metaProps);
\r\n\t
}
\r\n\t
function injectProps(p) {
\r\n\t
engine.injectProp(props, p);
\r\n\t
}
\r\n\t
//# sourceMappingURL=props.js.map
\n\n\t
function getTexture(uuid) {
\r\n\t
return engine.Texture.from(getAssetByUUID(uuid).uuid);
\r\n\t
}
\r\n\t
function getTextureByName(name) {
\r\n\t
return getTexture(engine.getAssetByName(name).uuid);
\r\n\t
}
\r\n\t
function 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\t
//# sourceMappingURL=utils.js.map
\n\n\t
var 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
var _this = this;
\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
var bgGroud = new engine.Image();
\r\n\t
bgGroud.source = '//yun.duiba.com.cn/aurora/assets/a988c47db8d3131faad175c7c2944773392be643.png';
\r\n\t
this.addChild(bgGroud);
\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.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.addOneSvga);
\r\n\t
this.pickTeaBg.addChild(this.pickTeaSvga);
\r\n\t
this.pickTeaBg.addChild(this.teaSkyUpSvga);
\r\n\t
this.pickTeaBg.addChild(this.handGraspSvga);
\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.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
console.log(this.progressbarImg.mask);
\r\n\t
this.progressbarBgImg.addChild(this.progressbarImg);
\r\n\t
this.progressbarBgImg.addChild(mask);
\r\n\t
console.log('遮罩坐标');
\r\n\t
console.log(mask.x, mask.y);
\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
var myDate = new Date();
\r\n\t
var nowData = myDate.getTime();
\r\n\t
this.setTeaNum({ totalNum: 430, nowNum: 0, serverData: nowData });
\r\n\t
this.initChildrenPos();
\r\n\t
setInterval(function () {
\r\n\t
_this.handGrasp();
\r\n\t
}, 5000);
\r\n\t
};
\r\n\t
GameView.prototype.reset = function () {
\r\n\t
var _this = this;
\r\n\t
console.log('111111111reset1');
\r\n\t
this.initView();
\r\n\t
setTimeout(function () {
\r\n\t
return _this.setPickTeaLevel(1);
\r\n\t
}, 500);
\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.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
this.basketSvgaGroup[i].addEventListener(engine.MouseEvent.CLICK, this.showVerse, this);
\r\n\t
}
\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.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.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 = '11';
\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
return tslib.__awaiter(this, void 0, void 0, function () {
\r\n\t
var random, verse, y;
\r\n\t
var _this = this;
\r\n\t
return tslib.__generator(this, function (_a) {
\r\n\t
console.log('显示诗句');
\r\n\t
if (!this._touchEnabled) {
\r\n\t
return [2];
\r\n\t
}
\r\n\t
this._touchEnabled = false;
\r\n\t
this.verseImg.visible = true;
\r\n\t
random = Math.floor(Math.random() * 3);
\r\n\t
console.log('random', random);
\r\n\t
console.log('props.verses');
\r\n\t
console.log(props.verses);
\r\n\t
verse = props.verses[random];
\r\n\t
console.log('verse', verse);
\r\n\t
this.verseLabel.text = verse;
\r\n\t
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
_this._touchEnabled = true;
\r\n\t
});
\r\n\t
return [2];
\r\n\t
});
\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
console.log('清理定时器,重新设置同步');
\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.pickTeaCount.text = nowNum + '/' + totalNum;
\r\n\t
this.getTeaPercentage(nowNum, totalNum);
\r\n\t
var surplus = nowNum - totalNum;
\r\n\t
console.log('surplus', surplus);
\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 / 1000));
\r\n\t
console.log('fbdvalue', fbdvalue);
\r\n\t
var dataDiff = 0;
\r\n\t
var x = -width * (1 - nowNum / totalNum);
\r\n\t
console.log('x', x);
\r\n\t
this.progressbarImg.x = parseFloat(x.toFixed(3));
\r\n\t
console.log('this.progressbarImg.x', this.progressbarImg.x);
\r\n\t
var step = (width - (width - Math.abs(this.progressbarImg.x))) / surplus;
\r\n\t
console.log('进图条每秒比例原始step', step);
\r\n\t
step = parseFloat(step.toFixed(3));
\r\n\t
console.log('进图条每秒比例step', step);
\r\n\t
this.addOneSvga.play(1, true);
\r\n\t
var speed = props.pickTeaSpeed;
\r\n\t
var 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
this.schedule = setInterval(function () {
\r\n\t
if (nowNum == totalNum) {
\r\n\t
console.log('达到最大长度');
\r\n\t
clearInterval(_this.schedule);
\r\n\t
engine.Tween.pauseTweens(teaFullRotation);
\r\n\t
_this.progressbarImg.x = 0;
\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
if (_this.progressbarImg.x <= -2) {
\r\n\t
_this.progressbarImg.x -= step;
\r\n\t
}
\r\n\t
_this.getTeaPercentage(nowNum, totalNum);
\r\n\t
nowNum++;
\r\n\t
dataDiff++;
\r\n\t
myDate = new Date();
\r\n\t
nowData = myDate.getTime();
\r\n\t
console.log('nowData');
\r\n\t
console.log(nowData);
\r\n\t
console.log('nowData - serverData) / 1000 - dataDiff', (nowData - serverData) / 1000 - (fbdvalue + dataDiff));
\r\n\t
if (Math.abs((nowData - serverData) / 1000) - dataDiff > (fbdvalue + 3)) {
\r\n\t
clearInterval(_this.schedule);
\r\n\t
engine.Tween.pauseTweens(teaFullRotation);
\r\n\t
engine.globalEvent.dispatchEvent('event-setchange-TeaNum');
\r\n\t
return;
\r\n\t
}
\r\n\t
console.log('this.progressbarImg.x', _this.progressbarImg.x);
\r\n\t
}, speed);
\r\n\t
};
\r\n\t
GameView.prototype.getTeaPercentage = function (nowNum, totalNum) {
\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
console.log('teaPercentage', teaPercentage);
\r\n\t
if (this.nowPercentage != teaPercentage) {
\r\n\t
console.log('状态改变');
\r\n\t
this.nowPercentage = teaPercentage;
\r\n\t
this.updateTeaPercentage(teaPercentage);
\r\n\t
}
\r\n\t
};
\r\n\t
GameView.prototype.updateTeaPercentage = function (teaPercentage) {
\r\n\t
if (teaPercentage === void 0) { teaPercentage = 0; }
\r\n\t
console.log('需要更换茶叶数量皮肤');
\r\n\t
console.log('延迟500ms');
\r\n\t
var pickTeaSVGA = this.basketSvgaGroup[1];
\r\n\t
console.log('pickTeaSVGA');
\r\n\t
console.log(pickTeaSVGA);
\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
console.log('this.teaHalfImg');
\r\n\t
console.log(this.teaHalfImg);
\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
console.log('setPickTeaLevel', level);
\r\n\t
var pickTeaSVGA = this.basketSvgaGroup[level];
\r\n\t
pickTeaSVGA.visible = true;
\r\n\t
setTimeout(function () {
\r\n\t
console.log('延迟500ms');
\r\n\t
var originframes = pickTeaSVGA.children[7];
\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
console.log('this.teaHalfImg');
\r\n\t
console.log(_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
console.log('handGrasp');
\r\n\t
var that = this;
\r\n\t
setTimeout(function () {
\r\n\t
that.handGraspSvga.play(1, true);
\r\n\t
engine.Tween.get(that.handGraspSvga)
\r\n\t
.to({ x: props.handGraspMovePos[0], y: props.handGraspMovePos[1] }, 600).call(function () {
\r\n\t
that.handGraspSvga.x = props.handGraspSvgaPos[0];
\r\n\t
that.handGraspSvga.y = props.handGraspSvgaPos[1];
\r\n\t
that.pickTeaSvga.visible = true;
\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
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
});
\r\n\t
}, 500);
\r\n\t
};
\r\n\t
return GameView;
\r\n\t
}(engine.Container));
\r\n\t
//# sourceMappingURL=GameView.js.map
\n\n\t
var 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-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.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.handGrasp = function () {
\r\n\t
this._gameView.handGrasp();
\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\t
function 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\t
return index;
\n\n
})));
\n
"
}
src/custom/pick-tea/debug/main.js
View file @
7393d156
...
@@ -27,85 +27,6 @@
...
@@ -27,85 +27,6 @@
}
}
//# sourceMappingURL=utils.js.map
//# sourceMappingURL=utils.js.map
var
Goods
=
(
function
(
_super
)
{
tslib
.
__extends
(
Goods
,
_super
);
function
Goods
()
{
var
_this
=
_super
.
call
(
this
)
||
this
;
var
body
;
body
=
_this
.
_body
=
new
engine
.
Rect
();
var
rain
=
new
engine
.
Sprite
(
getTextureByName
(
'雨滴'
));
rain
[
"npcType"
]
=
"rain"
;
var
stone
=
new
engine
.
Sprite
(
getTextureByName
(
'石块'
));
stone
[
"npcType"
]
=
"stone"
;
var
boom
=
new
engine
.
Sprite
(
getTextureByName
(
'炸弹'
));
boom
[
"npcType"
]
=
"boom"
;
rain
.
visible
=
false
;
stone
.
visible
=
false
;
boom
.
visible
=
false
;
body
.
addChild
(
rain
);
body
.
addChild
(
stone
);
body
.
addChild
(
boom
);
_this
.
addChild
(
body
);
body
.
width
=
.
0001
;
body
.
height
=
.
0001
;
body
.
mouseEnabled
=
false
;
return
_this
;
}
Goods
.
prototype
.
getRandomNumberByRange
=
function
(
start
,
end
)
{
return
Math
.
floor
(
Math
.
random
()
*
(
end
-
start
)
+
start
);
};
Goods
.
prototype
.
reset
=
function
()
{
this
.
visible
=
true
;
this
.
rotation
=
0
;
this
.
anchorOffsetY
=
0
;
this
.
y
=
0
;
this
.
x
=
(
750
-
120
)
*
Math
.
random
()
+
30
;
this
.
rotation
=
0
;
var
random
=
Math
.
random
();
if
(
random
<
props
.
goodsProbability
[
0
])
{
this
.
showNpc
(
"rain"
);
}
else
if
(
random
>=
props
.
goodsProbability
[
0
]
&&
random
<=
(
props
.
goodsProbability
[
0
]
+
props
.
goodsProbability
[
1
]))
{
this
.
showNpc
(
"stone"
);
}
else
if
(
random
>
(
props
.
goodsProbability
[
0
]
+
props
.
goodsProbability
[
1
]))
{
this
.
showNpc
(
"boom"
);
}
};
Goods
.
prototype
.
showNpc
=
function
(
type
)
{
for
(
var
i
=
0
;
i
<
this
.
_body
.
children
.
length
;
i
++
)
{
this
.
_body
.
children
[
i
].
visible
=
false
;
this
.
_body
.
children
[
i
].
mouseEnabled
=
false
;
}
for
(
var
i
=
0
;
i
<
this
.
_body
.
children
.
length
;
i
++
)
{
if
(
this
.
_body
.
children
[
i
][
"npcType"
]
==
type
)
{
this
[
"npcType"
]
=
type
;
this
.
_body
.
children
[
i
].
visible
=
true
;
this
.
_body
.
children
[
i
].
mouseEnabled
=
false
;
}
}
};
Object
.
defineProperty
(
Goods
.
prototype
,
"anchorOffsetY"
,
{
set
:
function
(
v
)
{
this
.
_body
.
y
=
v
;
},
enumerable
:
true
,
configurable
:
true
});
return
Goods
;
}(
engine
.
Container
));
//# sourceMappingURL=Goods.js.map
var
ObjectPool
=
engine
.
ObjectPool
;
var
PoolName
=
'goods'
;
ObjectPool
.
registerPool
(
PoolName
,
function
()
{
return
new
Goods
();
},
function
(
item
,
data
)
{
item
.
reset
();
});
//# sourceMappingURL=object-pool-init.js.map
var
ObjectPool$1
=
engine
.
ObjectPool
;
var
GameView
=
(
function
(
_super
)
{
var
GameView
=
(
function
(
_super
)
{
tslib
.
__extends
(
GameView
,
_super
);
tslib
.
__extends
(
GameView
,
_super
);
function
GameView
()
{
function
GameView
()
{
...
@@ -431,11 +352,9 @@
...
@@ -431,11 +352,9 @@
});
});
},
500
);
},
500
);
};
};
GameView
.
prototype
.
recycleGoods
=
function
()
{
return
;
};
return
GameView
;
return
GameView
;
}(
engine
.
Container
));
}(
engine
.
Container
));
//# sourceMappingURL=GameView.js.map
var
GameWrapper
=
(
function
(
_super
)
{
var
GameWrapper
=
(
function
(
_super
)
{
tslib
.
__extends
(
GameWrapper
,
_super
);
tslib
.
__extends
(
GameWrapper
,
_super
);
...
...
src/custom/pick-tea/debug/main.js.map
View file @
7393d156
{"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/Goods.ts","src/custom/pick-tea/src/game/object-pool-init.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\n\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\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\n * Created by rockyl on 2020-02-02.\r\n *\r\n * 掉落物品\r\n */\r\nimport {getTextureByName} from \"./utils\";\r\nimport {props} from \"../props\";\r\n\r\nexport class Goods extends engine.Container {\r\n\tprivate _body:engine.Rect\r\n\tprivate _toY;\r\n\r\n\tconstructor() {\r\n\t\tsuper();\r\n\r\n\t\tlet body\r\n\t\tbody = this._body =new engine.Rect()\r\n\t\t\r\n\t\t\r\n\t\tlet rain = new engine.Sprite(getTextureByName('雨滴'));\r\n\t\train[\"npcType\"]=\"rain\"\r\n\t\tlet stone = new engine.Sprite(getTextureByName('石块'));\r\n\t\tstone[\"npcType\"]=\"stone\"\r\n\t\tlet boom = new engine.Sprite(getTextureByName('炸弹'));\r\n\t\tboom[\"npcType\"]=\"boom\"\r\n\r\n\t\train.visible=false;\r\n\t\tstone.visible=false;\r\n\t\tboom.visible=false;\r\n\t\tbody.addChild(rain)\r\n\t\tbody.addChild(stone)\r\n\t\tbody.addChild(boom)\r\n\t\t\r\n\t\tthis.addChild(body);\r\n\t\tbody.width=.0001;\r\n\t\tbody.height=.0001;\r\n\t\tbody.mouseEnabled=false;\r\n\t}\r\n\r\n\r\n\tgetRandomNumberByRange(start, end) {\r\n\t\treturn Math.floor(Math.random() * (end - start) + start)\r\n\t}\r\n\r\n\treset() {\r\n\t\tthis.visible = true;\r\n\t\tthis.rotation = 0;\r\n\t\tthis.anchorOffsetY = 0;\r\n\t\tthis.y = 0;\r\n\t\tthis.x = (750-120)*Math.random()+30;\r\n\t\tthis.rotation = 0;\r\n\t\tlet random=Math.random()\r\n\r\n\t\tif(random<props.goodsProbability[0]){\r\n\t\t\tthis.showNpc(\"rain\")\r\n\t\t}else if(random>=props.goodsProbability[0]&&random<=(props.goodsProbability[0]+props.goodsProbability[1])){\r\n\t\t\tthis.showNpc(\"stone\")\r\n\t\t}else if(random>(props.goodsProbability[0]+props.goodsProbability[1])){\r\n\t\t\tthis.showNpc(\"boom\")\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tshowNpc(type){\r\n\t\tfor(let i=0;i<this._body.children.length;i++){\r\n\t\t\tthis._body.children[i].visible=false;\r\n\t\t\tthis._body.children[i].mouseEnabled=false;\r\n\t\t}\r\n\r\n\t\tfor(let i=0;i<this._body.children.length;i++){\r\n\t\t\tif(this._body.children[i][\"npcType\"]==type){\r\n\t\t\t\tthis[\"npcType\"]=type\r\n\t\t\t\tthis._body.children[i].visible=true;\r\n\t\t\t\tthis._body.children[i].mouseEnabled=false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}\r\n\r\n\tset anchorOffsetY(v) {\r\n\t\tthis._body.y = v;\r\n\t}\r\n}\r\n","/**\r\n * Created by rockyl on 2020-02-03.\r\n */\r\n\r\nimport {Goods} from \"./Goods\";\r\nimport ObjectPool = engine.ObjectPool;\r\n\r\nexport const PoolName: string = 'goods';\r\n\r\nObjectPool.registerPool(PoolName, function () {\r\n\treturn new Goods();\r\n}, function (item: Goods, data) {\r\n\titem.reset();\r\n});\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 { Goods } from \"./Goods\";\r\nimport { PoolName } from \"./object-pool-init\";\r\nimport { Tealeaf } from \"./Tealeaf\";\r\nimport { RedPackRain } from \"../../../redpack-rain/src/game/RedPackRain\";\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\r\n\tprivate verseImg: 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\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\r\n\r\n\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\tprivate _goods: Goods;\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\r\n\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\r\n\t\tlet bgGroud = new engine.Image()\r\n\t\tbgGroud.source = '//yun.duiba.com.cn/aurora/assets/a988c47db8d3131faad175c7c2944773392be643.png'\r\n\t\tthis.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\t\tthis.teaSkyUpSvga = createSvga(\"茶叶向上飞\");\r\n\t\tthis.handGraspSvga = createSvga(\"手抓去\");\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\tthis.pickTeaBg.addChild(this.addOneSvga);\r\n\t\tthis.pickTeaBg.addChild(this.pickTeaSvga);\r\n\t\tthis.pickTeaBg.addChild(this.teaSkyUpSvga);\r\n\t\tthis.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\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\t//mask.fillColor = 'black'\r\n\r\n\t\tthis.progressbarImg.mask = mask\r\n\t\tconsole.log(this.progressbarImg.mask)\r\n\r\n\t\tthis.progressbarBgImg.addChild(this.progressbarImg);\r\n\t\tthis.progressbarBgImg.addChild(mask);\r\n\t\tconsole.log('遮罩坐标')\r\n\t\tconsole.log(mask.x, mask.y)\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\r\n\r\n\t\t// this.initView();\r\n\t\t// this.setPickTeaLevel(1)\r\n\r\n\t\tlet myDate = new Date();\r\n\t\tlet nowData = myDate.getTime();\r\n\t\tthis.setTeaNum({ totalNum: 430, nowNum: 0, serverData: nowData })\r\n\t\tthis.initChildrenPos();\r\n\r\n\t\tsetInterval(() => {\r\n\t\t\tthis.handGrasp();\r\n\t\t\t//this.setTeaNum({ totalNum: 430, nowNum: 120 })\r\n\t\t}, 5000)\r\n\r\n\r\n\t}\r\n\treset() {\r\n\t\tconsole.log('111111111reset1')\r\n\t\tthis.initView()\r\n\t\tsetTimeout(() =>\r\n\t\t\tthis.setPickTeaLevel(1)\r\n\t\t\t, 500)\r\n\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\t// for (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// \tthis.basketSvgaGroup[i].addEventListener(engine.MouseEvent.CLICK, this.showVerse, this);\r\n\t\t// }\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.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\tthis.basketSvgaGroup[i].addEventListener(engine.MouseEvent.CLICK, this.showVerse, this);\r\n\t\t}\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\t\tthis.teaSkyUpSvga.x = props.teaSkyUpSvgaPos[0];\r\n\t\tthis.teaSkyUpSvga.y = props.teaSkyUpSvgaPos[1];\r\n\t\tthis.handGraspSvga.x = props.handGraspSvgaPos[0];\r\n\t\tthis.handGraspSvga.y = props.handGraspSvgaPos[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\t\t//this.progressbarImg.width = 0;\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\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 = '11'\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\tasync showVerse() {\r\n\t\tconsole.log('显示诗句')\r\n\t\tif (!this._touchEnabled) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._touchEnabled = false;\r\n\t\tthis.verseImg.visible = true;\r\n\t\tlet random = Math.floor(Math.random() * 3);\r\n\t\tconsole.log('random', random)\r\n\t\tconsole.log('props.verses')\r\n\r\n\t\tconsole.log(props.verses)\r\n\t\tlet verse = props.verses[random];\r\n\t\tconsole.log('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\tthis._touchEnabled = true;\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\tconsole.log('清理定时器,重新设置同步')\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\r\n\t\tthis.pickTeaCount.text = nowNum + '/' + totalNum;\r\n\t\tthis.getTeaPercentage(nowNum, totalNum);\r\n\t\tlet surplus = nowNum - totalNum;\r\n\t\tconsole.log('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 / 1000))\r\n\t\tconsole.log('fbdvalue', fbdvalue)\r\n\r\n\t\t/**/\r\n\t\t//设置数据校正\r\n\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\t\tconsole.log('x', x);\r\n\t\tthis.progressbarImg.x = parseFloat(x.toFixed(3));\r\n\t\tconsole.log('this.progressbarImg.x', this.progressbarImg.x)\r\n\t\tlet step = (width - (width - Math.abs(this.progressbarImg.x))) / surplus\r\n\r\n\t\tconsole.log('进图条每秒比例原始step', step)\r\n\t\tstep = parseFloat(step.toFixed(3));\r\n\t\tconsole.log('进图条每秒比例step', step)\r\n\t\tthis.addOneSvga.play(1, true);\r\n\r\n\t\tlet speed = props.pickTeaSpeed;\r\n\r\n\t\tlet teaFullRotation = engine.Tween.get(this.teaHalfFlagImg, { loop: true })\r\n\t\t\t.to({ rotation: 360 }, speed).call(() => {\r\n\t\t\t\tthis.teaHalfFlagImg.rotation = 0;\r\n\t\t\t})\r\n\t\tthis.schedule = setInterval(() => {\r\n\t\t\tif (nowNum == totalNum) {\r\n\t\t\t\tconsole.log('达到最大长度');\r\n\t\t\t\tclearInterval(this.schedule);\r\n\t\t\t\tengine.Tween.pauseTweens(teaFullRotation);\r\n\t\t\t\tthis.progressbarImg.x = 0\r\n\t\t\t\tthis.teaHalfFlagImg.visible = false;\r\n\t\t\t\tthis.teaFullFlagImg.visible = !this.teaHalfFlagImg.visible\r\n\t\t\t\tthis.addOneSvga.visible = !this.teaHalfFlagImg.visible\r\n\t\t\t\tthis.addOneSvga.stop();\r\n\t\t\t}\r\n\t\t\tif (this.progressbarImg.x <= -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\tnowNum++;\r\n\t\t\tdataDiff++;\r\n\t\t\tmyDate = new Date();\r\n\t\t\tnowData = myDate.getTime();\r\n\t\t\tconsole.log('nowData')\r\n\t\t\tconsole.log(nowData)\r\n\t\t\tconsole.log('nowData - serverData) / 1000 - dataDiff', (nowData - serverData) / 1000 - (fbdvalue + dataDiff))\r\n\r\n\t\t\tif (Math.abs((nowData - serverData) / 1000) - dataDiff > (fbdvalue + 3)) {\r\n\t\t\t\tclearInterval(this.schedule);\r\n\t\t\t\tengine.Tween.pauseTweens(teaFullRotation);\r\n\t\t\t\tengine.globalEvent.dispatchEvent('event-setchange-TeaNum');\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tconsole.log('this.progressbarImg.x', this.progressbarImg.x)\r\n\t\t}, speed)\r\n\t}\r\n\tgetTeaPercentage(nowNum, totalNum) {\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\tconsole.log('teaPercentage', teaPercentage)\r\n\t\tif (this.nowPercentage != teaPercentage) {\r\n\t\t\tconsole.log('状态改变')\r\n\t\t\tthis.nowPercentage = teaPercentage;\r\n\t\t\tthis.updateTeaPercentage(teaPercentage);\r\n\t\t}\r\n\t}\r\n\r\n\t//需要更换茶叶数量皮肤\r\n\tupdateTeaPercentage(teaPercentage = 0) {\r\n\t\tconsole.log('需要更换茶叶数量皮肤')\r\n\t\tconsole.log('延迟500ms')\r\n\t\tlet pickTeaSVGA = this.basketSvgaGroup[1];\r\n\t\tconsole.log('pickTeaSVGA')\r\n\t\tconsole.log(pickTeaSVGA)\r\n\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\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\tconsole.log('this.teaHalfImg');\r\n\t\tconsole.log(this.teaHalfImg);\r\n\t\tpickTeaSVGA.addChildAt(this.teaHalfImg, 10)\r\n\t}\r\n\r\n\tsetPickTeaLevel(level) {\r\n\t\tconsole.log('setPickTeaLevel', level);\r\n\t\tlet pickTeaSVGA = this.basketSvgaGroup[level];\r\n\t\tpickTeaSVGA.visible = true;\r\n\t\t// console.log('littleTea url')\r\n\t\t// console.log(this.teaHalfImg['_source'])\r\n\t\t//需要svga缓存结束\r\n\t\tsetTimeout(() => {\r\n\t\t\tconsole.log('延迟500ms')\r\n\t\t\tlet originframes = pickTeaSVGA.children[7];\r\n\t\t\t//按照采茶叶的多少来 设置茶叶是不是满的图片\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\tconsole.log('this.teaHalfImg');\r\n\t\t\tconsole.log(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\tconsole.log('handGrasp')\r\n\t\tlet that = this;\r\n\t\tsetTimeout(() => {\r\n\t\t\tthat.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\t//console.log('手指移动')\r\n\t\t\tengine.Tween.get(that.handGraspSvga)\r\n\t\t\t\t.to({ x: props.handGraspMovePos[0], y: props.handGraspMovePos[1] }, 600).call(() => {\r\n\t\t\t\t\tthat.handGraspSvga.x = props.handGraspSvgaPos[0];\r\n\t\t\t\t\tthat.handGraspSvga.y = props.handGraspSvgaPos[1];\r\n\t\t\t\t\t//console.log('this.pickTeaSvga.play')\r\n\t\t\t\t\t//setTimeout(() => {\r\n\t\t\t\t\tthat.pickTeaSvga.visible = true\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\t//console.log('this.teaSkyUpSvga.play')\r\n\t\t\t\tthat.teaSkyUpSvga.visible = true\r\n\t\t\t\tthat.teaSkyUpSvga.play(1, false);\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})\r\n\r\n\t\t}, 500);\r\n\t}\r\n\t/*采茶叶活动*/\r\n\r\n\t/**\r\n\t * 回收对象\r\n\t */\r\n\tprivate recycleGoods() {\r\n\t\treturn\r\n\t\tclearTimeout(this.timer)\r\n\t\tclearInterval(this.countdownTimer)\r\n\t\tfor (let goods of this.goodsItems) {\r\n\t\t\tif (goods) {\r\n\t\t\t\tthis.removeChild(goods);\r\n\t\t\t\tObjectPool.recycleObject(PoolName, goods);\r\n\t\t\t\tgoods.removeEventListener(engine.Event.ENTER_FRAME, goods[\"onGoodsEnter\"], this);\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.goodsItems = []\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-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\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\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\thandGrasp() {\r\n\t\tthis._gameView.handGrasp();\r\n\t}\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","ObjectPool"],"mappings":";;;;;;CAIO,IAAI,KAAK,GAAQ,EAAE,CAAC;AAE3B,UAAgB,YAAY;KAC3B,IAAI,SAA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WAAW,EAAE,CAAC;KACjC,OAAO,QAAQ,CAAC;CACjB,CAAC;;;;;;;;;"}
{"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\n\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\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\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 { Tealeaf } from \"./Tealeaf\";\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\r\n\tprivate verseImg: 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\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\r\n\r\n\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\r\n\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\r\n\t\tlet bgGroud = new engine.Image()\r\n\t\tbgGroud.source = '//yun.duiba.com.cn/aurora/assets/a988c47db8d3131faad175c7c2944773392be643.png'\r\n\t\tthis.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\t\tthis.teaSkyUpSvga = createSvga(\"茶叶向上飞\");\r\n\t\tthis.handGraspSvga = createSvga(\"手抓去\");\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\tthis.pickTeaBg.addChild(this.addOneSvga);\r\n\t\tthis.pickTeaBg.addChild(this.pickTeaSvga);\r\n\t\tthis.pickTeaBg.addChild(this.teaSkyUpSvga);\r\n\t\tthis.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\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\t//mask.fillColor = 'black'\r\n\r\n\t\tthis.progressbarImg.mask = mask\r\n\t\tconsole.log(this.progressbarImg.mask)\r\n\r\n\t\tthis.progressbarBgImg.addChild(this.progressbarImg);\r\n\t\tthis.progressbarBgImg.addChild(mask);\r\n\t\tconsole.log('遮罩坐标')\r\n\t\tconsole.log(mask.x, mask.y)\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\r\n\r\n\t\t// this.initView();\r\n\t\t// this.setPickTeaLevel(1)\r\n\r\n\t\tlet myDate = new Date();\r\n\t\tlet nowData = myDate.getTime();\r\n\t\tthis.setTeaNum({ totalNum: 430, nowNum: 0, serverData: nowData })\r\n\t\tthis.initChildrenPos();\r\n\r\n\t\tsetInterval(() => {\r\n\t\t\tthis.handGrasp();\r\n\t\t\t//this.setTeaNum({ totalNum: 430, nowNum: 120 })\r\n\t\t}, 5000)\r\n\r\n\r\n\t}\r\n\treset() {\r\n\t\tconsole.log('111111111reset1')\r\n\t\tthis.initView()\r\n\t\tsetTimeout(() =>\r\n\t\t\tthis.setPickTeaLevel(1)\r\n\t\t\t, 500)\r\n\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\t// for (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// \tthis.basketSvgaGroup[i].addEventListener(engine.MouseEvent.CLICK, this.showVerse, this);\r\n\t\t// }\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.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\tthis.basketSvgaGroup[i].addEventListener(engine.MouseEvent.CLICK, this.showVerse, this);\r\n\t\t}\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\t\tthis.teaSkyUpSvga.x = props.teaSkyUpSvgaPos[0];\r\n\t\tthis.teaSkyUpSvga.y = props.teaSkyUpSvgaPos[1];\r\n\t\tthis.handGraspSvga.x = props.handGraspSvgaPos[0];\r\n\t\tthis.handGraspSvga.y = props.handGraspSvgaPos[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\t\t//this.progressbarImg.width = 0;\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\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 = '11'\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\tasync showVerse() {\r\n\t\tconsole.log('显示诗句')\r\n\t\tif (!this._touchEnabled) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._touchEnabled = false;\r\n\t\tthis.verseImg.visible = true;\r\n\t\tlet random = Math.floor(Math.random() * 3);\r\n\t\tconsole.log('random', random)\r\n\t\tconsole.log('props.verses')\r\n\r\n\t\tconsole.log(props.verses)\r\n\t\tlet verse = props.verses[random];\r\n\t\tconsole.log('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\tthis._touchEnabled = true;\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\tconsole.log('清理定时器,重新设置同步')\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\r\n\t\tthis.pickTeaCount.text = nowNum + '/' + totalNum;\r\n\t\tthis.getTeaPercentage(nowNum, totalNum);\r\n\t\tlet surplus = nowNum - totalNum;\r\n\t\tconsole.log('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 / 1000))\r\n\t\tconsole.log('fbdvalue', fbdvalue)\r\n\r\n\t\t/**/\r\n\t\t//设置数据校正\r\n\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\t\tconsole.log('x', x);\r\n\t\tthis.progressbarImg.x = parseFloat(x.toFixed(3));\r\n\t\tconsole.log('this.progressbarImg.x', this.progressbarImg.x)\r\n\t\tlet step = (width - (width - Math.abs(this.progressbarImg.x))) / surplus\r\n\r\n\t\tconsole.log('进图条每秒比例原始step', step)\r\n\t\tstep = parseFloat(step.toFixed(3));\r\n\t\tconsole.log('进图条每秒比例step', step)\r\n\t\tthis.addOneSvga.play(1, true);\r\n\r\n\t\tlet speed = props.pickTeaSpeed;\r\n\r\n\t\tlet teaFullRotation = engine.Tween.get(this.teaHalfFlagImg, { loop: true })\r\n\t\t\t.to({ rotation: 360 }, speed).call(() => {\r\n\t\t\t\tthis.teaHalfFlagImg.rotation = 0;\r\n\t\t\t})\r\n\t\tthis.schedule = setInterval(() => {\r\n\t\t\tif (nowNum == totalNum) {\r\n\t\t\t\tconsole.log('达到最大长度');\r\n\t\t\t\tclearInterval(this.schedule);\r\n\t\t\t\tengine.Tween.pauseTweens(teaFullRotation);\r\n\t\t\t\tthis.progressbarImg.x = 0\r\n\t\t\t\tthis.teaHalfFlagImg.visible = false;\r\n\t\t\t\tthis.teaFullFlagImg.visible = !this.teaHalfFlagImg.visible\r\n\t\t\t\tthis.addOneSvga.visible = !this.teaHalfFlagImg.visible\r\n\t\t\t\tthis.addOneSvga.stop();\r\n\t\t\t}\r\n\t\t\tif (this.progressbarImg.x <= -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\tnowNum++;\r\n\t\t\tdataDiff++;\r\n\t\t\tmyDate = new Date();\r\n\t\t\tnowData = myDate.getTime();\r\n\t\t\tconsole.log('nowData')\r\n\t\t\tconsole.log(nowData)\r\n\t\t\tconsole.log('nowData - serverData) / 1000 - dataDiff', (nowData - serverData) / 1000 - (fbdvalue + dataDiff))\r\n\r\n\t\t\tif (Math.abs((nowData - serverData) / 1000) - dataDiff > (fbdvalue + 3)) {\r\n\t\t\t\tclearInterval(this.schedule);\r\n\t\t\t\tengine.Tween.pauseTweens(teaFullRotation);\r\n\t\t\t\tengine.globalEvent.dispatchEvent('event-setchange-TeaNum');\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tconsole.log('this.progressbarImg.x', this.progressbarImg.x)\r\n\t\t}, speed)\r\n\t}\r\n\tgetTeaPercentage(nowNum, totalNum) {\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\tconsole.log('teaPercentage', teaPercentage)\r\n\t\tif (this.nowPercentage != teaPercentage) {\r\n\t\t\tconsole.log('状态改变')\r\n\t\t\tthis.nowPercentage = teaPercentage;\r\n\t\t\tthis.updateTeaPercentage(teaPercentage);\r\n\t\t}\r\n\t}\r\n\r\n\t//需要更换茶叶数量皮肤\r\n\tupdateTeaPercentage(teaPercentage = 0) {\r\n\t\tconsole.log('需要更换茶叶数量皮肤')\r\n\t\tconsole.log('延迟500ms')\r\n\t\tlet pickTeaSVGA = this.basketSvgaGroup[1];\r\n\t\tconsole.log('pickTeaSVGA')\r\n\t\tconsole.log(pickTeaSVGA)\r\n\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\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\tconsole.log('this.teaHalfImg');\r\n\t\tconsole.log(this.teaHalfImg);\r\n\t\tpickTeaSVGA.addChildAt(this.teaHalfImg, 10)\r\n\t}\r\n\r\n\tsetPickTeaLevel(level) {\r\n\t\tconsole.log('setPickTeaLevel', level);\r\n\t\tlet pickTeaSVGA = this.basketSvgaGroup[level];\r\n\t\tpickTeaSVGA.visible = true;\r\n\t\t// console.log('littleTea url')\r\n\t\t// console.log(this.teaHalfImg['_source'])\r\n\t\t//需要svga缓存结束\r\n\t\tsetTimeout(() => {\r\n\t\t\tconsole.log('延迟500ms')\r\n\t\t\tlet originframes = pickTeaSVGA.children[7];\r\n\t\t\t//按照采茶叶的多少来 设置茶叶是不是满的图片\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\tconsole.log('this.teaHalfImg');\r\n\t\t\tconsole.log(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\tconsole.log('handGrasp')\r\n\t\tlet that = this;\r\n\t\tsetTimeout(() => {\r\n\t\t\tthat.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\t//console.log('手指移动')\r\n\t\t\tengine.Tween.get(that.handGraspSvga)\r\n\t\t\t\t.to({ x: props.handGraspMovePos[0], y: props.handGraspMovePos[1] }, 600).call(() => {\r\n\t\t\t\t\tthat.handGraspSvga.x = props.handGraspSvgaPos[0];\r\n\t\t\t\t\tthat.handGraspSvga.y = props.handGraspSvgaPos[1];\r\n\t\t\t\t\t//console.log('this.pickTeaSvga.play')\r\n\t\t\t\t\t//setTimeout(() => {\r\n\t\t\t\t\tthat.pickTeaSvga.visible = true\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\t//console.log('this.teaSkyUpSvga.play')\r\n\t\t\t\tthat.teaSkyUpSvga.visible = true\r\n\t\t\t\tthat.teaSkyUpSvga.play(1, false);\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})\r\n\r\n\t\t}, 500);\r\n\t}\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-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\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\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\thandGrasp() {\r\n\t\tthis._gameView.handGrasp();\r\n\t}\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,UAGgB,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;;;CCR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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;KAED,+BAAS,GAAT;SACC,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC;MAC3B;KAKO,2BAAK,GAAb,UAAc,KAAK;MAElB;KACF,kBAAC;CAAD,CAAC,CAvFgC,MAAM,CAAC,SAAS,GAuFhD;;;iBCxFwB,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
\ No newline at end of file
src/custom/pick-tea/src/game/GameView.ts
View file @
7393d156
...
@@ -6,10 +6,7 @@ import { props } from "../props";
...
@@ -6,10 +6,7 @@ import { props } from "../props";
import
{
playSound
,
createSvga
}
from
"./utils"
;
import
{
playSound
,
createSvga
}
from
"./utils"
;
import
ObjectPool
=
engine
.
ObjectPool
;
import
ObjectPool
=
engine
.
ObjectPool
;
import
{
getTextureByName
}
from
"./utils"
;
import
{
getTextureByName
}
from
"./utils"
;
import
{
Goods
}
from
"./Goods"
;
import
{
PoolName
}
from
"./object-pool-init"
;
import
{
Tealeaf
}
from
"./Tealeaf"
;
import
{
Tealeaf
}
from
"./Tealeaf"
;
import
{
RedPackRain
}
from
"../../../redpack-rain/src/game/RedPackRain"
;
const
MAXX
=
-
8
;
const
MAXX
=
-
8
;
export
default
class
GameView
extends
engine
.
Container
{
export
default
class
GameView
extends
engine
.
Container
{
...
@@ -86,8 +83,6 @@ export default class GameView extends engine.Container {
...
@@ -86,8 +83,6 @@ export default class GameView extends engine.Container {
private
goodsItems
=
[]
private
goodsItems
=
[]
private
_goods
:
Goods
;
constructor
()
{
constructor
()
{
super
();
super
();
this
.
once
(
engine
.
Event
.
ADDED_TO_STAGE
,
this
.
setup
,
this
);
this
.
once
(
engine
.
Event
.
ADDED_TO_STAGE
,
this
.
setup
,
this
);
...
@@ -493,21 +488,4 @@ export default class GameView extends engine.Container {
...
@@ -493,21 +488,4 @@ export default class GameView extends engine.Container {
},
500
);
},
500
);
}
}
/*采茶叶活动*/
/*采茶叶活动*/
/**
* 回收对象
*/
private
recycleGoods
()
{
return
clearTimeout
(
this
.
timer
)
clearInterval
(
this
.
countdownTimer
)
for
(
let
goods
of
this
.
goodsItems
)
{
if
(
goods
)
{
this
.
removeChild
(
goods
);
ObjectPool
.
recycleObject
(
PoolName
,
goods
);
goods
.
removeEventListener
(
engine
.
Event
.
ENTER_FRAME
,
goods
[
"onGoodsEnter"
],
this
);
}
}
this
.
goodsItems
=
[]
}
}
}
src/custom/pick-tea/src/game/Goods.ts
deleted
100644 → 0
View file @
af3ba169
/**
* Created by rockyl on 2020-02-02.
*
* 掉落物品
*/
import
{
getTextureByName
}
from
"./utils"
;
import
{
props
}
from
"../props"
;
export
class
Goods
extends
engine
.
Container
{
private
_body
:
engine
.
Rect
private
_toY
;
constructor
()
{
super
();
let
body
body
=
this
.
_body
=
new
engine
.
Rect
()
let
rain
=
new
engine
.
Sprite
(
getTextureByName
(
'雨滴'
));
rain
[
"npcType"
]
=
"rain"
let
stone
=
new
engine
.
Sprite
(
getTextureByName
(
'石块'
));
stone
[
"npcType"
]
=
"stone"
let
boom
=
new
engine
.
Sprite
(
getTextureByName
(
'炸弹'
));
boom
[
"npcType"
]
=
"boom"
rain
.
visible
=
false
;
stone
.
visible
=
false
;
boom
.
visible
=
false
;
body
.
addChild
(
rain
)
body
.
addChild
(
stone
)
body
.
addChild
(
boom
)
this
.
addChild
(
body
);
body
.
width
=
.
0001
;
body
.
height
=
.
0001
;
body
.
mouseEnabled
=
false
;
}
getRandomNumberByRange
(
start
,
end
)
{
return
Math
.
floor
(
Math
.
random
()
*
(
end
-
start
)
+
start
)
}
reset
()
{
this
.
visible
=
true
;
this
.
rotation
=
0
;
this
.
anchorOffsetY
=
0
;
this
.
y
=
0
;
this
.
x
=
(
750
-
120
)
*
Math
.
random
()
+
30
;
this
.
rotation
=
0
;
let
random
=
Math
.
random
()
if
(
random
<
props
.
goodsProbability
[
0
]){
this
.
showNpc
(
"rain"
)
}
else
if
(
random
>=
props
.
goodsProbability
[
0
]
&&
random
<=
(
props
.
goodsProbability
[
0
]
+
props
.
goodsProbability
[
1
])){
this
.
showNpc
(
"stone"
)
}
else
if
(
random
>
(
props
.
goodsProbability
[
0
]
+
props
.
goodsProbability
[
1
])){
this
.
showNpc
(
"boom"
)
}
}
showNpc
(
type
){
for
(
let
i
=
0
;
i
<
this
.
_body
.
children
.
length
;
i
++
){
this
.
_body
.
children
[
i
].
visible
=
false
;
this
.
_body
.
children
[
i
].
mouseEnabled
=
false
;
}
for
(
let
i
=
0
;
i
<
this
.
_body
.
children
.
length
;
i
++
){
if
(
this
.
_body
.
children
[
i
][
"npcType"
]
==
type
){
this
[
"npcType"
]
=
type
this
.
_body
.
children
[
i
].
visible
=
true
;
this
.
_body
.
children
[
i
].
mouseEnabled
=
false
;
}
}
}
set
anchorOffsetY
(
v
)
{
this
.
_body
.
y
=
v
;
}
}
src/custom/pick-tea/src/game/object-pool-init.ts
deleted
100644 → 0
View file @
af3ba169
/**
* Created by rockyl on 2020-02-03.
*/
import
{
Goods
}
from
"./Goods"
;
import
ObjectPool
=
engine
.
ObjectPool
;
export
const
PoolName
:
string
=
'goods'
;
ObjectPool
.
registerPool
(
PoolName
,
function
()
{
return
new
Goods
();
},
function
(
item
:
Goods
,
data
)
{
item
.
reset
();
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment