Commit cc53f1ee authored by zhangjinzhou's avatar zhangjinzhou

国庆弹球修改

parent cf8e5248
This diff is collapsed.
......@@ -604,8 +604,15 @@
itext.text = "奖品" + i;
itext.x = 20 + (56 + 16) * (i - 1);
itext.y = 516;
this.addChild(itext);
this["prizetxt" + i] = itext;
var img = new engine.Image();
img.width = 56;
img.height = 56;
img.x = 20 + (56 + 16) * (i - 1);
img.y = 516;
img.source = "";
this.addChild(img);
this["prizeimg" + i] = img;
}
var cuizimask = new engine.Graphics();
cuizimask.beginFill(0xffffff, 1);
......@@ -700,7 +707,7 @@
var prizedata = props.prizedata;
for (var i = 0; i < prizedata.length; i++) {
var idata = prizedata[i];
this["prizetxt" + (i + 1)].text = idata;
this["prizeimg" + (i + 1)].source = idata;
}
};
GameView.prototype.fallBall = function () {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -65,9 +65,17 @@ export default class GameView extends engine.Container {
itext.text = "奖品" + i;
itext.x = 20 + (56 + 16) * (i - 1);
itext.y = 516;
this.addChild(itext);
// this.addChild(itext);
this["prizetxt" + i] = itext;
let img = new engine.Image();
img.width = 56;
img.height = 56;
img.x = 20 + (56 + 16) * (i - 1);
img.y = 516;
img.source = "";
this.addChild(img);
this["prizeimg"+i] = img;
}
......@@ -198,7 +206,12 @@ export default class GameView extends engine.Container {
let prizedata = props.prizedata;
for (let i = 0; i < prizedata.length; i++) {
let idata = prizedata[i];
this["prizetxt" + (i + 1)].text = idata;
// let iname = idata;
// if(idata.length>4){
// iname = idata.slice(0,3)+"..";
// }
this["prizeimg"+(i+1)].source = idata;
// this["prizetxt" + (i + 1)].text = iname;
}
}
//球掉落
......
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