[LayaAir 1.0]在一个矩形之上画另一个矩形,只显示一个矩形
var WebGL = laya.webgl.WebGL;
Laya.init(480, 800, WebGL);
//串盒子的宽
var boxWidth = 440;
//串盒子的高
var boxHeight = 500;
//串盒子
this.chuanBox = new Laya.Rectangle(Laya.stage.width - boxWidth >> 1, Laya.stage.height - boxHeight - 10, boxWidth, boxHeight);
//画出盒子
Laya.stage.graphics.drawRect(
this.chuanBox.x, this.chuanBox.y, this.chuanBox.width, this.chuanBox.height,
"#FFFFEE", "#FFFFFF", 2);
this.sageBox = new Laya.Rectangle(this.chuanBox.x+this.chuanBox.width/2,this.chuanBox.y+this.chuanBox.height-100,
this.chuanBox.width/2,100);
//世嘉SAGE区
Laya.stage.graphics.drawRect(
this.sageBox.x, this.sageBox.y, this.sageBox.width, this.sageBox.height,
null, "#FFFFFF", 2);
Laya.init(480, 800, WebGL);
//串盒子的宽
var boxWidth = 440;
//串盒子的高
var boxHeight = 500;
//串盒子
this.chuanBox = new Laya.Rectangle(Laya.stage.width - boxWidth >> 1, Laya.stage.height - boxHeight - 10, boxWidth, boxHeight);
//画出盒子
Laya.stage.graphics.drawRect(
this.chuanBox.x, this.chuanBox.y, this.chuanBox.width, this.chuanBox.height,
"#FFFFEE", "#FFFFFF", 2);
this.sageBox = new Laya.Rectangle(this.chuanBox.x+this.chuanBox.width/2,this.chuanBox.y+this.chuanBox.height-100,
this.chuanBox.width/2,100);
//世嘉SAGE区
Laya.stage.graphics.drawRect(
this.sageBox.x, this.sageBox.y, this.sageBox.width, this.sageBox.height,
null, "#FFFFFF", 2);
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
Michael
赞同来自: