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

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

401. Sprite-遮罩-放大镜 [ 86%]

...olor = "#232628"; Laya.loader.load([bgPath, maskPath], Laya.Handler.create(this, this.setup)); } setup() { const Sprite = Laya.Sprite; let bgRes = Laya.loader.getRes(bgPath), maskRes = Laya.loader.getRes(maskPath); let bg = new Sprite(); Laya.stage.addChild(bg); bg.graphics.drawTexture(bgRes); let b...

来源: Laya2.0_示例 发布时间: 20251130

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

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

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

403. SCALE_FIXED_WIDTH适配屏幕的问题 [ 86%]

... _roomId = 0;         constructor(roomId?: number) {             this._roomId = roomId;             Laya.init(750, 1218, Laya.WebGL);             Laya.Browser.document.title = 'GG游戏;             if (Laya.Browser.onPC) {                 //设置舞台缩放模...

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

404. 关于3d项目中component的问题 [ 86%]

...nslate = new Laya.Vector3(0, 0, 0); function CmpScript() { CmpScript.super(this); this.x = 0; } Laya.class(CmpScript, "CmpScript", Laya.Script) CmpScript.prototype._initialize = function (owner) { var _this = this; CmpScript.__super.prototype._initialize.call(this, owner); } CmpScript.prototype._upd...

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

405. 引擎socket类_onMessage bug [ 86%]

...| !msg.data) return;         var data: any = msg.data;         if (this.disableInput && data) {             this.event(Event.MESSAGE, data);             return;         }         if (this._input.length > 0 && this._input.bytesAvailable < 1) {     ...

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

406. 在一个矩形之上画另一个矩形,只显示一个矩形 [ 86%]

...宽 var boxWidth = 440; //串盒子的高 var boxHeight = 500; //串盒子 this.chuanBox = new Laya.Rectangle(Laya.stage.width - boxWidth >> 1, Laya.stage.height - boxHeight - 10, boxWidth, boxHeight); //画出盒子 Laya.stage.graphics.drawRect( this.chuanBox.x, this.chuanBox.y, this.chuanBox...

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

407. 关于缓动函数from的一些问题记录 [ 86%]

...= 400; Laya.Tween.from(letterText,{y:100},3,Laya .Ease.backOut,new Handler(this,this.onEaseComplete),1,null,true); function onEaseComplete(){ console.log("ease complete"); Laya.stage.addChild(letterText); } ``` 以上的代码主要存在三个问题: 1. from()中的duration和delay都是以毫秒...

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

408. 图集动画没有显示 [ 86%]

... 'res/atlas/cloud.json'; Laya.loader.load(AniConfPath, Laya.Handler.create(this, this.createAnimation), null, Laya.loader.ATLAS); function createAnimation() { var ani = new Laya.Animation(); ani.loadAtlas(AniConfPath); ani.interval = 30; ani.index = 1; ani.play(); Laya.stage.addChild(ani); } 2017-09...

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

409. 文本-HTML文本 [ 86%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.setup(); } setup() { this.createParagraph(); // 代码创建 this.showExternalHTML(); // 使用外部定义的html } createParagraph() { const HTMLDivElement = Laya.HTMLDivElement; let p = new HTMLDivElement(); Laya.stag...

来源: Laya2.0_示例 发布时间: 20251130

410. 定时器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 86%]

...。 * @param delay 延迟几帧(单位为帧)。 * @param caller 执行域(this)。 * @param method 定时器回调函数。 * @param args 回调参数。 * @param coverBefore 是否覆盖之前的延迟执行,默认为 true 。 */ frameOnce(delay: number, caller: any, method: Function, args: any[...

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