大约有 2,310 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0178 秒)
Laya_社区(1513) Laya2.0_文档(259) Laya_示例(138) Laya2.0_示例(101) Laya3.0_api(80) Laya3.0_文档(75) Laya2.0_api(74) laya_api(70)
... dialog:Dialog = new Dialog(); var bg:Image = new Image(assets[0]); dialog.addChild(bg); var button:Button = new Button(assets[1]); button.name = Dialog.CLOSE; button.pos(DIALOG_WIDTH - CLOSE_BTN_WIDTH - CLOSE_BTN_PADDING, CLOSE_BTN_PADDING); dialog.addChild(button); dialog.dragArea = "0,0," + DIALO...
来源: Laya_社区 发布时间: 20170706
..., Handler.create(null, ()=>{ this.uiView = new SharkItOff(); Laya.stage.addChild(this.uiView); })); 先加载图集,图集加载完再new一个界面。但是界面里的图片都不显示 thekingreturn • 2018-03-27 20:42 [warn]Retry to load: games/game_13/image/shake_07.png [warn]Retry to lo...
来源: Laya_社区 发布时间: 20180327
...2, h / 2); sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); Laya.stage.addChild(sp); sp.on(Event.MOUSE_DOWN, this, onMouseDown); } function onMouseDown(e) { var touches = e.touches; if (touches && touches.length == 2) { preRadian = Math.atan2( touches[0].stageY - touches[1].stageY, touches[0].st...
来源: Laya_示例 发布时间: 20251219
...wScene = <Laya.Scene3D>Util3d.getRes(this.sMapRes, false) Laya.stage.addChild(pNewScene); Util3d.getChildByPath(pNewScene, "Main Camera").active = false; let pBull = <Laya.Sprite3D>Util3d.getRes(this.sBullRes) let pEnemy = <Laya.Sprite3D>Util3d.getRes(this.sEnemyRes) pNewScene.addC...
来源: Laya_社区 发布时间: 20200720
...载背景1 var bg1 = new Sprite(); bg1.loadImage("war/bc.png"); Laya.stage.addChild(bg1); //加载背景2 var bg2 = new Sprite(); bg2.loadImage("war/bc.png"); //更改背景2 放在背景1的上面 bg2.pos(0,852); Laya.stage.addChild(this); Laya.timer.frameLoop(1,this,myLoop); } function myLoo...
来源: Laya_社区 发布时间: 20191017
... console.log("错误"+e); console.log(e); } onLoded():void{ // Laya.stage.addChild(obj); Laya.stage.addChild(new Btn1 ());//加入舞台 } } new Game(); class Btn1 extends ui.v1UI{ public socket: Laya.Socket; public byte: Laya.Byte; constructor(){ super(); this.btn1.on(Laya.Event.CLICK,this...
来源: Laya_社区 发布时间: 20180210
...node: Laya.Image = new Laya.Image('c1.png'); node.pos(300, 300) Laya.stage.addChild(node); var sp: Laya.Sprite = new Laya.Sprite(); node.mask = sp; sp.pos(50, 50); var sp2: Laya.Sprite = new Laya.Sprite(); sp2.pos(300, 500); Laya.stage.addChild(sp2); let r: number = 0 Laya.timer.loop(100, this, () =...
来源: Laya_社区 发布时间: 20190701
...prite的对象 比如 XSprite extends Sprite 3 new出这个对象 将对象addChild到TestUI里 this.addChild(xSprite); 4 然后设置xSprite.x = 100; xSprite.y = 200; 5 然后再XSprite这个类里将XY复写比如 public set x(val: number) { this._x = val; } public get x(): number { return this._x...
来源: Laya_社区 发布时间: 20180226
...ScrollBarSkin = "comp/vscroll.png"; //将panel添加到stage上 Laya.stage.addChild(panel); //实例化Image组件 var img:Image = new Image(); //给image添加皮肤 img.skin = "comp/image.png"; //将image添加到panel组件中 panel.addChild(img); } } } ```
来源: Laya2.0_文档 发布时间: 20210715
... sp = new Sprite(); Laya.stage.addChild(sp); //画圆 sp.graphics.drawCircle(80,80,50,"#ff0000"); } } } ``` 代码运行效果如下图所示: ![blob...
来源: Laya2.0_文档 发布时间: 20210715