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

大约有 363 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0034 秒)

91. 面板容器组件 · LayaAir3.0文档 · LAYABOX [ 66%]

...法只执行一次 onAwake(): void { this.panel.pos(100, 100); this.panel.size(200, 200); this.panel.scrollType = Laya.ScrollType.Both; //滚动类型:水平与垂直都滚动 this.panel.vScrollBarSkin = "atlas/comp/vscroll.png"; this.panel.hScrollBarSkin = "atlas/comp/hscroll.png"; this.panel.ela...

来源: Laya3.0_文档 发布时间: 20230923

92. 加载-销毁Texture使用的图片资源 [ 65%]

...; Laya.stage.addChild(this.aniFly); //创建按钮 this.btn = new Sprite().size(205, 55); this.btn.graphics.drawRect(0, 0, this.btn.width, this.btn.height, "#057AFB"); this.txt = new Text(); this.txt.text = "销毁"; this.txt.pos(75, 15); this.txt.fontSize = 25; this.txt.color = "#FF0000"; this.btn....

来源: Laya_示例 发布时间: 20240930

93. 请问Laya如果获取Laya.Event.CLICK时间的点击坐标? [ 65%]

...aya.stage.width, Laya.stage.height-100 ); clickRect.pos( 0, 0 ); clickRect.size( Laya.stage.width, Laya.stage.height-100 ); Laya.stage.addChild( clickRect ); clickRect.on( Laya.Event.CLICK, this, changeVxVy ); } function changeVxVy( e ){ console.log( e.nativeEvent.offsetX ); console.log( e.nativeEv...

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

94. 鼠标交互-滑动 [ 65%]

...要接收鼠标事件必须设置宽高,否则不会被命中) button.size(w, h); button.x = (Laya.stage.width - TrackLength) / 2; button.y = Laya.stage.height / 2; button.on(Event.MOUSE_DOWN, this, onMouseDown); Laya.stage.addChild(button); //左侧临界点设为圆形初始位置 beginPositio...

来源: Laya_示例 发布时间: 20240930

95. 垂直布局容器组件 · LayaAir3.0文档 · LAYABOX [ 65%]

...ox(): void { this.vbox = new Laya.VBox; this.vbox.pos(100, 100); this.vbox.size(600, 300); this.vbox.bgColor = "#ffffff"; this.vbox.addChild(this.btn1); this.vbox.addChild(this.btn2); this.vbox.addChild(this.btn3); this.vbox.space = 80; this.vbox.align = "center"; } } Copyright ©Layabox 2022 all ri...

来源: Laya3.0_文档 发布时间: 20230922

96. 鼠标交互-滑动 [ 64%]

...收鼠标事件必须设置宽高,否则不会被命中) this.button.size(w, h); this.button.x = (Laya.stage.width - TrackLength) / 2; this.button.y = Laya.stage.height / 2; this.button.on(Event.MOUSE_DOWN, this, this.onMouseDown); Laya.stage.addChild(this.button); //左侧临界点设为圆形...

来源: Laya2.0_示例 发布时间: 20240930

97. 文本-滚动文本 [ 64%]

...发行商,面向AS/JS/TS开发者提供HTML5开发技术方案!"; txt.size(200, 100); txt.x = Laya.stage.width - txt.width >> 1; txt.y = Laya.stage.height - txt.height >> 1; txt.borderColor = "#FFFF00"; txt.fontSize = 20; txt.color = "#ffffff"; Laya.stage.addChild(txt); txt.on(Event.MOUSE_DOWN, ...

来源: Laya_示例 发布时间: 20240930

98. timer.loop里面修改Text.text在微信小程序上用iPhone打开出现闪屏 [ 64%]

...题,  this.myTest = new Laya.Text() this.myTest.pos(0, 0) this.myTest.size(100, 100) this.myTest.fontSize = 13 this.myTest.color = "#ffffff" this.myTest.align = "center" this.addChild(this.myTest) this.timer.loop(10, this, this.timerClick)     timerClick() {   this.myTest.changeText("改变的...

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

99. 关于js继承类class的参数问题 [ 64%]

...e = "label";//设置 label 的name属性值。      *         label.size(100, 20);//设置 label 的宽度、高度。      *         this.addChild(label);//将 label 添加到显示列表。      *     };      *     Laya.class(Item,"mypackage.listExample.Item",_super);//注...

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

100. 预加载进入游戏界面 [ 64%]

...数组:["a.png","b.png"];复杂数组[{url:"a.png",type:Loader.IMAGE,size:100,priority:1},{url:"b.json",type:Loader.JSON,size:50,priority:1}]。          * @param    complete    加载结束回调。根据url类型不同分为2种情况:1. url为String类型,也就是单个资源...

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