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

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

161. layaair获取xml信息出错 [ 81%]

...: var configData:XmlDom = Loader.getRes(config_PATH) as XmlDom; console.log(configData); console.log(configData.attributes); console.log(configData.childNodes);   xml如下: <root>     <config>          <PATH>../h5/</PAHT>     </config> </root> 2...

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

162. 程序当中更改适配模式后,没有生效成相对应的适配模式效果是为什么? [ 81%]

...ht = Laya.Browser.clientHeight; if (stageWidth < stageHeight) { console.log("one", Laya.stage.scaleMode) Laya.stage.scaleMode = Laya.Stage.SCALE_NOSCALE; //1 console.log("one1", Laya.stage.scaleMode) } else { console.log("two", Laya.stage.scaleMode) Laya.stage.scaleMode = Laya.Stage.SCALE_EXACTFI...

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

163. 射线检测报错,outHitInfo.sprite3D=null; [ 81%]

...a = this.scene.scene.getChildByName("Main Camera") as Laya.Camera; console.log("当前摄像机的名字是:" + this.camera.name); }  public _start(state:Laya.RenderState):void{ this.ray = new Laya.Ray(Laya.Vector3.ZERO,Laya.Vector3.ZERO); this.phasorSprite3D = new Laya.PhasorSpriter3D(); Laya.st...

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

164. list item 添加事件后无法监听 [ 81%]

...   return list; }  function updateItem(cell, index) {     console.log(index);     // console.log(cell.dataSource);     cell.setImg(cell.dataSource[index]);     cell.on(Laya.Event.CLICK, function() {         console.log("click")     }) }  function onSelect(index) {  ...

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

165. Laya2.6.0 升级至Laya2.8.0 Native环境 加载ttf 字体不生效 [ 81%]

...        } else {                     console.log("OPPOSANS-R ttf 字体加载成功");                 }                 return resolve(success);             }), Laya.Handler.create(this, (pro) => {         ...

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

166. [LayaAirIDE3]xcode切入切出声音不播放 [ 81%]

...r() {         // 暂停所有需要停止的逻辑         console.log("onBlur");         SoundManager.Instance.pauseBGM();         // // 部分机型包内不生效         SoundManager.Instance.pauseAllEffects();     }    private onFocus() {         if (!SoundManager.is...

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

167. 请问laya2.0 2d物理有射线检测功能吗 [ 81%]

...ics.I.world world.RayCast(function(fixture,point,normal,fraction){ console.log("fixture",fixture) console.log("point",point) console.log("normal",normal) console.log("fraction",fraction) },{ x:300, y:100 },{ x:300, y:1000 }) //每碰到一个物体就会触发一次回调函数,没碰到物体就...

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

168. async bug 导出小游戏 [ 81%]

...are.imageUrl = ShareImgUrl; let a = await share.shareAppMessage(); console.log(a) }   转换后代码   onShareClick() { // return __awaiter(this, void 0, void 0, function* () { // let share = SDKCenter.getShare(); // share.title = ShareNormal; // share.imageUrl = ShareImgUrl; // let a = yield sha...

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

169. Layabox web 复制一段文字到剪贴板 [ 81%]

...窗的时候,用确定按钮做复制,自定义弹窗参考:https://blog.csdn.net/qq_27437967/article/details/70858262   复制到剪贴板代码如下:(窗口有点难看...)   function copyText(str) { new ShowDiv(str); }  function ShowDiv(str) {  var _this = this;  this.AppConfirm...

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

170. 加载-加载序列 [ 80%]

....onAssetLoaded), null, null, 2, false); } onAssetLoaded(texture) { console.log(texture.url); // 恢复默认并发加载个数。 if (++numLoaded == 3) { Laya.loader.maxLoader = 5; console.log("All done."); } } } new Loader_Sequence();module laya { import Texture = Laya.Texture; import Handler = Lay...

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