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

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

391. tiledmap 可以在图块层的指定格子上添加Sprite吗 [ 51%]

...会报错说_showGridList不存在,需要在libs/LayaAir.d.ts里,找到class MapLayer extends Sprite这一行,在下面加上 _showGridList: Array<any>;即可 wu语 • 2018-08-07 19:51 1.7.19.1版本不行

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

392. Web Storage数据存储(TypeScript-LayaAir基础篇(TS)-数据与通信) [ 51%]

...建一个空项目。具体代码如下所示: ```java // 程序入口 class LayaSample{ constructor() { Laya.init(100,100); var sessionStorage:any = Laya.Browser.window.sessionStorage; if(sessionStorage.pagecount){ sessionStorage.pagecount = parseInt(sessionStorage.pagecount)+1; } else{ sessionSt...

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

393. 我在dialog a上继续弹出dialog b 。需要关闭b的时候,a依然存在。怎么做? [ 51%]

....scene"); this.close(); } a和b都是独立的ts类, export default class a extends ui.a {……} 同时a和b都是对应的dialog ui文件a.scene 和b.scene的runtime属性关联过去的。

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

394. 使用laya官方示例代码制作微信小游戏无法显示 [ 51%]

...= Laya.Stage; import Label = Laya.Label; import WebGL = Laya.WebGL; export class UI_Label { constructor() { // // 不支持WebGL时自动切换至Canvas // Laya.init(800, 600, WebGL); //此处为微信小游戏小改动 Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; ...

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

395. UI加载完成后无法获取控件的大小——超详细版问题 [ 51%]

...ndler; import Loader = laya.net.Loader; import Stage = laya.display.Stage; class TestUI extends ui.test.testwhUI { constructor() { super(); this.mypan.vScrollBarSkin = ""; Laya.stage.on(Laya.Event.RESIZE, this, this.fitDOMElements); this.mypan.vScrollBar.on(Laya.Event.CHANGE, this, this.fitDOMElemen...

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

396. 【官网代码】加载dom音频报错,怎么回事? [ 51%]

....net.HttpRequest;import laya.net.Loader;import laya.utils.Browser; public class Main{private var AudioContext:Object;private var audioContext:Object;private var analyser:Object;private var audioBufferSourceNode:Object;public function Main(){Laya.init(500,500);AudioContext =Browser.window.AudioConte...

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

397. 类似古文显示方式脚本,文字垂直显示,可以控制显示速度出现打字效果等 [ 51%]

...制显示速度出现打字效果等  /**古文脚本 */ export default class TextAncient extends Laya.Script { /** @prop {name:text, tips:"显示文本", type:String, default:"hello world"}*/ public text: string = "hello world"; /** @prop {name:color, tips:"字符串类型示例", type:String, def...

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

398. 提示资源重复加载 [ 51%]

...ol01.png"; let swimpoorpath02="Comp/yard_swimpool02.png";  export default class Yard extends Laya.Sprite { private swimpoolani:Laya.Animation;  constructor() { super(); this.swimpoolani=new Laya.Animation(); //this.init(); this.swimpoolani.loadAtlas("./res/atlas/Comp.atlas",Laya.Handler.create(thi...

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

399. 编译太慢了,我想到一种优化编译时间的方式,请官方给出评价 [ 51%]

...方法,那么我们的定义库里只需要添加这样一个类即可:class Laya { public static function init(width:Number, height:Number, ... plugins):* { return null } } 这有点类似使用laya 原生js开发中的.d.ts文件,只是我们应该让这个laya类定义库尽量的小,满...

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

400. 编译Typescript项目时卡死,通过node断点调试layaair-cmd,已定位是tsSort.js问题 [ 50%]

...项目 修改src/LayaSample.ts import WebGL = Laya.WebGL; // 程序入口 class GameMain{ constructor() { Laya.init(600,400, WebGL); } static wallet:com.battlecry.idle_m.data_proto.WalletModel; } new GameMain();        然后编译就卡死         Bug调试: 经过node inspect 发现是l...

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