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

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

431. 物理射线检测(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 85%]

....HitResult = new Laya.HitResult(); var hitResults = []; //是否穿透 if (this.castAll) { //进行射线检测,检测所有碰撞的物体 this.scene.physicsSimulation.raycastAllFromTo(this.from, this.to, this.hitResults); //遍历射线检测的结果 for (i = 0, n = this.hitResults.length; i (图...

来源: Laya2.0_文档 发布时间: 20210715

432. TiledMap.getLayerObject [ 85%]

...bject tiledMap 中 设置对象 坐标未 96,128 为何在laya 中读取 this.role = tMap.getLayerObject("role","player"); 后 role的坐标会是112,112   Laya.init(3200,3200); //创建TiledMap实例 var tMap = new Laya.TiledMap(); //创建Rectangle实例,视口区域 var viewRect = new Laya...

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

433. List中如何动态加载多个image,并为每个image添加监听事件? [ 85%]

...监听事件? var Index=(function(_super){ function Index(){ Index.super(this); this.data = ["1tong","2tong","3tong","4tong","5tong","6tong","7tong","8tong","9tong","1tiao","2tiao","3tiao","4tiao","5tiao"]; var _dataSource_=[]; for(var i = 0;i<this.data.length;++i) { var _data_={ skin:"Images/"...

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

434. _calculateCacheRect函数有bug [ 85%]

...ps laya1应该也有这个问题。)    reset() {             this.releaseContext();             this.releaseFilterCache();             this.cacheAs = "none";             this.enableCanvasRender = false;             this.userSetCache = "none";             thi...

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

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

...er.load([{url: "res/atlas/comp.json", type: Loader.ATLAS}], Handler.create(this, onLoaded)); } private function onLoaded():void { //实例UI界面 listP = new ListPageUI(); Laya.stage.addChild(listP); Laya.timer.once(1000,this,onAdd);//1000毫秒后初始化list数据 listP.add.on(Event.CLICK,this,o...

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

436. 通过laya设计模式制作的,要怎么给按钮绑定事件呢? [ 85%]

...的链接 提交 2 个回复 Laya_Aaron 赞同来自: on(Event.MOUSE_DOWN,this,onClick); 试一下吧  onclick 函数里再打印log 2017-12-13 0 10 分享 微博 QZONE 微信 Laya_Aaron 赞同来自: 这个进度条 var 为pro 另外一张图的类继承了之前页面发布生成的类,直接...

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

437. 列表里的元素可以播放动画吗 [ 85%]

...  public function StorePage()         {             this.storelist.array = HostData.array //对list进行默认加载赋值             this.storelist.renderHandler=new Handler(this,onRender);//当list刷新时触发 并发送Box,index            ...

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

438. httpRequest send返回Request failed Status:0 [ 85%]

... = "http://thirdqq.qlogo.cn/g%3Fb% ... 3B%3B xhr.once(Laya.Event.COMPLETE, this, this.completeHandler, [url, 1]); xhr.once(Laya.Event.ERROR, this, this.errorHandler); xhr.send(url, "", "get", "arraybuffer"); } } GameMain.prototype.completeHandler = function (URL, id, data) { // private completeHandl...

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

439. 新手!谁懂得把下面两个文件转成layaair可以运行的代码 [ 85%]

...   log = Log.getLogger("Game");             }               this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStageHandler);           }           private function onAddedToStageHandler(evt:Event):void         {             this.removeEventListener(Event.ADDED_TO...

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

440. 用LayaAir引擎解析Tiled Map地图(JavaScript-2D进阶篇(JS)-扩展模块) [ 85%]

...Laya.Browser.width,Laya.Browser.height,Laya.WebGL); //创建TiledMap实例 this.tMap = new Laya.TiledMap(); //创建Rectangle实例,视口区域 var viewRect = new Laya.Rectangle(0,0,Laya.Browser.width,Laya.Browser.height); //创建TiledMap地图 this.tMap.createMap("res/TiledMap/orthogonal.json",...

来源: Laya2.0_文档 发布时间: 20210715