• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 1,616 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0082 秒)

921. laya.ui.Dialog_API3.0 [ 62%]

.../ui/bg.png"); bg.sizeGrid = "40,10,5,10"; bg.width = 150; bg.height = 250; addChild(bg); var image:Image = new Image("resource/ui/image.png"); addChild(image); var button:Button = new Button("resource/ui/btn_close.png"); button.name = Dialog.CLOSE;//设置button的name属性值。 button.x = 0; butt...

来源: Laya3.0_api 发布时间: 20231115

922. drawcall优化问题 [ 62%]

...is, function(){ container = new Laya.Sprite(); var x = 0,y =80; Laya.stage.addChild(container); for(var i=0;i<1200;i++){ var role = new Laya.Sprite(); x = x+0.1; y = y+0.1 role.x = x; role.y = y; role.loadImage('comp/bg.png'); container.addChild(role); var role2 = new Laya.Sprite(); x = x+0.1; y ...

来源: Laya_社区 发布时间: 20180122

923. 我自己绘制的矩形如何以自身中心点旋转不能实现啊 [ 62%]

...rite=new Sprite(); sp.graphics.drawRect(0,0,200,300,"#000fff"); Laya.stage.addChild(sp); sp.size(200,300); sp.pivot(sp.width/2,sp.height/2); sp.pos(200,200); Laya.timer.frameLoop(1,this,onLoopRotation,[sp]); } private function onLoopRotation(sp:Sprite):void { sp.rotation++; } } } 2017-09-05 0 0 分...

来源: Laya_社区 发布时间: 20170830

924. 关于mouseThough=true的问题 [ 62%]

...t;); img.on(Event.CLICK,this,onClick); img.mouseThrough = true; Laya.stage.addChild(img); } 代码就这么简单,图片我传到附件里面 shiyang • 2018-03-14 15:55 private function onClick(e:Event):void{ trace("xxxxxxx"); }

来源: Laya_社区 发布时间: 20180314

925. laya.ui.Clip_API3.0 [ 62%]

...CK, this, onClick);//给 clip 添加点击事件函数侦听。 Laya.stage.addChild(clip);//将此 clip 对象添加到显示列表。 } private function onClick():void { trace("clip 的点击事件侦听处理函数。clip.total="+ clip.total); if (clip.isPlaying == true) { clip.stop();//停止动...

来源: Laya3.0_api 发布时间: 20231115

926. localRotationEulerY旋转位置错误 [ 62%]

...      this.arr = [];         this.newScene = Laya.stage.addChild(new Laya.Scene3D()) as Laya.Scene3D;          //初始化照相机         var camera = this.newScene.addChild(new Laya.Camera(0, 0.1, 100)) as Laya.Camera;         camera.transform...

来源: Laya_社区 发布时间: 20201120

927. laya.ui.LayoutBox [ 61%]

...nherited Public Methods Show Inherited Public Methods MethodDefined By  addChild(child:Node):Node[override] 添加子节点。 LayoutBox  addChildAt(child:Node, index:int):Node[override] 添加子节点到指定的索引位置。 LayoutBox addChildren(... args):void 批量增加子节点 Node...

来源: Laya2.0_api 发布时间: 20190513

928. laya.ui.HScrollBar_API3.0 [ 61%]

...this, onChange);//设置 hScrollBar 的滚动变化处理器。 Laya.stage.addChild(hScrollBar);//将此 hScrollBar 对象添加到显示列表。 } private function onChange(value:Number):void { trace("滚动条的位置: value=" + value); } } } example Laya.init(640, 800);//设置游戏画布宽...

来源: Laya3.0_api 发布时间: 20231115

929. laya.ui.VScrollBar_API3.0 [ 61%]

...this, onChange);//设置 vScrollBar 的滚动变化处理器。 Laya.stage.addChild(vScrollBar);//将此 vScrollBar 对象添加到显示列表。 } private function onChange(value:Number):void { trace("滚动条的位置: value=" + value); } } } example Laya.init(640, 800);//设置游戏画布宽...

来源: Laya3.0_api 发布时间: 20231115

930. laya.ui.ColorPicker_API3.0 [ 61%]

...lorPicket]);//设置 colorPicket 的颜色改变回调函数。 Laya.stage.addChild(colorPicket);//将此 colorPicket 对象添加到显示列表。 } private function onChangeColor(colorPicket:ColorPicker):void { trace("当前选择的颜色: " + colorPicket.selectedColor); } } } example Laya.ini...

来源: Laya3.0_api 发布时间: 20231115