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

大约有 243 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0045 秒)

11. 精灵 · LayaAir3.0文档 · LAYABOX [ 87%]

...创建完毕,此方法只执行一次 */ onAwake(): void { this.sprite.loadImage("atlas/comp/image.png"); //纹理:图片路径 this.sprite.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); //位置:屏幕中心 this.sprite.x = Laya.stage.width/2; //x、y分别设置位置 this.s...

来源: Laya3.0_文档 发布时间: 20240528

12. laya.ani.GraphicsAni_API3.0 [ 84%]

...e drawTextures drawTriangles fillBorderText fillText fillTexture getBounds loadImage removeCmd restore rotate save scale strokeText transform translate create recycle Constructors constructor new GraphicsAni(): GraphicsAni Inherited from Graphics.constructor Defined in laya/display/Graphics.ts:54 Re...

来源: Laya3.0_api 发布时间: 20231115

13. 飞机大战js源码中判断语句问题 [ 83%]

...(box); //创建背景1 bg1 = new Sprite(); //加载并显示背景图1 bg1.loadImage("res/background.png"); //把背景1添加到容器 box box.addChild(bg1); //创建背景2 bg2 = new Sprite(); //加载并显示背景图2 bg2.loadImage("res/background.png"); //设置背景图2的坐标 bg2.pos(0, -...

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

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

...mer.frameLoop(1,this,myLoop) })(); function showApe() { // 方法1:使用loadImage加载背景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,85...

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

15. laya.ui.AutoBitmap_API3.0 [ 82%]

...e drawTextures drawTriangles fillBorderText fillText fillTexture getBounds loadImage removeCmd restore rotate save scale setState strokeText transform translate Constructors constructor new AutoBitmap(): AutoBitmap Inherited from Graphics.constructor Defined in laya/display/Graphics.ts:54 Returns Au...

来源: Laya3.0_api 发布时间: 20231115

16. laya.display.Graphics_API3.0 [ 81%]

...e drawTextures drawTriangles fillBorderText fillText fillTexture getBounds loadImage removeCmd restore rotate save scale strokeText transform translate Constructors constructor new Graphics(): Graphics Defined in laya/display/Graphics.ts:54 Returns Graphics Accessors cmds get cmds(): any[] set cmds(...

来源: Laya3.0_api 发布时间: 20231115

17. 飞机大战出现的问题注册了类New的时候报错未定义 [ 81%]

...背景1 this.bg1 = new Laya.Sprite(); //加载并显示背景图 this.bg1.loadImage("war/bc.png"); //把背景1放在容器中 this.addChild(this.bg1); //创建游戏背景2 this.bg2 = new Laya.Sprite(); //加载并显示背景图 this.bg2.loadImage("war/bc.png"); //更改背景2,放在背景1的...

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

18. laya.display.Animation [ 79%]

...画的播放实质就是定时切换Graphics对象。 使用set source、loadImages(...)、loadAtlas(...)、loadAnimation(...)方法可以创建动画模版。使用play(...)可以播放指定动画。 Public Properties Hide Inherited Public Properties Show Inherited Public Properties PropertyDefin...

来源: laya_api 发布时间: 20170929

19. 微信小游戏图片加载不出来 [ 79%]

...背景1 this.bg1 = new Laya.Sprite(); //加载并显示背景图 this.bg1.loadImage("ui/BG/play-bg.png", 0, 0, 720, 5120); //把背景图显示在容器内 this.addChild(this.bg1); //创建背景2 this.bg2 = new Laya.Sprite(); //加载并显示背景图 this.bg2.loadImage("ui/BG/play-bg.png", 0, 0, ...

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

20. laya.display.Graphics [ 78%]

...(比较耗CPU,频繁使用会造成卡顿,尽量少用)。 Graphics  loadImage(url:String, x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0, complete:Function = null):void 加载并显示一个图片。 Graphics  restore():void 返回之前保存过的路径状态和属性。 ...

来源: laya_api 发布时间: 20170929