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

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

1. 游戏加载进度失效 [ 100%]

...些什么设置? 详细代码如下,请大神指点。 constructor() { Laya.init(960, 540, Laya.WebGL); Laya.stage.screenMode = "horizontal"; Laya.stage.scaleMode = Laya.Stage.SCALE_EXACTFIT; Laya.stage.alignH = "center"; Laya.stage.alignV = "middle"; Laya.stage.bgColor = "#ffffff"; this.gameLoa...

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

2. 飞机大战地图滚动报错,麻烦看下? [ 99%]

飞机大战地图滚动报错,麻烦看下? Laya.init(650, 316, Laya.WebGL); var bg1 = null; var bg2 = null; var box = null; function bg_rolling() {     box = new laya.display.Sprite();     Laya.stage.addChild(box);     bg1 = new laya.display.Sprite();     bg1.loadImage("res/bg1.png");...

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

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

...戏图片加载不出来 var resArray = [{ url: "ui/BG/Start.png", type: Laya.Loader.IMAGE }, { url: "ui/BG/load.png", type: Laya.Loader.IMAGE }, { url: "res/atlas/comp.atlas", type: Laya.Loader.ATLAS }, { url: "res/atlas/ui.atlas", type: Laya.Loader.ATLAS }, ]; Laya.loader.load(resArray, Laya.Handl...

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

4. 封装类的时候 怎么在类中表示自身? [ 93%]

封装类的时候 怎么在类中表示自身? class BackGround extends Laya.Sprite{ constructor() { super(); new init(); function init() { var bg1 = new Laya.Sprite(); var bg2 = new Laya.Sprite(); //背景图 // box.loadImage("../bin/background.png"); // Laya.stage.addChild(box); bg1.loadImage("....

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

5. 分享一个自己做的游戏公告功能,跑马灯效果 [ 93%]

...分享一个自己做的游戏公告功能,跑马灯效果 import View = Laya.View import Image = Laya.Image import HTMLDivElement = Laya.HTMLDivElement import Sprite = Laya.Sprite import Box = Laya.Box /** 公告栏 */ export default class Notice extends View { /** 滚动区域 */ hornBox: Box /*...

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

6. List滚动条问题 [ 92%]

...anceSellDlg\\xiaodou.png",hot:1,orderCount:9} // 背景 var bg_image = new Laya.Image(); bg_image.skin = "res/popupwnd/market_item_bg.png"; bg_image.pos(0, 0); bg_image.size(312, 462); this.addChild(bg_image); // 金豆数 this._goldLabel = new Laya.Label(); this._goldLabel.color = "#FFBA00"; var fo...

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

7. 图片居中的问题 [ 92%]

...6-11-18 0 0 分享 微博 QZONE 微信 shaouXie 赞同来自: var bg = new Laya.Sprite(); bg.loadImage("res/bg-480x720.jpg"); Laya.stage.on(Laya.Event.RESIZE,this,onResize);   function onResize() {     var scale,scaleX,scaleY;     scaleX = Browser.clientWidth/480;     scaleY = Browser.clientH...

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

8. 续飞机大战 [ 86%]

...function(){ function Game(){ // 初始化引擎,设置了游戏的宽高 Laya.init(480,852); Laya.stage.bgColor="#EEFFCC"; var bg = new BackGround(); Laya.stage.addChild(bg); } return Game; }()); var gameInstance = new Game();BackGround.jsvar BackGround = (function (_super) { function BackGround()...

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

9. scrollRect 改变后子对象的鼠标事件失效 [ 85%]

scrollRect 改变后子对象的鼠标事件失效 bg=new Laya.Sprite(); Laya.stage.addChild(bg); bg.size(800,600); bg.loadImage("aa_1.Png",0,0,800,600); poly=new Laya.Sprite(); bg.addChild(poly); poly.size(36,36); poly.pivot(18,18); poly.loadImage("SafeExitL.png",0,0,36,36); poly.pos(400,300); pol...

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

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

...了类New的时候报错未定义 var Game=(function(){ (function Game(){ Laya.init(400,852); this.bg = new BackGround(); //把背景添加到舞台上显示出来 Laya.stage.addChild(this.bg);  })();     })();   //循环滚动的游戏背景 var BackGround = (function(_super){ function BackGro...

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