大约有 735 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0048 秒)
Laya_社区(530) Laya2.0_文档(76) Laya_示例(48) Laya2.0_示例(39) Laya3.0_文档(21) Laya3.0_api(19) laya_api(1) Laya2.0_api(1)
...lor = "#ffffff"; //加载图集成功后,执行onLoaded回调方法 Laya.loader.load("res/atlas/ui/boos.atlas", Laya.Handler.create(this, onLoaded)); function onLoaded() { // //创建一个Animation实例 // var tl = new Laya.Animation(); // //加载动画文件 // tl.loadAnimation("test.ani"); //...
来源: Laya_社区 发布时间: 20190708
...载资源,此处添加button和panel垂直滚动条的皮肤使用 Laya.loader.load(['button-4.png','ui/vscroll.png','ui/vscroll$bar.png','ui/vscroll$down.png','ui/vscroll$up.png'],Handler.create(this,start)); } private function start():void { var panel:Panel=new Panel();//添加panel,切忌要...
来源: Laya_社区 发布时间: 20170601
....loadAni('res/spine/knight/effect1.sk'); SK动画已经预加载了:Laya.loader.load(['res/spine/knight/effect1.png', 'res/spine/knight/effect1.sk'], Handler.create(this, init));
来源: Laya_社区 发布时间: 20171116
...代码: import Label = Laya.Label; import Handler = Laya.Handler; import Loader = Laya.Loader; class GameBootstrap{ public constructor(){ this.init(); } private init():void{ //初始化微信小游戏 Laya.MiniAdpter.ini...
来源: Laya_社区 发布时间: 20180529
...正确获取宽高。 1. **直接调用size设置:** ```typescript Laya.loader.load("res/apes/monkey2.png",Laya.Handler.create(this,function() { var texture=Laya.loader.getRes("res/apes/monkey2.png"); var sp=new Laya.Sprite(); sp.graphics.drawTexture(texture,0,0); sp.size(texture.width,texture.hei...
来源: Laya2.0_文档 发布时间: 20210714
...ecovery • 2021-11-15 18:42 改成这样试试看 onEnable(): void { Laya.loader.load("comp/image.png", Laya.Handler.create(this, this.onResReady)); } private onResReady() { let panel = new Laya.Panel(); Laya.stage.addChild(panel); panel.graphics.drawRect(0, 0, 300, 300, "#ffcccc&quo...
来源: Laya_社区 发布时间: 20211108
...ge.bgColor = "#232628"; setup(); })(); function setup() { Laya.loader.load("../../res/ui/dialog (3).png", Laya.Handler.create(this, function(){ var dialog = new Image("../../res/ui/dialog (3).png"); dialog.scaleX = 2; dialog.scaleY = 2; var panel = new Panel(); ...
来源: Laya_社区 发布时间: 20180201
... import Label = laya.ui.Label; import Handler = laya.utils.Handler; import Loader = laya.net.Loader; import Stage = laya.display.Stage; class TestUI extends ui.test.testwhUI { constructor() { super(); this.mypan.vScrollBarSkin = ""; Laya.stage.on(Laya.Event.RESIZE, this, this.fitDOMElements); this.m...
来源: Laya_社区 发布时间: 20170720
...script //初始化引擎 Laya.init(800, 600); //预加载所需资源 Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(this, onLoaded)); function onLoaded() { //实例化Panel组件 var panel = new Laya.Panel(); //给panel添加背景色 panel.graphics.drawRect(0, 0, 100, 100, "#ffcccc")...
来源: Laya2.0_文档 发布时间: 20210715
...n: string = 'images/button.png'; constructor() { Laya.init(200, 300); Laya.loader.load(this.skin, Laya.Handler.create(this, () => { this.btn = this.createBtn(this.skin); this.btn.on(Laya.Event.CLICK, this, this.onClick); })); } /** * 创建btn */ private createBtn(skin: string): Laya.Button { let...
来源: Laya_社区 发布时间: 20170511