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

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

91. 使用3D UI · LayaAir3.4 · 引擎文档 · LAYABOX [ 73%]

...= this.bar.value - 0.9; this.value.y = 35; this.value.visible = true; Main.instance.animator.play("stun"); Laya.Tween.create(this.value).to("y", -30).duration(1000); } } 上述代码中的Main.instance.animator.play("Stun");表示改变动画状态,目的是在减少血量时播放受到攻击的...

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

92. Ts简单对象池 [ 73%]

...则使用时会出问题 */   export default class PoolManager { static _instance:any; public m_ObjectPoolDic:{[key:number]:QueueT<Laya.MeshSprite3D>}={} constructor() { } static getInstance() { return this._instance || (this._instance = new PoolManager()) }  //初始化 //加载到内存中...

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

93. physicsSimulation.rayCast在新版本里选取不准确 [ 72%]

... new Laya.Vector2();         screenPoint.x = Laya.MouseManager.instance.mouseX;         screenPoint.y = Laya.MouseManager.instance.mouseY;  //      console.log(screenPoint);          let touchRay:Laya.Ray = new Laya.Ray(new Laya.Vector3(0, 0, 0), new La...

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

94. 开关页面导致内存一直增长 [ 72%]

...如这个页面的关闭  Close(): void {         IconManager.Instance().clearTexture(this.leftverticaldrawing.skin);//清理某个动态贴图的资源(clearRes方法清理png)         IconManager.Instance().clearTexture(this.rightverticaldrawing.skin);         ResMgr...

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

95. 在Test中有个按钮点击,那么我如何发信号,使得这个点击能给控制Sample中的对象,如何调用函数 [ 72%]

...s EventDispatcher { public function Mod() { super(); } private static var _instance:Mod; public static function get index():Mod { return _instance ||= new Mod(); } public function init():void { Mod.event("aaaa"); } } }监听:Mod.on("aaa",this,onFunciton) 2016-12-19 0 0 分享 微博 QZONE 微信 ...

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

96. Dialog:屏蔽点击Dialog之外的区域关闭弹框 [ 72%]

...么设置 2017-12-21 0 4 分享 微博 QZONE 微信 庆乐 赞同来自: instance代表创建的弹窗实例   instance.close = function(type = null) { if (!type) return // 这儿加一层限制,所有未知原因的关闭弹窗都不生效 this.closeType = type; Laya.Dialog.manager.close(this); ...

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

97. UI场景加载,不稳定 [ 71%]

...f(LoadControl.isLaodSuccess){ console.log("加载成功了"); EventManager.Instance().BroadcastLisenter(GameEnum.load_success); }else{ console.log("开始加载进度了"); ResourceManager.Instance().loadSuccess(); // 这里改成不加载资源就能加载成功页面, 改成loadRuning()就报错...

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

98. as怎么用protobytebuf传输数据到服务端 [ 71%]

... = MSG_TYPE.USERLOGIN; userLogin.msgSize = MSG_SIZE; userLogin.uid = Login.instance.g_userInfo.uid; userLogin.token = Login.instance.g_userInfo.token; var msgByteArray:WritingBuffer = new WritingBuffer(); msgInfo.writeTo(msgByteArray); onSendBytesToServer(msgByteArray); msgInfo(这是protobu的de) /...

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

99. Laya3D鼠标检测,3d对象被添加到场景,然后又被移除,还能通过Ray进行碰撞检测么? [ 70%]

...it> = new Vector.<RaycastHit>(); point.elements[0] = MouseManager.instance.mouseX; point.elements[1] = MouseManager.instance.mouseY; ray.direction.x = 0; ray.direction.y = 0; ray.direction.z = 0; ray.origin.x = 0; ray.origin.y = 0; ray.origin.z = 0; handCamera.viewportPointToRay(point, ray)...

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

100. 调用创建微信授权按钮时,授权按钮有时候显示有时候不显示 [ 70%]

...      button.hide()                     MenuView.instance.createMenuBtn();                     SocketManager.instance.sendlogin();                     //LayaSample.gameLoad.toStartGame()                  }      ...

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