Commit faa443a2 authored by rockyl's avatar rockyl

Merge branch 'zjz' into dev

parents f0e32654 a327deb9
This diff is collapsed.
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
}()); }());
//# sourceMappingURL=Tool.js.map //# sourceMappingURL=Tool.js.map
var qietu = (function (url, type1, rows, cols, parent) { return tslib.__awaiter(void 0, void 0, void 0, function () { var qietu = (function (url, type1, rows, cols, parent, inshowurl) { return tslib.__awaiter(void 0, void 0, void 0, function () {
var t, t1, setimgwid, mwid1, mhei1, picarr, picnames, startlix, addlix, startliy, addliy, twid1, thei1, r, startx, c, starty, nsprite, isprite, nsp, ispritename, e_1; var t, t1, setimgwid, mwid1, mhei1, picarr, picnames, startlix, addlix, startliy, addliy, twid1, thei1, r, startx, c, starty, nsprite, isprite, nsp, ispritename, e_1;
return tslib.__generator(this, function (_a) { return tslib.__generator(this, function (_a) {
switch (_a.label) { switch (_a.label) {
...@@ -97,13 +97,15 @@ ...@@ -97,13 +97,15 @@
return [3, 5]; return [3, 5];
case 3: case 3:
if (!(type1 == 3)) return [3, 5]; if (!(type1 == 3)) return [3, 5];
inshowurl = "https://yun.duiba.com.cn/aurora/assets/2628186c60c3b80013ae3178ff21a73ffbe71d43.jpg";
return [4, getTextureByName("testimg")]; return [4, getTextureByName("testimg")];
case 4: case 4:
t = (_a.sent()); t = (_a.sent());
_a.label = 5; _a.label = 5;
case 5: case 5:
if (!t) { if (!t) {
return [2, qietu("testimg", 3, rows, cols)]; inshowurl = "https://yun.duiba.com.cn/aurora/assets/2628186c60c3b80013ae3178ff21a73ffbe71d43.jpg";
return [2, qietu("testimg", 3, rows, cols, parent, inshowurl)];
} }
setimgwid = 612; setimgwid = 612;
mwid1 = setimgwid / rows; mwid1 = setimgwid / rows;
...@@ -143,7 +145,8 @@ ...@@ -143,7 +145,8 @@
picarr: picarr, picarr: picarr,
mwid: mwid1, mwid: mwid1,
mhei: mhei1, mhei: mhei1,
picnames: picnames picnames: picnames,
inshowurl: inshowurl
}]; }];
case 6: case 6:
e_1 = _a.sent(); e_1 = _a.sent();
...@@ -154,7 +157,8 @@ ...@@ -154,7 +157,8 @@
})]; })];
case 7: case 7:
_a.sent(); _a.sent();
return [2, qietu("testimg", 3, rows, cols)]; inshowurl = "https://yun.duiba.com.cn/aurora/assets/2628186c60c3b80013ae3178ff21a73ffbe71d43.jpg";
return [2, qietu("testimg", 3, rows, cols, parent, inshowurl)];
case 8: return [2]; case 8: return [2];
} }
}); });
...@@ -251,7 +255,7 @@ ...@@ -251,7 +255,7 @@
}; };
GameView.prototype.startfirst = function () { GameView.prototype.startfirst = function () {
return tslib.__awaiter(this, void 0, void 0, function () { return tslib.__awaiter(this, void 0, void 0, function () {
var actidx, tex, type1, result, res, picarr, mwid, mhei, picnames, gap, r, c, ipicx, ipicy, npicname, ipic, rl, cl; var actidx, tex, type1, inshowurl, result, res, picarr, mwid, mhei, picnames, picurl, gap, r, c, ipicx, ipicy, npicname, ipic, rl, cl;
return tslib.__generator(this, function (_a) { return tslib.__generator(this, function (_a) {
switch (_a.label) { switch (_a.label) {
case 0: case 0:
...@@ -286,7 +290,8 @@ ...@@ -286,7 +290,8 @@
tex = this.gameUrls[actidx]; tex = this.gameUrls[actidx];
type1 = 3; type1 = 3;
} }
return [4, qietu(tex, type1, this.rows, this.cols, this.dicont)]; inshowurl = this.gameUrls[actidx];
return [4, qietu(tex, type1, this.rows, this.cols, this.dicont, inshowurl)];
case 1: case 1:
result = _a.sent(); result = _a.sent();
res = result.res; res = result.res;
...@@ -295,6 +300,10 @@ ...@@ -295,6 +300,10 @@
mwid = result.mwid; mwid = result.mwid;
mhei = result.mhei; mhei = result.mhei;
picnames = result.picnames; picnames = result.picnames;
picurl = result.inshowurl;
engine.globalEvent.dispatchEvent("pictures-showurl", {
picurl: picurl
});
this.mwid = mwid; this.mwid = mwid;
this.mhei = mhei; this.mhei = mhei;
this.picarr = picarr; this.picarr = picarr;
...@@ -341,7 +350,7 @@ ...@@ -341,7 +350,7 @@
}; };
GameView.prototype.start = function () { GameView.prototype.start = function () {
return tslib.__awaiter(this, void 0, void 0, function () { return tslib.__awaiter(this, void 0, void 0, function () {
var actidx, tex, type1, result, res, picarr, mwid, mhei, picnames, gap, r, c, ipicx, ipicy, npicname, ipic, rl, cl; var actidx, tex, type1, inshowurl, result, res, picarr, mwid, mhei, picnames, picurl, gap, r, c, ipicx, ipicy, npicname, ipic, rl, cl;
return tslib.__generator(this, function (_a) { return tslib.__generator(this, function (_a) {
switch (_a.label) { switch (_a.label) {
case 0: case 0:
...@@ -376,7 +385,8 @@ ...@@ -376,7 +385,8 @@
tex = this.gameUrls[actidx]; tex = this.gameUrls[actidx];
type1 = 3; type1 = 3;
} }
return [4, qietu(tex, type1, this.rows, this.cols, this.dicont)]; inshowurl = this.gameUrls[actidx];
return [4, qietu(tex, type1, this.rows, this.cols, this.dicont, inshowurl)];
case 1: case 1:
result = _a.sent(); result = _a.sent();
res = result.res; res = result.res;
...@@ -385,6 +395,10 @@ ...@@ -385,6 +395,10 @@
mwid = result.mwid; mwid = result.mwid;
mhei = result.mhei; mhei = result.mhei;
picnames = result.picnames; picnames = result.picnames;
picurl = result.inshowurl;
engine.globalEvent.dispatchEvent("pictures-showurl", {
picurl: picurl
});
this.mwid = mwid; this.mwid = mwid;
this.mhei = mhei; this.mhei = mhei;
this.picarr = picarr; this.picarr = picarr;
...@@ -573,7 +587,6 @@ ...@@ -573,7 +587,6 @@
}; };
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);
......
This diff is collapsed.
...@@ -170,8 +170,9 @@ export default class GameView extends engine.Container { ...@@ -170,8 +170,9 @@ export default class GameView extends engine.Container {
tex = this.gameUrls[actidx]; tex = this.gameUrls[actidx];
type1 = 3; type1 = 3;
} }
let inshowurl = this.gameUrls[actidx];
// type1 = 3; // type1 = 3;
let result = await qietu(tex,type1,this.rows,this.cols,this.dicont); let result = await qietu(tex,type1,this.rows,this.cols,this.dicont,inshowurl);
let res = result.res; let res = result.res;
if(res){ if(res){
let picarr = result.picarr; let picarr = result.picarr;
...@@ -179,6 +180,12 @@ export default class GameView extends engine.Container { ...@@ -179,6 +180,12 @@ export default class GameView extends engine.Container {
let mhei = result.mhei; let mhei = result.mhei;
let picnames = result.picnames; let picnames = result.picnames;
let picurl = result.inshowurl;
engine.globalEvent.dispatchEvent("pictures-showurl",{
picurl:picurl
});
// console.error("实际显示图片",picurl);
this.mwid = mwid; this.mwid = mwid;
this.mhei = mhei; this.mhei = mhei;
this.picarr = picarr; this.picarr = picarr;
...@@ -263,7 +270,9 @@ export default class GameView extends engine.Container { ...@@ -263,7 +270,9 @@ export default class GameView extends engine.Container {
tex = this.gameUrls[actidx]; tex = this.gameUrls[actidx];
type1 = 3; type1 = 3;
} }
let result = await qietu(tex,type1,this.rows,this.cols,this.dicont); let inshowurl = this.gameUrls[actidx];
let result = await qietu(tex,type1,this.rows,this.cols,this.dicont,inshowurl);
let res = result.res; let res = result.res;
if(res){ if(res){
let picarr = result.picarr; let picarr = result.picarr;
...@@ -271,6 +280,12 @@ export default class GameView extends engine.Container { ...@@ -271,6 +280,12 @@ export default class GameView extends engine.Container {
let mhei = result.mhei; let mhei = result.mhei;
let picnames = result.picnames; let picnames = result.picnames;
let picurl = result.inshowurl;
engine.globalEvent.dispatchEvent("pictures-showurl",{
picurl:picurl
});
// console.error("实际显示图片",picurl);
this.mwid = mwid; this.mwid = mwid;
this.mhei = mhei; this.mhei = mhei;
this.picarr = picarr; this.picarr = picarr;
......
...@@ -5,7 +5,7 @@ import Tool from "./Tool"; ...@@ -5,7 +5,7 @@ import Tool from "./Tool";
const urls = []; const urls = [];
const picMap = {}; const picMap = {};
const posMap = {}; const posMap = {};
export default async(url:any,type1:number, rows:number, cols:number,parent:engine.Container) => { export default async(url:any,type1:number, rows:number, cols:number,parent:engine.Container,inshowurl:string) => {
try{ try{
let t:engine.Texture; let t:engine.Texture;
if(type1==1){ if(type1==1){
...@@ -16,10 +16,12 @@ export default async(url:any,type1:number, rows:number, cols:number,parent:engin ...@@ -16,10 +16,12 @@ export default async(url:any,type1:number, rows:number, cols:number,parent:engin
t = t1 as engine.Texture; t = t1 as engine.Texture;
} }
}else if(type1==3){ }else if(type1==3){
inshowurl = "https://yun.duiba.com.cn/aurora/assets/2628186c60c3b80013ae3178ff21a73ffbe71d43.jpg";
t = await getTextureByName("testimg") as engine.Texture; t = await getTextureByName("testimg") as engine.Texture;
} }
if(!t){ if(!t){
return qietu("testimg",3,rows,cols,parent); inshowurl = "https://yun.duiba.com.cn/aurora/assets/2628186c60c3b80013ae3178ff21a73ffbe71d43.jpg";
return qietu("testimg",3,rows,cols,parent,inshowurl);
} }
let setimgwid = 612; let setimgwid = 612;
...@@ -150,7 +152,8 @@ export default async(url:any,type1:number, rows:number, cols:number,parent:engin ...@@ -150,7 +152,8 @@ export default async(url:any,type1:number, rows:number, cols:number,parent:engin
picarr:picarr, picarr:picarr,
mwid:mwid1, mwid:mwid1,
mhei:mhei1, mhei:mhei1,
picnames:picnames picnames:picnames,
inshowurl:inshowurl
}; };
}catch(e){ }catch(e){
//获取那图失败 //获取那图失败
...@@ -163,6 +166,7 @@ export default async(url:any,type1:number, rows:number, cols:number,parent:engin ...@@ -163,6 +166,7 @@ export default async(url:any,type1:number, rows:number, cols:number,parent:engin
res(); res();
},200); },200);
}) })
return qietu("testimg",3,rows,cols,parent); inshowurl = "https://yun.duiba.com.cn/aurora/assets/2628186c60c3b80013ae3178ff21a73ffbe71d43.jpg";
return qietu("testimg",3,rows,cols,parent,inshowurl);
} }
}; };
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