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

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

991. UI运行时 · LayaAir3.4 · 引擎文档 · LAYABOX [ 51%]

...roperty } = Laya; @regClass() export class NewScript extends Laya.Script { private ui : RuntimeScript; onStart() { // 获得场景的Runtime对象 this.ui = this.owner.scene as RuntimeScript; // Button添加鼠标事件,让Image不显示 this.ui.Button.on( Laya.Event.MOUSE_DOWN, null, ()=>{ thi...

来源: Laya3.0_文档 发布时间: 20251010

992. 怎么打开第二个工程 [ 51%]

...Laya.init(500,500); Laya.stage.once(Event.CLICK,this,this.clickHandler); } private function clickHandler():void { var iframe:Object = Browser.document.createElement("iframe"); iframe.style.position ="absolute";//设置布局定位。这个不能少。 iframe.style.zIndex = 100;//设置层级 iframe....

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

993. Animation的createFrames为何加载不了有的图集资源 [ 51%]

... type: Loader.ATLAS}], Handler.create(this, onLoaded)); this.onLoaded(); } private function onLoaded():void { //Animation.createFrames(["res/atlas/monsterbeattack/0.png","res/atlas/monsterbeattack/1.png","res/atlas/monsterbeattack/2.png"], "aa") Animation.createFrames(["monsterbeattack/0.png","monst...

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

994. 打包之后不能用Promise [ 51%]

...中用了Promise,就会报JSERROR:exception info: [SyntaxError: Invalid private name '@undefined'] at line 35错误,想知道该怎么办? 2017-06-05 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 6 个回复 grrr 赞...

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

995. 动画加载成功后设置的描点,在电脑上运行正常,打包APK后到手机上运行,描点未生效 [ 51%]

...,url); anin.autoSize=true; anin.autoPlay=false; anin.interval=interval;   private function onloaded():void { anin.pivotX=anin.getBounds().width/2; anin.pivotY=anin.getBounds().height/2; }   如上:动画加载成功后设置的描点,在电脑上运行正常,打包APK后到手机上运行,...

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

996. 静态protobuf [ 51%]

...this.socket.send(buffer)   收消息时要先装到byte里再decode出来 private receiveHandler(msg): void {    this.byte.clear() this.byte.writeArrayBuffer(msg) this.byte.pos = 0 let aMsg = msgScheme.AMsg.decode(this.byte.readUint8Array(0, 100000)) 2019-03-27 0 0 分享 微博 QZONE 微信 为...

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

997. list组件改变位置后在改变数据源的长度,会导致index超过数据源长度 [ 51%]

...不上 2019-09-19 0 0 分享 微博 QZONE 微信 Laya_Aaron 赞同来自: private onClick(e: Laya.Event) {     this._data = [1];   this.list.array = this._data; this.list.y = 220; this.list.height = 300;   }   代码这么写就好了 2019-09-19 0 1 分享 微博 QZONE 微信 Laya新用户 赞...

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

998. 预设/场景的导出(TypeScript-3D基础(TS)-LayaAir3D之3D场景可视化编辑) [ 51%]

...st.ls',Laya.Handler.create(this,this.onComplete)); } /** * 加载完成 */ private onComplete(scene:Laya.Scene3D):void{ // 将场景加到舞台上 Laya.stage.addChild(scene); } } } ``` 运行效果(图2): ![](img/2.png)(图2)

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

999. layanative安卓端需要怎么添加ttf字体,需要增加两种字体? [ 51%]

...900);   Laya.loader.load("res/remember.ttf",new Handler(this,test)); }   private function test():void { var text:Text; text = new Text(); text.fontSize = 30; text.color = "#ff0000"; text.text = "你好"; text.pos(100, 100); Laya.stage.addChild(text);   text = new Text(); text.fontSize = 30; text....

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

1000. Image属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 51%]

...ode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.setup(); } private setup(): void { var dialog: Image = new Image("res/ui/dialog (3).png"); dialog.pos(165, 62.5); Laya.stage.addChild(dialog); } } } new laya.UI_Image(); ```

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