大约有 1,765 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0051 秒)
...meStartView.super(this); this.Start.on(Laya.Event.CLICK, this, this.open); console.log(this.Start); GameStartView.prototype.open = function(){ console.log("Open is ok"); } }; Laya.class(GameStartView,"GameStartView", GameStartUI); 输出:Button {toggle: false, _bitmap: AutoBitmap, _text: Text, _st...
来源: Laya_社区 发布时间: 20180213
... var asset:Image = assets; //查看log,清理前资源一直在内存中 console.log(Laya.loader.getRes(asset)); //调用清理方法 Laya.loader.clearRes(asset); //查看log,清理后,资源被卸载 console.log(Laya.loader.getRes(asset)); sp.destroy(); 这些都测试过,没有消减 curme...
来源: Laya_社区 发布时间: 20180622
...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
...何读取资源中的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
...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
...ns; myI18n = await Laya.loader.load("editorResources/i18nSettings.i18ns"); console.log(myI18n.t("a")); 在很多情况下,如果只是代码里用到的一些小量国际化的支持,并不想创建多个json文件,那么也有全代码的方法。 //第一个参数需要全局唯一 let myI18...
来源: Laya3.0_文档 发布时间: 20251010
... onTriggerEnter,onTriggerStay,onTriggerExit 方法,并且在方法内有console.log输出,player设置了点击z方向向前移动 2、GameManager.ts:40-41行获取被碰撞体、72-94行管理被碰撞体和给每个被碰撞体添加了刚体,同时 isTrigger =true,isKinematic=true,...
来源: Laya_社区 发布时间: 20200728
...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
...本管理(会重命名文件名称的) 例子代码: 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
...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