大约有 401 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0040 秒)
... } 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
...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
...的类。 * @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
... 测试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
...个TextInput组件runtime属性绑定了一个类 绑定了这个类后, class TextInputEx extends Laya.TextInput constructor() { console.log("执行了"); super() ; } // 获取焦点 onFocus() : void { console.log("焦点进入"); // 是否缓存初始的文本提示字符串和文本颜色. if (...
来源: Laya_社区 发布时间: 20181012
...会有突然掉帧的现象,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
...该事件进行监听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
...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
...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
...); 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