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

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

771. dialog的lock属性没出现 [ 69%]

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

772. 关于资源加载的问题 [ 69%]

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

773. 鼠标交互-双指旋转(多点触控) [ 69%]

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

774. 两个物体 ,如果在update里修改其中一个物体的rotationEuler,会触发另一个物体的onTriggerEnter回调 [ 69%]

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

775. 我想移动容器来实现前进的动画,但是移动不了。这里的y有问题 但是又不知道改成什么 [ 69%]

...载背景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

776. socket.sent [ 69%]

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

777. Laya2.0绘制扇形遮罩,显示到部分角度时显示会有部分缺失(demo已上传) [ 69%]

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

778. 重写X Y在android studio里运行会变成00 [ 69%]

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

779. Panel使用文档(ActionScript-IDE篇(AS3)-IDE组件属性详解) [ 69%]

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

780. 绘制圆形与扇形(ActionScript-LayaAir基础篇(AS3)-矢量图) [ 69%]

...         sp = new Sprite();             Laya.stage.addChild(sp);             //画圆             sp.graphics.drawCircle(80,80,50,"#ff0000");                        }     } } ``` 代码运行效果如下图所示: ​ ![blob...

来源: Laya2.0_文档 发布时间: 20210715