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

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

331. laya.resource.BaseTexture_API3.0 [ 85%]

...ference _removeReference _setCPUMemory _setCreateURL _setGPUMemory destroy event gpuCompressFormat hasListener isCreateFromURL off offAll offAllCaller on once destroyUnusedResources Constructors constructor new BaseTexture(width: number, height: number, format: number): BaseTexture Overrides Resourc...

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

332. 输入设备-摇一摇 [ 85%]

...t Shake = Laya.Shake; Shake.instance.start(5, 500); Shake.instance.on(Laya.Event.CHANGE, this, this.onShake); console.text = '开始接收设备摇动\n'; } onShake() { const Shake = Laya.Shake; shakeCount++; console.text += "设备摇晃了" + shakeCount + "次\n"; if (shakeCount >= 3) { Shake.inst...

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

333. Sprite-旋转缩放 [ 85%]

...dule laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Event = Laya.Event; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Sprite_RoateAndScale { private ape: Sprite; private scaleDelta: number = 0; constructor() { // 不支持WebGL时自动切换至Canvas ...

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

334. laya.ani.swf.MovieClip [ 85%]

...l Classes | Index | Frames No Frames MovieClipProperties | Methods | Events Packagelaya.ani.swfClasspublic class MovieClipInheritanceMovieClip Sprite Node EventDispatcher Object MovieClip 用于播放经过工具处理后的 swf 动画。 Public Properties Hide Inherited Public Properties Sho...

来源: laya_api 发布时间: 20170929

335. 怎么实现同一个工程内分包? [ 84%]

...lash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.Event; import login.LoginView; public class Main extends Sprite { public function Main():void { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { remov...

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

336. matter中有没有类似于unity中的OnCollision碰撞检测函数呀,用js怎么写 [ 84%]

...有。这个我给你个demo,你自己看看。 1.初始化 this.Matter.Events.on(this._engine, 'collisionActive', this.onCollision);   2.碰撞检测 private onCollision(event): void { console.log("碰撞了..");  var home = _gamePage._mainPage._playPage;  for(var i = 0; i < event.pairs.len...

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

337. js socket 连接不上 [ 84%]

...03:8888"); // this.socket.connect("10.10.1.103",8888); this.socket.on(Laya.Event.OPEN, this, openHandler); //建立连接 this.socket.on(Laya.Event.MESSAGE, this, receiveHandler); //接收到数据触发函数 this.socket.on(Laya.Event.CLOSE, this, closeHandler); //关闭事件 this.socket.on(Laya.E...

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

338. websocket连接, ws 时没问题,改成 wss 没反应 [ 84%]

...ectByUrl("wss://192.168.1.250:5000/websocket/");     this.socket.on(Laya.Event.OPEN, this, this.openHandler);     this.socket.on(Laya.Event.MESSAGE, this, this.receiveHandler);     this.socket.on(Laya.Event.CLOSE, this, this.closeHandler);     this.socket.on(Laya.Event.ERROR, this, this.erro...

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

339. spine动画放大后,遮罩显示不正常 [ 84%]

...      const         Templet = Laya.Templet,         Event = Laya.Event;         let mFactory = new Templet();         mFactory.on(Event.COMPLETE, this, this.parseComplete,[parent,mFactory]);         mFactory.on(Event.ERROR, this, this.onError);     ...

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

340. 事件派发求解 [ 84%]

LayaAir引擎 事件派发求解 如图2 ;23行派发事件“event_closeThis”,没有问题;如果是24行派发“click”,就报图1 ,why? 附件 : --> 2017-07-15 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提...

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