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

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

211. popup设置了关闭效果后,窗口关闭但遮罩层没有关掉,请问如何处理 [ 58%]

...            }   import { ui } from "./ui/layaMaxUI"; export default class ShopDialog extends ui.ShopDialogUI { constructor() { super(); this.popupEffect = Laya.Handler.create(this, this.showEffect); this.closeEffect = Laya.Handler.create(this, this.hideEffect); this.btnClose.on(Laya.Event.CLI...

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

212. [LayaAir 2.0] 如何用代码为Spirte添加2d物理特性 [ 58%]

...rte添加2d物理特性 官方的2d物理引擎文档都是IDE篇的。   class CollisionBoll extends Laya.Sprite { private _boll1:Laya.Sprite; constructor() { super(); //物理模块 this._boll1 = new Laya.Sprite(); this.addChild(this._boll1); this._boll1.x = 20; this._boll1.loadImage('comp/btn_cl...

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

213. 对象池 · LayaAir3.3 · 引擎文档 · 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_文档 发布时间: 20251010

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

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

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

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

216. 真机下运行帧率不稳定 [ 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

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

218. 自定义对话框设置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

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

220. 关于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