Commit 8fe860be authored by zhangjinzhou's avatar zhangjinzhou

loading引导选人暂存

parent 926081df
......@@ -14,7 +14,10 @@ export const homeInfo = {
export const updateUinfo = {
"code": null,
"data": true,
"data": {
result:true,
joyBeans:0
},
"message": null,
"success": true
}
......
......@@ -10,7 +10,7 @@
},
"dependencies": {
"@spark/api-base": "^1.0.11",
"@spark/guideact": "^1.0.2",
"@spark/guideact": "^1.0.10",
"@spark/projectx": "^1.0.3",
"@spark/ui": "^1.0.25",
"axios": "^0.19.2",
......
......@@ -130,13 +130,13 @@ class Select extends Component {
nickName:planame,
figureId:Role[this.nshowidx].figureid
});
// updateuinfo = {
// "code": null,
// "data": true,
// "message": null,
// "success": true
// }
if(updateuinfo&&updateuinfo.success){
if(updateuinfo.data){
const {result,joyBeans} = updateuinfo.data;
if(result){
dataCenter.setData(Store.newgoldnum,joyBeans);
}
}
getHomeInfo();
this.props.onClose();
dataCenter.setData(Store.needguide,true);
......
......@@ -11,6 +11,7 @@ export const Store = {
//新手引导
needguide:"needguide",
newgoldnum:"newgoldnum",
}
//人物角色对应
export let Role = {
......
......@@ -193,7 +193,7 @@ var GameStage = /** @class */ (function (_super) {
//步数渲染
GameStage.prototype.setGuideShow = function () {
return __awaiter(this, void 0, void 0, function () {
var stepdata, hole, txt, role, nextbtn, skipbtn, touch, holetype, holex, holey, holesize, cirectwid, cirecthei, cirectrad, dot1, dot2, dot3, dot4, dot5, dot6, dot7, dot8, text, txtwidth, txtx, txty, txtalign, _a, rolex, roley, _b, firstcont, svga, btnx, btny, btntex, skipx, skipy, skiptex, touchx, touchy, touchsize;
var stepdata, hole, txt, role, nextbtn, skipbtn, touch, holetype, holex, holey, holesize, cirectwid, cirecthei, cirectrad, dot1, dot2, dot3, dot4, dot5, dot6, dot7, dot8, text, txtwidth, txtx, txty, txtalign, _a, rolex, roley, _b, goldprize, firstcont, svga, btnx, btny, btntex, skipx, skipy, skiptex, touchx, touchy, touchsize;
return __generator(this, function (_c) {
switch (_c.label) {
case 0:
......@@ -281,7 +281,8 @@ var GameStage = /** @class */ (function (_super) {
_c.label = 3;
case 3:
if (this.step == 1) {
firstcont = this.getFirstTcont();
goldprize = stepdata.goldprize;
firstcont = this.getFirstTcont(goldprize);
this.rolecont.addChild(firstcont);
console.log("添加firstCont===>", firstcont);
firstcont.x = rolex - 300;
......@@ -345,7 +346,7 @@ var GameStage = /** @class */ (function (_super) {
});
});
};
GameStage.prototype.getFirstTcont = function () {
GameStage.prototype.getFirstTcont = function (goldprize) {
this.firstTcont = new Container();
this.firstTcont.addChild(new Sprite(TextureCache["guide1"]));
this.firstTcont.width = 633;
......@@ -355,7 +356,10 @@ var GameStage = /** @class */ (function (_super) {
this.firstTxt.size = 30;
this.firstTxt.x = 266;
this.firstTxt.y = 186;
this.firstTxt.text = "1000欢趣豆";
if (!goldprize) {
goldprize = 0;
}
this.firstTxt.text = goldprize + "欢趣豆";
this.firstTcont.addChild(this.firstTxt);
this.firstTcont.anchorX = 390;
this.firstTcont.anchorY = 410;
......
import dataCenter, { Store } from "../../dataCenter";
let clientWidth = document.body.clientWidth;
let clientHeight = document.body.clientHeight;
......@@ -60,6 +62,7 @@ function getstep1() {
txt: null,
role: roledata,
nextbtn: null,
goldprize:dataCenter.getData(Store.newgoldnum)||0,
skipbtn: skipbtndata,
touch: touchdata,
pagey: 0,
......
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