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

大约有 4,000 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0083 秒)

81. Animation 使用疑问 [ 97%]

...疑问 清理问题 内存没有发生变化 private onBtnClick(): void { this.body = new Laya.Animation(); this.body.y = -100; this.body.interval = 50; this.addChild(this.body); this.body.play(0, true, "hero_fly"); } private body: Laya.Animation; private onBtn2Click(): void { this.body.destroyChild...

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

82. 发布原生 ios/android 的渲染问 题 [ 97%]

...的操作  private onTexLoad(tex:Laya.Texture2D):void { // let oldTex = this.material.getTexture(); this.material.setTexture(tex); this.plane.active = true; // if(oldTex) // { // MeshPool.destoryRes(oldTex["keyUrl"],oldTex); // }  }我所注视的就是上面在laya.3d.js 中出现的那个alert ...

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

83. 使用方向键 控制精灵在格子中移动 [ 97%]

...的微信 一起研究 13890999   事件 Laya.stage.on(Laya.Event.KEY_UP,this,this.onkeyup); Laya.stage.on(Laya.Event.KEY_DOWN,this,this.onkeydown); Laya.timer.frameLoop(1,this,this.loop);事件响应 onkeyup(e){ for(let i:number = 0;i<this.keyList.length;i++){ if(this.keyList[i]==e.keyCode){ th...

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

84. List滚动条问题 [ 97%]

...下: (function (_super){ function MarketItem() { MarketItem.__super.call(this); this.size(312, 462); // {id:1,name:"10金豆-测试",price:0.01,title:"10金豆-测试",desc:"测试",balance:10,gift:0,imgPath:"res\\common\\BalanceSellDlg\\xiaodou.png",hot:1,orderCount:9} // 背景 var bg_image = ne...

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

85. 文字在框内滑动、滚动文本 [ 97%]

... Laya.init(800,800,Laya.WebGL); creatText(); function creatText(){      this.txt=new Laya.Text();      this.txt.overflow=Laya.Text.SCROLL;//必须是SCROLL才能实现滑动      this.txt.text="=========================================================================================\n" +  ...

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

86. 游戏加载进度失效 [ 97%]

... = "center"; Laya.stage.alignV = "middle"; Laya.stage.bgColor = "#ffffff"; this.gameLoading=new ui.GameLoadingUI(); //创建加载进度文本 var asset = [] asset[0] = { url: "res/atlas/run.json", type: Laya.Loader.ATLAS } asset[1] = { url: "res/bg.png", type: Laya.Loader.IMAGE } asset[2] = { url: ...

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

87. 输入设备-指南针 [ 97%]

...stage.bgColor = "#232628"; Laya.loader.load(compassImgPath, Handler.create(this, this.init)); } init() { const Gyroscope = Laya.Gyroscope, Event = Laya.Event; // 创建罗盘 this.createCompass(); // 创建方位指示器 this.createDirectionIndicator(); // // 画出其他UI this.drawUI(); // // 创...

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

88. 鼠标交互-滑动 [ 97%]

...Length) / 2; button.y = Laya.stage.height / 2; button.on(Event.MOUSE_DOWN, this, onMouseDown); Laya.stage.addChild(button); //左侧临界点设为圆形初始位置 beginPosition = button.x; //右侧临界点设置 endPosition = beginPosition + TrackLength; } function drawTrack() { var graph = new ...

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

89. LayaAir能做RPG吗?不要问我能不能,因为我已经在做 - 杀意来袭 [ 97%]

...class A {  protected _id:number = 1;    public get id():number { return this._id }  public set id(value:number){     this._id = vaule;  } } class B extends A {   public set id(value:number){     this._id = value + 1;   } } class C extends A {  public get id():number { return this._id } ...

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

90. UI-ProgressBar [ 97%]

...d(["res/ui/progressBar.png", "res/ui/progressBar$bar.png"], Handler.create(this, this.onLoadComplete)); } onLoadComplete() { const ProgressBar = Laya.ProgressBar, Handler = Laya.Handler; this.progressBar = new ProgressBar("res/ui/progressBar.png"); Laya.stage.addChild(this.progressBar); this.progres...

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