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

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

21. 分享:为List组件下Item(Box)下的Button(或其他组件)进行监听! [ 82%]

...list赋值更改list的显示 this.list.array = arr; //给list添加渲染函数 this.list.renderHandler = new Handler(this, onListRender); } //通过渲染函数为Btn添加Click function onListRender(item, index) { var btn=item.getChildByName('btn'); btn.on(Event.CLICK,this,onClickBtn,[index]); } ...

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

22. laya.physics.Physics_API3.0 [ 82%]

...worldRoot 时平移一次,其他情况请配合 updatePhysicsByWorldRoot 函数使用 Returns Sprite Defined in laya/physics/Physics.ts:237 物理世界根容器,将根据此容器作为物理世界坐标世界,进行坐标变换,默认值为stage 设置特定容器后,就可整体位移...

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

23. 使用百度开放数据域时,调试报错 [ 81%]

...。   断点查看了下数据,swan对象中不存在getSystemInfoSync函数,只存在开放数据域中支持的函数。但在微信开发者工具中断点开放数据域的相同代码,发现wx对象中支持getSystemInfoSync函数。问下官方提供的swan-game-adapter.js是不能在...

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

24. laya.d3.webxr.core.ButtonGamepad_API3.0 [ 81%]

... Parameters type: string 事件的类型。 listener: Function 事件侦听函数。 Returns EventDispatcher 此 EventDispatcher 对象。 Inherited from EventDispatcher.off Defined in laya/events/EventDispatcher.ts:113 Parameters type: string caller: any Optional listener: Function Optional args: a...

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

25. laya.components.AnimatorState2D_API3.0 [ 81%]

... Parameters type: string 事件的类型。 listener: Function 事件侦听函数。 Returns EventDispatcher 此 EventDispatcher 对象。 Inherited from EventDispatcher.off Defined in laya/events/EventDispatcher.ts:113 Parameters type: string caller: any Optional listener: Function Optional args: a...

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

26. 分享:List相关(Item增删功能) [ 81%]

...能(UI不可显示) listP._list.array = arr;//数据赋值 //list渲染函数 listP._list.renderHandler=new Handler(this,onRender); //list鼠标事件触发函数 listP._list.mouseHandler = new Handler(this,onMouse); } //鼠标事件添加 private function onMouse(e:Event,index:int):void { //鼠...

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

27. socket通讯返回数据 [ 80%]

... } private receiveHandler(msg: any = null): void { ///接收到数据触发函数 console.log("接收");//***************************************************************************不写出 console.log(msg); } private closeHandler(e: any = null): void { //关闭事件 console.log("关闭事件");//...

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

28. laya.resource.Resource_API3.0 [ 79%]

... Parameters type: string 事件的类型。 listener: Function 事件侦听函数。 Returns EventDispatcher 此 EventDispatcher 对象。 Inherited from EventDispatcher.off Defined in laya/events/EventDispatcher.ts:113 Parameters type: string caller: any Optional listener: Function Optional args: a...

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

29. 如何通过代码控制prefab上面的时间轴动画animation? [ 79%]

...ss:soldieritem =new soldieritem(); ss.show.play(0);   可以添加 监听函数 监听动画播放结束 ss.show.on(Event.COMPLETE, this, onAnimComplete);     good luck:) 2019-02-15 0 0 分享 微博 QZONE 微信 nevercai 赞同来自: load之后实例化prefab,实例化之后就跟普通scene...

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

30. laya.device.motion.Accelerator [ 79%]

...t Accelerator.instance获取唯一的Accelerator引用,请勿调用构造函数。 listen()的回调处理器接受四个参数: acceleration: 表示用户给予设备的加速度。 accelerationIncludingGravity: 设备受到的总加速度(包含重力)。 rotationRate: 设备的自转速...

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