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

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

211. 对象池 · LayaAir3.0文档 · LAYABOX [ 58%]

...的类。 * @return 此类型标识的一个对象。 */ static getItemByClass<T>(sign: string, cls: new () => T): T { if (!Pool._poolDic[sign]) return new cls(); var pool = Pool.getPoolBySign(sign); if (pool.length) { var rst = pool.pop(); rst[Pool.POOLSIGN] = false; } else { rst = new cls...

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

212. webgl模式下对Panel组件旋转时Panel子对象显示错误的BUG! [ 58%]

...  测试demo(直接新建项目,拷贝代码即可) // 程序入口 class GameMain{ constructor() { // Laya.init(1280,720); //无问题 Laya.init(1280,720,Laya.WebGL);//有问题 console.log(Laya.version); var testSpriteRotation:PanelRotationTest = new PanelRotationTest(Laya.Sprite); testSpri...

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

213. 弹窗视图组件 · LayaAir3.0文档 · LAYABOX [ 58%]

... 保存场景后,在RuntimeScript.ts中添加如下代码: const { regClass } = Laya; import { RuntimeScriptBase } from "./RuntimeScript.generated"; @regClass() export class RuntimeScript extends RuntimeScriptBase { onAwake(): void { this.closeBtn.on(Laya.Event.CLICK, this, () => { this.close...

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

214. 为什么这个ui中给这个TextInput组件runtime属性绑定了一个类 [ 58%]

...个TextInput组件runtime属性绑定了一个类 绑定了这个类后, class TextInputEx extends Laya.TextInput constructor() { console.log("执行了"); super() ; } // 获取焦点 onFocus() : void { console.log("焦点进入"); // 是否缓存初始的文本提示字符串和文本颜色. if (...

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

215. 真机下运行帧率不稳定 [ 58%]

...会有突然掉帧的现象,fast模式和slow模式都有这个问题  class Scene_Test { constructor() { super(); Laya.timer.frameLoop(1,this,this.update); } private update() { let dt = Laya.timer.delta / 1000; console.log("dt="+dt); } } 附件中图1是在iphone6上面运行打印的信息,...

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

216. 在Test中有个按钮点击,那么我如何发信号,使得这个点击能给控制Sample中的对象,如何调用函数 [ 58%]

...该事件进行监听package { import laya.events.EventDispatcher; public class Mod extends EventDispatcher { public function Mod() { super(); } private static var _instance:Mod; public static function get index():Mod { return _instance ||= new Mod(); } public function init():void { Mod.event("aaaa"...

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

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

...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

218. ProgressBar 代码问题 [ 58%]

...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

219. 关于removeChildren、 destroy和destroyChildren的疑惑 [ 58%]

...); this.alpha = 0; Laya.stage.addChild(this); // this.pos(440,640); } Laya.class(sightBeadSprite, "SightBead", Laya.Sprite); return sightBeadSprite; }());然后如此使用destroy for (var i = 0; i < Laya.stage.numChildren; i++) { var object = Laya.stage.getChildAt(i); // object.removeSelf(); Lay...

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

220. spine动画放大后,遮罩显示不正常 [ 58%]

...置见下图代码和附件DEMO中的TestScene.scene文件 export default class GameUI extends Laya.Scene { constructor() { super(); //设置单例的引用方式,方便其他类引用 GameUI.instance = this; //关闭多点触控,否则就无敌了 Laya.MouseManager.multiTouchEnabled = false; //...

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