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

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

4111. AS翻译成JS的时候能不能自动进行类型转换啊?不然每个地方都要手动在AS进行手动添加强制转换 [ 44%]

...• 2017-10-26 18:04 @Monica:多参函数的翻译也有问题啊。 AS: functiong storeString(type:String, ...value):void{ var a : * = value[0]; } 翻译后的JS: storeString=function(type,__value){ var value=[];for(var i=1,sz=arguments.length;i<sz;i++)value.push(arguments[i]); var a=value[0...

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

4112. 微信小游戏编译出错 [ 43%]

...r Unexpected number in JSON at position 1;at api readFile success callback function SyntaxError: Unexpected number in JSON at position 2018-06-08 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Laya_Aaron 赞同来...

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

4113. 屏幕方向:自动横屏与自动竖屏的设置详解(TypeScript-LayaAir基础篇(TS)-屏幕适配) [ 43%]

...名称正确。 #### screenModeDemo.ts 示例代码如下: ```javascript function showScreen(): void { //图片 var img:Laya.Image = new Laya.Image(); img.centerX = 0; img.centerY = -70; img.skin = "res/monkey2.png"; Laya.stage.addChild(img); //文字 var text:Laya.Label = new Laya.Label(); text.t...

来源: Laya2.0_文档 发布时间: 20210715

4114. laya.d3.core.render.ScreenQuad_API3.0 [ 43%]

...troy setDrawArrayParams setDrawElemenParams Legend Object literal Variable Function Type alias Class Class with type parameter Constructor Method Inherited property Inherited method Inherited accessor Enumeration Interface

来源: Laya3.0_api 发布时间: 20231115

4115. 其他(TypeScript-LayaNative原生服务-LayaNative基础文档) [ 43%]

...config.js中定义,代码如下: ```javascript window.onLayaInitError=function(e) { console.log("onLayaInitError error=" + e); alert("加载游戏失败,可能由于您的网络不稳定,请退出重进"); } ``` 开发者可以根据自己需求,修改报错信息和报错方式。 ## 9. ...

来源: Laya2.0_文档 发布时间: 20210715

4116. laya.d3.renderobjs.nativeobj.NativeRenderElementOBJ_API3.0 [ 43%]

...ype parameter Constructor Property Method Accessor Object literal Variable Function Type alias Enumeration Interface

来源: Laya3.0_api 发布时间: 20231115

4117. html固定宽高,设置垂直居中没有效果。只有水平居中才生效。看了下源码,感觉在updatePos函数里的算法不对 [ 43%]

...了的。 我现在临时的做法是修改你们的源码 __proto.layout=function(){ if (!this.style)return; this.style._type |=/*laya.display.css.CSSStyle.ADDLAYOUTED*/0x200; var tArray=Layout.layout(this); if (tArray){ if (!this._$P.mHtmlBounds)this._set$P("mHtmlBounds",new Rectangle())...

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

4118. UI-RefreshList [ 43%]

...aya.loader.load("res/ui/refreshList/ani/refresh.png", Handler.create(this, function(){ this.initView(); })); } initView(){ // 加载并添加场景中需要使用的资源 this.baseBox = new Box(); this.baseBox.width = 443; this.baseBox.height = 622; this.baseBox.pos(30, 28); this.baseBox.bgColor = ...

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

4119. 分享:关于自定义场景继承的实现 [ 43%]

...from "../script/base/BaseScene"; import BaseScene=base.BaseScene; var REG: Function = Laya.ClassUtils.regClass; export module ui { export class CustomSceneUI extends BaseScene { public txt_hello:Laya.Label; constructor(){ super()} createChildren():void { super.createChildren(); this.loadScene("Custo...

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

4120. 用npm的protobuf导出的ts代码。然后用import { } from "" 运行到这里没反应,不继续执行,也不报错。 [ 43%]

...一个模块 MyModuleimport { com} from "../libs/protobuf/area.js"; export function testProto():void { console.log("call testProto"); var ProtobufUtil = com.bee.protobuf; let msg = ProtobufUtil.ProtoArea.create(); let buffer = ProtobufUtil.ProtoArea.encode(msg).finish(); let decode = ProtobufUtil.Pr...

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