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

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

71. Sprite-屏幕截图 [ 72%]

...aimSp.width,this.aimSp.height,"#333333"); this.monkeyTexture = Laya.loader.getRes("res/apes/monkey3.png"); this.aimSp.graphics.drawTexture(this.monkeyTexture,0,0,this.monkeyTexture.width,this.monkeyTexture.height); this.drawImage = new Image(); this.drawImage.size(Browser.clientWidth/2,Browser.clien...

来源: Laya2.0_示例 发布时间: 20251130

72. 请问如何释放atlas和他的png资源 [ 72%]

...g.atlas"; Laya.loader.load(url,new Handler(this,hh)); //trace( Laya.loader.getRes(url) ); } private function hh():void { Laya.stage.addChild(new Image("MORNUI_Z_Gongneng/clip_xue_quan.png")); Laya.timer.once(1000,1,ddd); } private function ddd():void { trace("aaa1",Laya.loader.getRes(url)); Laya.sta...

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

73. 鼠标交互-拖动 [ 72%]

...pe.loadImage(ApePath); Laya.stage.addChild(ape); var texture = Laya.loader.getRes(ApePath); ape.pivot(texture.width / 2, texture.height / 2); ape.x = Laya.stage.width / 2; ape.y = Laya.stage.height / 2; ape.on(Event.MOUSE_DOWN, this, onStartDrag); } function showDragRegion() { //拖动限制区域 v...

来源: Laya_示例 发布时间: 20251130

74. 鼠标交互-拖动 [ 71%]

...adImage(ApePath); Laya.stage.addChild(this.ape); let texture = Laya.loader.getRes(ApePath); this.ape.pivot(texture.width / 2, texture.height / 2); this.ape.x = Laya.stage.width / 2; this.ape.y = Laya.stage.height / 2; this.ape.on(Event.MOUSE_DOWN, this, this.onStartDrag); } showDragRegion() { const ...

来源: Laya2.0_示例 发布时间: 20251130

75. 怎么加载网络上的图片 [ 71%]

...dler.create(this,this.loadOver)); } loadOver():void{ let res = Laya.loader.getRes("game/texture.png"); console.log("res 加载成功?",res!=null) } 这样写,始终加载不出来,获取的res 始终为空,Layaair2.0

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

76. IOs使用手动删除本地资源再次进去加载问题 [ 71%]

...失败(但是会触发加载完成,瞬间完成)但是后面loader.getRes返回的全是undefined 也许灬 • 2018-07-31 20:39 function beginLoad(){ var res_array = [ {url : "res/atlas/loading.atlas", type : Laya.Loader.ATLAS}, {url : "res/atlas/person.atlas", type : Laya...

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

77. 用xml描述创建一个clip,interval字段妖孽无效 [ 71%]

...孽无效 直接上代码             var xml:XML = Laya.loader.getRes("res/config.xml");             xml = xml.firstChild;             for (var node:XML = xml.firstChild; node != null; node = node.nextSibling)             {                 var id:N...

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

78. 新人求教!!! [ 71%]

...monkey1;   //获取图片资源   var texture:Laya.Texture = Laya.loader.getRes(imgUrl);   //绘制纹理   this.img.graphics.drawTexture(texture);   //设置纹理宽高   this.img.size(texture.width, texture.height); <!--  我想把加粗部分换成  this.img.graphics.drawTexture(Laya....

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

79. 模型资源异步加载和预加载 [ 70%]

...化加载并创建好的3D对象 var sprite3D:Laya.Sprite3D = Laya.loader.getRes("res/room.lh"); this.scene.addChild(sprite3D); 2017-08-09 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Monica - 知识达人 赞...

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

80. 两个物体 ,如果在update里修改其中一个物体的rotationEuler,会触发另一个物体的onTriggerEnter回调 [ 69%]

...nish(); } } ) } onResFinish() { let pNewScene = <Laya.Scene3D>Util3d.getRes(this.sMapRes, false) Laya.stage.addChild(pNewScene); Util3d.getChildByPath(pNewScene, "Main Camera").active = false; let pBull = <Laya.Sprite3D>Util3d.getRes(this.sBullRes) let pEnemy = <Laya.Sprite3D>Util3...

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