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

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

301. graphics绘制报错 [ 65%]

graphics绘制报错 class Sprite_DisplayImage { constructor() { Laya.init(Laya.Browser.clientWidth, Laya.Browser.clientHeight, Laya.WebGL); const path = "./res/apes/monkey2.png"; Laya.loader.load(path, Laya.Handler.create(this, function() { let tex = Laya.loader.getRes(path); let sp = new Laya.Spr...

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

302. 报错,这不是个构造函数 "StartPage is not a constructor" [ 65%]

...nction(_super){ function StartPage(){ StartPage.__super.call(this); } Laya.class(StartPage,'view.StartPage',_super); return StartPage; })(StartPageUI) LayaSample: var LayaSample = (function(){ (function(){ Laya.init(667,375); Laya.stage.bgColor = "#ffcccc"; Laya.loader.load("res/atlas/ui.atlas",La...

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

303. 希望增加基于name的节点操作 [ 65%]

...很可能都不在一个父节点中。   按照前端开发的做法,class为a的所有节点的隐藏,代码写起来很简单:$(".a") .hide();   但是在laya项目中基本上操作起来能累死。   我觉得引擎中集成这样一个选择方法应该是比较容易的吧:dom.get...

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

304. 内嵌模式创建scene,运行时报找不到json文件 [ 65%]

...,并且都是ide自动生成的代码。     export module ui { export class HelloUI extends Scene { public static uiView:any ={"type":"Scene","props":{"width":640,"height":1136},"compId":2,"child":[{"type":"Label","props":{"y":64,"x":214.5,"width":211,"text":"label","styleSkin":"comp/label.png"...

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

305. as3字符串截取int的问题 [ 65%]

...报错Uncaught ReferenceError: int is not defined function DConfig(){}; __class(DConfig,'DConfig'); __getset(1,DConfig,'GamrRoomEnterPower',function(){ return DConfig.gamrRoomEnterPower; },function(value){ DConfig.gamrRoomEnterPower=value; console.log(DConfig.gamrRoomEnterPower.length); console.log(...

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

306. 这个算是laya的bug还是ts的bug? [ 65%]

...是ts的bug? 工程使用的是分离模式,里面有一个Test的ui class文件继承于导出的TestUI类,然后这个ui里面有一个var为closeBtn的按钮 我是想创建一个容器,然后把这个Test的对象扔进这个容器中,这个容器在add到stage中,这个时候发现T...

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

307. 水平滚动条组件 · LayaAir3.0文档 · LAYABOX [ 65%]

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

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

308. 自定义对话框设置zOrder后,关闭时报错 [ 65%]

...ext = '' + this.count; Laya.timer.loop(1000, this, this.countdown); } Laya.class(countdownBar, "CountdownBar", CountdownUI); return countdownBar; }()); CountdownBar.prototype.countdown = function () { this.count--; if (this.count > 0) { this.countLabel.text = '' + this.count; } else { Laya.timer....

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

309. ProgressBar 代码问题 [ 65%]

...g.changeValue); }); 进度条代码: import Handler = Laya.Handler; export class Onloading extends ui.LoadingUI{        constructor(){        super();        this.loadingBar.changeHandler = new Handler(this, this.onChange); } public changeValue():void{        console.log("change"); ...

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

310. 垂直滚动条组件 · LayaAir3.0文档 · LAYABOX [ 65%]

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

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