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

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

251. LayaBox HelloWorld实战 [ 52%]

...agArea = '0,0,300,600'; dialog.show(); } onEnable() { this.btnShow.on(Laya.Event.CLICK,this,this.onBtnShowClick); } onDisable() { } } 是不是以为到了这一步就结束了,别着急,还有关键的一个步骤,就是把helloworld.js和我们的场景关联起来。 最后一步:拖拽he...

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

252. 列表组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 52%]

...侦听器,而是直接侦听列表的ClickItem事件: list.on(Laya.UIEvent.ClickItem, this, this.onClickItem); // 回调函数的第一个参数就是当前被点击的对象 function onClickItem(item: GObject): void { console.log("点击了对象:" + item.title); //获得这个对象在列表...

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

253. 动态阴影被切割了?为啥没有显示完成的阴影 [ 52%]

...age.SCREEN_NONE; //开启统计信息 Laya.Stat.show(); Laya.stage.on(Laya.Event.CLICK, this, mouseHandler); //添加3D场景 var scene = Laya.stage.addChild(new Laya.Scene()); function LayaAir3D() { //添加照相机 var camera = (scene.addChild(new Laya.Camera()));//0, 0.3, 100 camera.transform.tr...

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

254. 精灵 · LayaAir3.3 · 引擎文档 · LAYABOX [ 51%]

...毕,此方法只执行一次 */ onAwake(): void { this.sprite2.on(Laya.Event.MOUSE_DOWN, this, this.test2);//设置监听,sprite1或sprite2均可 console.log(this.sprite1.mouseEnabled);//打印父节点sprite1的MouseEnabled的值:true console.log(this.sprite2.mouseEnabled);//打印子节点sp...

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

255. Clip属性详解(ActionScript-IDE篇(AS3)-IDE组件属性详解) [ 51%]

...代码:** ```javascript package { import laya.display.Stage; import laya.events.Event; import laya.ui.Button; import laya.ui.Clip; import laya.ui.Image; import laya.utils.Handler; import laya.webgl.WebGL; public class UI_Clip { /***控制器按钮资源***/ private var buttonSkin:String = "../../....

来源: Laya2.0_文档 发布时间: 20210714

256. 显示对象的mask缩放为0时遮罩效果不生效 [ 50%]

...ge.addChild(testSp); let i = 0; tmpMask.scaleX = i / 3; Laya.stage.on(Laya.Event.CLICK, this, ()=>{ i = (i + 1) % 4; tmpMask.scaleX = i / 3; }); 附件 : --> 2020-04-21 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 3 个...

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

257. ls场景文件通过Laya.loader.create()预加载后stage.destroyChildren()出现异常Cannot read property 'visible' of null [ 50%]

...ll   附Demo。   想做不同场景之间的切换。 spriteBtn.on(Laya.Event.CLICK, this, function (e) { Laya.stage.destroyChildren(); newScene(); });问题:LayaAirUnityPlugin 1.1.0导出了 ls 场景文件,在通过Laya.loader.create()预加载后。在3次Laya.Scene.load()后,最后一...

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

258. 【简单跑酷--JS版】---Lv.6 终篇 [ 50%]

...is.addChild(this.player); //监听 按下 弹起 事件 Laya.stage.on(laya.events.Event.MOUSE_DOWN, this, this.onMouseDown); Laya.stage.on(laya.events.Event.MOUSE_UP, this, this.onMouseUp); //创建一个帧循环处理函数 Laya.timer.frameLoop(1, this, this.onLoop); } _proto.onLoop = function(){ ...

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

259. 插件开发说明 · LayaAir3.3 · 引擎文档 · LAYABOX [ 50%]

...ions", inspector: "Buttons", options : { buttons : [ { caption : "点我", event: "my_click" } ] } } ] } ]); this._panel.allowUndo = true; //根据需要设置 //如果不需要undo功能,也可以直接this._data = {}; this._data = IEditor.DataWatcher.watch({}); //inspect可以多次调用,将...

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

260. drawTexture 画出来的数据会有以前的数据 [ 49%]

... iconSpr.width = 1280; iconSpr.height = 640; iconSpr.addChild(img); btn.on(Event.CLICK,this,runGame1); } private function runGame1():void { xNum = Math.random()*7 - 3; yNum = Math.random()*7 - 3; Laya.timer.loop(20,this,onRun); Laya.timer.frameLoop(10,this,refresh); } private function refresh():void...

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