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

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

291. 微信小游戏加载资源问题 [ 52%]

...{ 'use strict'; function DEB(str){ console.debug("[res]"+str); } class MiniFileMgr { static isLocalNativeFile(url) { for (var i = 0, sz = MiniAdpter.nativefiles.length; i < sz; i++) { if (url.indexOf(MiniAdpter.nativefiles[i]) != -1) return true; } return false; } static getFileInfo(fil...

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

292. 限制区域拖动效果,为什么会无法限制呢? [ 52%]

...unction onStartDrag(e) { this.startDrag(dragRegion, true, 100); } }  Laya.class(GolfMainUI, "GolfMainUI", GolfMainPageUI);  //初始化DEBUG //初始化微信小游戏 Laya.MiniAdpter.init(); //程序入口 Laya.init(500,800, WebGL);  Laya.stage.scaleModel = "full";  // DebugTool.init() //激活...

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

293. VBOX动态增加的元素没有自动布局 [ 52%]

...bel; import Handler = laya.utils.Handler; import Loader = laya.net.Loader; class TestUI extends ui.test.TestPageUI { constructor() { super(); var btn1=new ui.test.view_btnUI(); var btn1_btn:laya.ui.Button=btn1.getChildByName("btn") as laya.ui.Button; //问题一: 这里为什么获取不到子node...

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

294. 怎么像canvas那样做到每次循环去清空一次画布,我发现每次画的时候他会把上一次的坐标也画出来,导致变形了,该如何让他每次累加的同时清空上次的路径 [ 52%]

...次累加的同时清空上次的路径 var sp; var x = 0; export default class Scene extends Laya.Sprite{ constructor(){ super(); Laya.init(500, 300, Laya.WebGL); var bg = new Laya.Sprite(); bg.loadImage("comp/hunter.jpg"); this.addChild(bg); Laya.timer.frameLoop(1,this,this.move); // drawSomething...

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

295. 导航标签组组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 52%]

...。需要添加如下的示例代码,实现脚本控制Tab: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Tab }) public tab: Laya.Tab; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只...

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

296. laya.sprite精灵无缝拼接地图,会出现黑线跟白线,使用laya的2.0.1beta版本 [ 52%]

...位是没错,而且都是整数的移动地图的。   export default class MapSprite extends Laya.Image{ isShow:boolean = false; name:string = ""; constructor() { super(); }  loadImageAndPos(name:string,posX:number,posY:number):void { this.name = name; this.anchorX = 0; this.anchorY = 0; this.x...

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

297. 下拉选项框组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 51%]

...要添加如下的示例代码,实现脚本控制ComboBox: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.ComboBox }) public combobox: Laya.ComboBox; //组件被激活后执行,此时所有节点和组件均已创建完毕...

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

298. UI弹窗 · LayaAir3.0文档 · LAYABOX [ 51%]

...动图8) 3、代码创建Dialog组件 代码运行结果: const { regClass, property } = Laya; @regClass() export class UI_Dialog extends Laya.Script { private DIALOG_WIDTH: number = 220; private DIALOG_HEIGHT: number = 275; private CLOSE_BTN_WIDTH: number = 43; private CLOSE_BTN_PADDING: number...

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

299. 可以帮我测试一下吗? 使用mask的场景,放着就会出现记忆体用完的讯息? [ 51%]

...一直旋转。有将mask拿掉测试,发现就不会有类似问题。class GameLayer extends ui.GameLayerUI { private infos : any; constructor () { super (); this.infos = { rotation : 0 }; Laya.timer.frameLoop(1,this,()=> { this.infos.rotation += 1; if (this.infos.rotation >= 360) this.inf...

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

300. 复选框组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 51%]

...要添加如下的示例代码,实现脚本控制CheckBox: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.CheckBox }) public checkbox: Laya.CheckBox; //组件被激活后执行,此时所有节点和组件均已创建完毕...

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