大约有 1,614 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0091 秒)
Laya_社区(984) Laya2.0_文档(192) Laya_示例(138) Laya2.0_示例(101) Laya3.0_api(61) Laya2.0_api(57) laya_api(53) Laya3.0_文档(28)
...最上面,求解 初学LayaBox, 创建了一个 Tiled Map,之后用addChild 添加了多个图元。发现Tiled Map盖住了所有后续添加的图元。 求解。。。。 贴上代码: // 2D 场景 this.tMap = new Laya.TiledMap(); var viewRect:Laya.Rectangle = new Laya.Rectangle(); this.t...
来源: Laya_社区 发布时间: 20180514
...aScene.ls", Handler.create(this, function(scene:Scene3D):void { Laya.stage.addChild(scene) as Scene3D; //获取cube对象 var cube:Sprite3D = scene.getChildByName("Cube"); //添加组件(脚本) var _script:SceneScript = cube.addComponent(SceneScript); //label用于显示 var _lab:Label = new Label(...
来源: Laya2.0_文档 发布时间: 20210715
... tree 的宽度。 tree.height = 100;//设置 tree 的高度。 Laya.stage.addChild(tree);//将 tree 添加到显示列表。 } } } import laya.ui.Box; import laya.ui.Clip; import laya.ui.Label; class Item extends Box { public function Item() { this.name = "render"; this.right = 0; this.left = 0; va...
来源: Laya3.0_api 发布时间: 20231115
...n = "center"; //设置文本垂直居中 txt.valign = "middle"; Laya.stage.addChild(txt); ```  在实际编码中如果需要其他的对齐模式,请参考API中的align和valign的取值,找到适合项目的水平对齐模式和垂直对齐模式。 如果文本内容超过了...
来源: Laya2.0_文档 发布时间: 20210715
...台 var sp:Laya.Sprite = new Laya.Sprite(); sp.loadImage(url); Laya.stage.addChild(sp);//添加到舞台 } private errorHandler(e:Object):void{ } } new GameMain(); ``` 第二种我们可以绘制一个纹理来显示: ```typescript private completeHandler(data:Object):void{ //加载完成返回的...
来源: Laya2.0_文档 发布时间: 20210714
...se.linearOut,Laya.Handler.create(this,this.removeball,[ball])); Laya.stage.addChild( ball ); } } public removeball( ball:Laya.Sprite ){ Laya.stage.removeChild(ball); // console.log("rmove ball") } public getObj():Laya.Sprite { for( let i:number = 0 ; i < this.balls.length;i++ ){ if( !this.balls[i...
来源: Laya_社区 发布时间: 20180226
...能这样实现。代码如下: var sp:Sprite = new Sprite(); Laya.stage.addChild(sp); sp.graphics.alpha(0); //这里设置透明度是0 //画扇形 sp.graphics.drawPie(50,50,50,0,30,"#ff0000"); //这个对象没有设置透明度 但是舞台一样不能显示出来 只要上面那个透明度不...
来源: Laya_社区 发布时间: 20180111
... { //实例UI界面 //var testView:TestView = new TestView(); //Laya.stage.addChild(testView); // //return; Laya.timer.once(3000, this, function():void{ var sprite:Sprite = new Sprite(); sprite.pos(0, 0); var texture:Texture = new Texture(Browser.window.sharedCanvas); texture.bitmap.alwaysChange = t...
来源: Laya_社区 发布时间: 20180525
...- xxx.width) / 2; xxx.y = (Laya.stage.height - xxx.height) / 2; Laya.stage.addChild(xxx); xxx.on(Laya.Event.CLICK, this, this.onXXX); private onXXX() { console.debug("Hello"); } 2017-06-06 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关...
来源: Laya_社区 发布时间: 20170606
...t >> 1); txt.alpha = 0.1; Laya.stage.addChild(txt); } 我这测试是可以的 2019-05-15 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 Seven 相关问题 文本如何自动换行 骨骼动...
来源: Laya_社区 发布时间: 20181227