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

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

211. 求绘制遮罩会引起黑屏的解决办法 [ 96%]

求绘制遮罩会引起黑屏的解决办法 this.progressvalue = new Laya.Image("Game/bar_yuan.png"); this.progressvalue.anchorX = 0.5; this.progressvalue.anchorY = 0.5; this.progressvalue.pos(15, 15); //记录宽度 this.width_x = this.progress.width + 3;   this.vmask = new Laya.Sprite(); this....

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

212. 鼠标交互-双指旋转(多点触控) [ 96%]

...(); })(); function setup() { createSprite(); Laya.stage.on(Event.MOUSE_UP, this, onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, onMouseUp); } function createSprite() { sp = new Sprite(); var w = 200, h = 300; sp.graphics.drawRect(0, 0, w, h, "#FF7F50"); sp.size(w, h); sp.pivot(w / 2, h / 2); sp.po...

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

213. 水平布局容器组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 96%]

...和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.hbox.pos(100, 100); this.hbox.bgColor = "#ffffff"; this.hbox.space = 100; this.hbox.align = "middle"; } } 二、通过代码创建HBox组件 有时,需要用代码管理UI,创建UI_HBox类用于创建HBox组件。由...

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

214. 屏幕适配的缩放模式详解(TypeScript-2D基础篇(TS)-屏幕适配) [ 96%]

...      //设置适配模式         Laya.stage.scaleMode = this.modes;         //设置舞台背景色         Laya.stage.bgColor  = "#ffff99";             //实例一个背景         var bg = new Image();         bg.skin = "res/img/l...

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

215. 请教如何实现完美的LoopList?尝试了下总是有倒带的卡顿动作隐藏不掉 [ 96%]

...顿,而且会显示倒带 private onLoop(){              if(this.WheelList.visible==true)             {                 this.WheelList.set_visible(false);                 this.WheelList2.set_visible(true);                  t...

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

216. Clip组件Bug:Play方法无法结束循环 [ 96%]

...s);         if (interval != void 0) {             this.interval = interval;         }          this.on(Laya.Event.COMPLETE, this, () => {             this.destroy();         });         this.frameIndex = 0;       ...

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

217. LayaBox进阶之UI管理类 [ 96%]

...aya.Sprite; private scene: GameScence; private uiList:any; constructor() { this.mainContent = new Laya.Sprite(); this.uiList = ; } }mainContent 为默认添加到的层级, GameScence 为UI管理器默认场景 uiList放所有加载进来的场景 第一步实现 打开界面 openWindow public ope...

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

218. 怎么对graphics画出来的图片进行鼠标点击拖动??? [ 96%]

...e.bgColor = "#232628"; //这里是我注释掉的代码 //Laya.loader.load(this.ApePath, Handler.create(this, this.setup)); this.setup(); } private setup(): void { this.createApe(); this.showDragRegion(); } private createApe(): void { this.ape = new Sprite(); //this.ape.loadImage(this.ApePath); Laya...

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

219. list方法onSelect失效 [ 96%]

...: 使用list做图片选择栏,代码如下: onClickChooseIcon() { this.imgList.visible = true; this.imgListBg.visible = true; this.reqImage = this.iconImg; this.imgList.vScrollBarSkin = ''; this.imgList.selectEnable = true; this.imgList.array = listArr; this.imgList.renderHandler = new Laya.H...

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

220. CommandBuffer_Outline 每次 addCommandBuffer都会永久增加10Gpu,removed掉相机事件也不会减少 [ 96%]

...public static GetInstance(): CommandBuffer_Outline{         if(this.instance == null) this.instance = new CommandBuffer_Outline();         return this.instance;     }      public init(): void {         //使用之前必须先初始化          i...

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