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

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

741. 如何往TiledMap格子内追加精灵 [ 62%]

...99.5, 73); flower.mouseEnabled=true; flower.alpha=1; flower.on(Event.CLICK,this,function() { flower.scaleX=1.1; flower.scaleY=1.1; Laya.timer.once(100, this,function() { flower.scaleX=1; flower.scaleY=1; alert("My Name is Bear" + no); return; }) }); mallLayer._childs[0].addChild(flower); } 2017-01-1...

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

742. List下使用 localToGlobal 获取坐标错误 [ 62%]

List下使用 localToGlobal 获取坐标错误 console.log(this.ui.List.localToGlobal(new Laya.Point(0, 0)));我想获取List下cell的坐标, 但是不管怎么拖动, 打印出来的数值都是一样的,不知道是使用错误还是哪里设置错误 2017-03-29 添加评论 免费帖 --> 分...

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

743. 多个模块之间相互嵌套import,导致运行报错 [ 62%]

...{ public sex: number = 0; public Create(): void {} public Attack(): void { this.emit('attack'); } } Manager.ts public CreateCat(): void { let self = this; let cat = new Cat(); cat.Create(); cat.on('attack', function () { self.Change(); }); this.animals.push(cat); }   2019-02-26 0 2 分享 微博 QZ...

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

744. 附加脚本的使用问题 [ 62%]

... _owner: any;     public set owner(o: laya.display.Sprite) {         this._owner = o;         console.log("设置owner");     }     public get owner(): laya.display.Sprite {         return this._owner;     } } 新建脚本类如上。运行项目时,构造方法中的log被输...

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

745. Laya2.0编译后所有js都自动合并到bundle.js中,导致bundle.js过大,加载速度很慢,bundle.js可以拆分吗 [ 62%]

...ict checking of property initialization in classes. */     // "noImplicitThis": true,                /* Raise error on 'this' expressions with an implied 'any' type. */     // "alwaysStrict": true,                  /* Parse in strict mode and emit "use strict" for each source fi...

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

746. load方法加载cdn上面的图片资源的时候直接报了跨域不同源的问题,怎么破? [ 62%]

...TATIC_IMG_PATH+'progressBar.png', STATIC_IMG_PATH+'progressBar$bar.png' ]; this.isFirst = true; console.log('Gzdaze='); console.log(Gzdaze); Laya.loader.load(Gzdaze.dialogList, Handler.create(this, this.startLoaded)); 代码是这样的 报错 Access to Image at 'http://caifu-1251177394.file.myqclou...

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

747. getRes加载场景报错 [ 62%]

...报错 Laya.loader.load("LayaScene_04_laya/04_laya.ls",Laya.Handler.create(this,this.on3DComplete)); 在load3D资源后分别用两种方法实例化场景报错   //1.实例化场景 that.scene = Laya.loader.getRes("LayaScene_04_laya/04_laya.ls") as Laya.Scene3D; Laya.stage.addChild(that.scene); /...

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

748. rigidBody.applyForce 物体不会移动 [ 62%]

...腳色 Laya.Scene3D.load( "res/build5/SampleScene.ls", Laya.Handler.create(this, this.onComplete) ); //射线初始化(必须初始化) this._ray = new Laya.Ray( new Laya.Vector3(0, 0, 0), new Laya.Vector3(0, 0, 0) ); //初始化变量 this.point = new Laya.Vector2(); this._outHitResult = new La...

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

749. tiledMap场景切换问题 [ 62%]

...0*****745 • 2018-06-05 12:06 我用的是Laya.stage.on(Laya.Event.CLICK, this, function (e) {}),请问怎么销毁,销毁以后到下一个页面要重新绑定事件吗? Laya_Aaron • 2018-06-05 14:56 @150*****745:你的代码不给我讲我很难找到你说的这段,stage 是单例,...

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

750. graphics使用matrix的异常情况 [ 62%]

...异常情况 Laya.loader.load("../../res/apes/monkey2.png", Handler.create(this, function() { var t = Laya.loader.getRes("../../res/apes/monkey2.png"); var ape = new Sprite(); ape.graphics.drawTexture(t, 0, 0); ape.graphics.scale(1.01, 1) Laya.stage.addChild(ape); ape.pos(200, 0); })); 上面这段...

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