大约有 1,122 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0058 秒)
Laya_社区(974) Laya3.0_api(66) Laya_示例(33) Laya2.0_示例(32) Laya2.0_文档(6) Laya2.0_api(4) laya_api(4) Laya3.0_文档(3)
...ite; let btn = new Sprite(); Laya.stage.addChild(btn); btn.size(w, h); btn.graphics.drawRect(0, 0, w, h, "#FF7F50"); btn.graphics.fillText(labelText, w / 2, 8, "24px SimHei", "#FFFFFF", "center"); return btn; } // 播放音效 onPlaySound() { console.log("播放音效"); Laya.SoundManager.playSound(...
来源: Laya2.0_示例 发布时间: 20240930
... w = 110; var h = 40; var button = new Sprite(); button.size(w, h); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.graphics.fillText(label, w / 2, 8, "25px SimHei", "#FFFFFF", "center"); Laya.stage.addChild(button); return button; } function onPlayMusic(e) { console.log("播放音乐"); Sou...
来源: Laya_示例 发布时间: 20240930
...问题 private label_image:Laya.Sprite=new Laya.Sprite(); this.label_image.graphics.fillText(xxx, xxx,"15px Arial","#000000","center"); this.label_image.pos(0,0) Laya.stage.addChild(this.label_image); 这样写为什么CurMem会增加接近16M,这不就是在精灵上绘制嘛,简单来说就...
来源: Laya_社区 发布时间: 20180425
...tralRect(); })(); function createCantralRect() { rect = new Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(rect); updateRectPos(); } function updateRectPos() { rect.x = Laya.stage.width / 2; rect.y = Laya.stage.height / 2; } })();module laya { import Sprite = Lay...
来源: Laya_示例 发布时间: 20240930
...tralRect(); })(); function createCantralRect() { rect = new Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(rect); updateRectPos(); } function updateRectPos() { rect.x = Laya.stage.width / 2; rect.y = Laya.stage.height / 2; } })();module laya { import Sprite = Lay...
来源: Laya_示例 发布时间: 20240930
...ader.getRes("res/floor.png"); this.bg = new laya.display.Sprite(); this.bg.graphics.clear(); //将当前的坐标向上移动32 方便后面处理人物的位置 this.bg.y = -32; this.addChild(this.bg); } this.bg.graphics.drawTexture(this.bgTexture, 0, 0, 960, 96); //创建一个帧循环处理函...
来源: Laya_社区 发布时间: 20160728
...tralRect(); })(); function createCantralRect() { rect = new Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(rect); updateRectPos(); } function updateRectPos() { rect.x = Laya.stage.width / 2; rect.y = Laya.stage.height / 2; } })();module laya { import Sprite = Lay...
来源: Laya_示例 发布时间: 20240930
...tralRect(); })(); function createCantralRect() { rect = new Sprite(); rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(rect); updateRectPos(); } function updateRectPos() { rect.x = Laya.stage.width / 2; rect.y = Laya.stage.height / 2; } })();module laya { import Sprite = Lay...
来源: Laya_示例 发布时间: 20240930
...lSprite); mLabelSprite.x = mStartX; mLabelSprite.y = mStartY; mLabelSprite.graphics.clear(); mLabelSprite.graphics.fillText(tEventData.name, 0, 0, "20px Arial", "#ff0000", "center"); Tween.to(mLabelSprite, { y:mStartY - 200 }, 1000, null,Handler.create(this,playEnd)) } function playEnd() { mLabelSpr...
来源: Laya_示例 发布时间: 20240930
... = 0; // 用下面这组数据是可显示的 // sp.y = 1; // sp.x = 1; sp.graphics.drawRect(0, 0, 200, 200, "#00FF00"); Laya.stage.addChild(panel); 这个是我的代码,sp是一个精灵,放在panel的0,0点后确实是不显示,往右下移一个像素后就能显示出来了 2017-02-20 0 0 ...
来源: Laya_社区 发布时间: 20170217