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

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

231. EventDispatcher接收不到参数 [ 72%]

...r(); //发送事件 Dispatcher.Emit = function(InName,agv){ //派发事件 console.log("agv-->"+agv); Dispatcher.eventDispatcher.event(InName,agv); } //侦听事件 Dispatcher.AddNotice = function(InName,caller,listener,arg){ //监听事件 Dispatcher.eventDispatcher.on(InName,caller,listener,(ar...

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

232. protobuf的bytes字段的问题 [ 72%]

...ode(loginReq).finish(); var de_loginProto= LoginReqCls.decode(loginProto); console.log('c : ' + de_loginProto['channel']); console.log('a : ' + de_loginProto['msg']); 输出结果是: c : 2 a : undefined 为什么 呢? msg为空?   2017-11-05 添加评论 免费帖 --> 分享 微博 QZONE 微...

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

233. Laya3d球星添加了刚体,但是碰撞无法触发onTriggerEnter的问题,120元有偿悬赏解答 [ 72%]

... onTriggerEnter,onTriggerStay,onTriggerExit 方法,并且在方法内有console.log输出,player设置了点击z方向向前移动   2、GameManager.ts:40-41行获取被碰撞体、72-94行管理被碰撞体和给每个被碰撞体添加了刚体,同时 isTrigger =true,isKinematic=true,...

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

234. 循环监听按钮,如何进行传参和接受参数 [ 72%]

...ypeBox.getChildByName('btn' + i) as Laya.Image;               console.log(e); e.on(Laya.Event.CLICK, this, this.onBtnClick); }   按钮事件 private onBtnClick(event:Laya.Event): void {         let b = event.currentTarget as Laya.Image; console.log('onClickLevel > ' + b.ski...

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

235. LayaAir 如何读取资源中的txt文件中的内容 [ 72%]

...何读取资源中的txt文件中的内容 var testPath ="res/Test.txt"; console.log( Laya.loader.load(testPath)); console.log(Laya.Loader.getRes(testPath)); 这里打印的是 LoaderManager {retryNum: 1, retryDelay: 0, maxLoader: 5, _loaders: Array(4), _loaderCount: 1…} undefined 并不是文本...

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

236. 摄像机的viewportPointToRay报错 [ 72%]

...计产生射线方法,通过2D坐标获取与屏幕垂直的一条射线 console.log( PanelMgr.mainCamera); PanelMgr.mainCamera.viewportPointToRay(this.pointRay, this.ray); (this.owner as Laya.Scene3D).physicsSimulation.rayCast(this.ray,this.hitresult); console.log(Laya.MouseManager.instance.mouse...

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

237. 微信加载文件失败没有回调 [ 72%]

...本管理(会重命名文件名称的)   例子代码: LoadError(){console.log("LoadError")} LoadOK(){console.log("LoadOK")}   Laya.loader.on(Laya.Event.ERROR,this,this.LoadError) Laya.loader.load("不存在的图片URL",Laya.Handler(this,this.LoadOK));     发布成微信小游戏版本...

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

238. 缓动-时间线 [ 72%]

...); timeLine.on(Event.LABEL, this, this.onLabel); } function onComplete() { console.log("timeLine complete!!!!"); } function onLabel(label) { console.log("LabelName:" + label); } function keyDown(e) { switch(e.keyCode) { case Keyboard.LEFT: timeLine.play("turnLeft"); break; case Keyboard.RIGHT: timeL...

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

239. 子容器的事件问题 [ 72%]

...(vhvt); vhvt.on(laya.events.Event.CLICK, this, (event: Laya.Event) => { console.log("为什么这里不进来"); }); } /**  * ViewHeadViewTest  */ class ViewHeadViewTest extends Laya.Sprite {     constructor() {         super();         this.graphics.drawRect(0, 0, 1500, 1500, "#0000f...

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

240. 在add panel 后设置 hScrollBar.value 没有用 [ 72%]

...Nevermore 赞同来自: Laya.stage.addChild(this);             console.log("addd 33");                         this.alpha = 0;             Laya.Tween.to(this,{alpha:1},200);             self.panel_room.hScrollBar.value = 432; console.log("s...

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