大约有 495 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0044 秒)
...自: 170*****650 这是因为你函数执行时执行域发生了改变,this指向变成了window。你有两种方案处理这个问题: 第一个: joy.callBackFun = onMyRole.bind(this); 第二个: joy.callBackFun = Handler.create(this,onMyRole); 2017-06-11 1 0 分享 微博 QZONE 微信...
来源: Laya_社区 发布时间: 20170610
...无法获取高度 var roleAni = new Laya.Animation(); roleAni.loadImages( this.aniUrls( v1, v2, tip, frames ) ).play(); roleAni.pos(x,y); this.root.addChild( roleAni ); roleAni.pivotY = roleAni.getBounds().height; console.log("---> ", roleAni.getBounds() ); 打印为 ---> Rectangle {x: 0, y:...
来源: Laya_社区 发布时间: 20170824
...中 3d模型可以添加2d刚体吗 这边添加会出现报错 TypeError: this.owner.localToGlobal is not a function preload.js:55 at RigidBody.__proto._createBody (/Users/tuyoo/client5/work/Laya_work/FlipRush/LayaProject/car/bin/libs/laya.physics.js:2031:27) at RigidBody.__proto._onAwake (/Users/t...
来源: Laya_社区 发布时间: 20190107
...rror")} LoadOK(){console.log("LoadOK")} Laya.loader.on(Laya.Event.ERROR,this,this.LoadError) Laya.loader.load("不存在的图片URL",Laya.Handler(this,this.LoadOK)); 发布成微信小游戏版本在真机微信上运行,发现这2个回调都没执行。 2018-09-20 添加评论 免...
来源: Laya_社区 发布时间: 20180920
...制作的帧动画之后会出现截图失败的情况private takePhoto(){ this._htmlC = this.gridBox.drawToCanvas(this.gridBox.width,this.gridBox.height,0,0); //获取截屏区域的texture this._tex = new Laya.Texture(this._htmlC); this._photo=new Laya.Sprite(); //将截屏的texture进行draw绘...
来源: Laya_社区 发布时间: 20170502
...关于雾化影响粒子特效的问题 openFlog() { this.gamesConfig.fightScene.enableFog = true; this.gamesConfig.fightScene.fogColor = this.flogColor this.gamesConfig.fightScene.fogStart = 20 this.gamesConfig.fightScen...
来源: Laya_社区 发布时间: 20190420
...,可以正常执行,但是 constructor() { super(); //添加3D场景 this.onAwake(); //加载camera和light this.onStart(); //加载地面 this.loadGround(); //加载墙面 this.loadwall(); this.loopShoot(); } public loopShoot(): void{ Laya.timer.loop(1000, this, this.shootBall); } public sho...
来源: Laya_社区 发布时间: 20190506
...ox; skyBox.textureCube = Laya.TextureCube.load("res/skyBox1/skyCube.ltc"); this.sceneMap.enableFog = true; this.sceneMap.fogColor = new Laya.Vector3(0.6,0.3,0); this.sceneMap.fogStart = 5; this.sceneMap.fogRange = 50; 请问 怎么设置才能让雾 也对天空盒起作用? 2018-07-23 添加评...
来源: Laya_社区 发布时间: 20180723
... 是要模仿镜头移动功能吗,这样可以 onAwake() { const self = this; self.gameObj = self.owner as Laya.Sprite; Laya.Physics.I.worldRoot = self.gameObj; this.cameraRect = new Laya.Rectangle(0, 0, 2000, 1000); this.gameObj.scrollRect = this.cameraRect; } onUpdate() { this.cameraRect.x = th...
来源: Laya_社区 发布时间: 20190214
...包和资源 ``` onConfigLoaded(): void { Laya.stage.on(Laya.Event.CLICK, this, this.toPage2) } toPage2(): void { my.redirectTo({ url: "/subpackage1/page2/index", success: function () { console.log("success") }, fail: function (err) { console.log("2222", err) } }) } ``` 注意:在加载资源的...
来源: Laya2.0_文档 发布时间: 20210715