Commit 26ce1641 authored by 13732208043's avatar 13732208043

茶叶更新

parent 1ac3d065
This diff is collapsed.
......@@ -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;
var teaBucketframes = JSON.parse(JSON.stringify(originframes.frames));
if (_this.teaHalfImg) {
_this.teaHalfImg['frames'] = teaBucketframes;
}
showLog(_this.teaHalfImg);
pickTeaSVGA.addChildAt(_this.teaHalfImg, 10);
pickTeaSVGA.gotoAndPlay(1, true);
}, 300);
var originframes = pickTeaSVGA.children[7];
this.teaHalfImg.visible = true;
var teaBucketframes = JSON.parse(JSON.stringify(originframes.frames));
if (this.teaHalfImg) {
this.teaHalfImg['frames'] = teaBucketframes;
}
showLog(this.teaHalfImg);
pickTeaSVGA.addChildAt(this.teaHalfImg, 10);
pickTeaSVGA.gotoAndPlay(1, true);
};
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;
......
This diff is collapsed.
......@@ -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,27 +488,27 @@ 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(() => {
showLog('延迟500ms')
let originframes = pickTeaSVGA.children[7];
//按照采茶叶的多少来 设置茶叶是不是满的图片
this.teaHalfImg.visible = true;
let teaBucketframes = JSON.parse(JSON.stringify(originframes.frames));
//this.teaHalfImg = //new engine.Image(getTextureByName('茶叶-少'));
if (this.teaHalfImg) {
//this.teaHalfImg.source = ''
this.teaHalfImg['frames'] = teaBucketframes;
}
showLog('this.teaHalfImg');
showLog(this.teaHalfImg);
pickTeaSVGA.addChildAt(this.teaHalfImg, 10)
pickTeaSVGA.gotoAndPlay(1, true);
}, 300)
//setTimeout(() => {
showLog('延迟500ms')
let originframes = pickTeaSVGA.children[7];
//按照采茶叶的多少来 设置茶叶是不是满的图片
this.teaHalfImg.visible = true;
let teaBucketframes = JSON.parse(JSON.stringify(originframes.frames));
//this.teaHalfImg = //new engine.Image(getTextureByName('茶叶-少'));
if (this.teaHalfImg) {
//this.teaHalfImg.source = ''
this.teaHalfImg['frames'] = teaBucketframes;
}
showLog('this.teaHalfImg');
showLog(this.teaHalfImg);
pickTeaSVGA.addChildAt(this.teaHalfImg, 10)
pickTeaSVGA.gotoAndPlay(1, true);
//}, 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