大约有 518 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0055 秒)
...ect.on( Laya.Event.CLICK, this, changeVxVy ); } function changeVxVy( e ){ console.log( e.nativeEvent.offsetX ); console.log( e.nativeEvent.offsetY ); } 我设置了一个矩形,并给这个矩形增加了一个点击事件。 我发现e.nativeEvent.offsetX和e.nativeEvent.offsetY返回相对...
来源: Laya_社区 发布时间: 20180201
...MeshSprite3D) == null || !this.isUseOuline){ // console.log('spreite3D node meshSprite3D is null'); return; } var unlitMaterial = new Laya.UnlitMaterial(); unlitMaterial.albedoColor = new Laya...
来源: Laya_社区 发布时间: 20210203
... onTriggerEnter,onTriggerStay,onTriggerExit 方法,并且在方法内有console.log输出,player设置了点击z方向向前移动 2、GameManager.ts:40-41行获取被碰撞体、72-94行管理被碰撞体和给每个被碰撞体添加了刚体,同时 isTrigger =true,isKinematic=true,...
来源: Laya_社区 发布时间: 20200728
...', this.onCollision); 2.碰撞检测 private onCollision(event): void { console.log("碰撞了.."); var home = _gamePage._mainPage._playPage; for(var i = 0; i < event.pairs.length; i++) { var pair = event.pairs[i]; if(!(pair.bodyA.label === 'gun' || pair.bodyB.label == "gun")) continue...
来源: Laya_社区 发布时间: 20180601
...体"; Laya.timer.frameLoop(1, this, this.checkHit); this.loadUI(); console.log("碰撞结果:" + boxCollider1.boundBox.containsSphere(cylinder.meshRender.boundingSphere)); console.log("碰撞结果:" + boxCollider1.boundBox.containsBoundBox(cylinder.meshRender.boundingBox)); console.log("碰...
来源: Laya_社区 发布时间: 20180820
...t Function.Loader.checkNext (http://127.0.0.1:59022/game/code.js:12769:40) console.error errorReport @ WAGame.js:3 thirdErrorReport @ WAGame.js:3 (anonymous) @ WAGame.js:3 c @ WAGame.js:4 (anonymous) @ WAGame.js:4 function.setTimeout @ gamePage.html:1 (anonymous) @ WAGame.js:3 (anonymous) @ WAGame.j...
来源: Laya_社区 发布时间: 20180317
...tring:string = "./sounds/hit.wav"; private onPlayMusic(e: Event): void { console.log("播放音乐"); SoundManager.playMusic(this.musicString, 1, new Handler(this, this.onComplete)); } private onPlaySound(e: Event): void { console.log("播放音效"); SoundManager.playSound(this.soundString, 1, ...
来源: Laya_社区 发布时间: 20190421
....alpha === null) { console.log("当前设备不支持陀螺仪。"); //去掉陀螺仪的移动 Laya.Gyroscope.instance.off(Laya.Event.CHANGE, this, this.onOrientationChange); ...
来源: Laya_社区 发布时间: 20170925
...MLDivElement(); imageHtml.innerHTML="<img src='res/image/1.png' />"; console.log("size: " + imageHtml.width + ", " + imageHtml.height); console.log("contextSize: " + imageHtml.contextWidth + ", " + imageHtml.contextHeight); Laya.stage.addChild(imageHtml); 上述代码在Laya中运行 正确...
来源: Laya_社区 发布时间: 20171118
...hstr('/' + name); if (window["appcache"].updateFile(fid, 0, buf, false)) { console.log("更新缓存文件" + fid + "成功"); } else { console.log("更新缓存文件" + fid + "失败"); } } }); zip.close();//执行这一步时界面恢复正常 2018-12-28 添加评论 免费帖 --> 分享 微博 Q...
来源: Laya_社区 发布时间: 20181228