大约有 422 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0050 秒)
...ad(skins, Handler.create(this, this.onLoadComplete)); } onLoadComplete() { for (let i = 0, len = skins.length; i ; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMod...
来源: Laya2.0_示例 发布时间: 20251130
...,onLoop); } function onLoop() { // 遍历所有飞机,更改飞机状态 for(var i = Laya.stage.numChildren - 1; i > 0; i--) { // 接收舞台子对象 var role = Laya.stage.getChildAt(i); // 判断是否有飞机,并且是否有速度值 if(role && role.speed){ // 根据飞机速度...
来源: Laya_社区 发布时间: 20170525
....getPixels(0,0,400,400) console.log(x) for (let i of x) { if (i > 0) { console.log(i) } } console.log(' ----- 到这里为止 只有上面的 有 ...
来源: Laya_社区 发布时间: 20171201
...nMode = Laya.Stage.SCREEN_HORIZONTAL; Laya.stage.bgColor = "#FFFFFF"; this.form = new Laya.Sprite(); this.form.size(250,120); this.form.pos((Laya.stage.width - this.form.width) / 2, (Laya.stage.height - this.form.height) / 2); Laya.stage.addChild(this.form); this.rowHeight = 30; this.rowSpacing = 10...
来源: Laya_示例 发布时间: 20251130
...ew Sprite(); Laya.stage.addChild(textBox); // 随机摆放文本 let text; for (let i = 0; i < 1000; i++) { text = new Text(); textBox.addChild(text); text.fontSize = 20; text.text = (Math.random() * 100).toFixed(0); text.rotation = Math.random() * 360; text.color = "#ccc"; text.x = Math.random() * ...
来源: Laya2.0_示例 发布时间: 20251130
Morn下List组件如何给每一条列表添加Click事件,是需要for吗? 2015-12-24 1 条评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 cuixueying 赞同来自: 在原生flash下,如果要给List组件的...
来源: Laya_社区 发布时间: 20151224
...ameLoop(1, this, animate); } function initMaggots() { var maggotContainer; for (var i = 0; i wb.x + wb.width) x -= wb.width; if (y wb.y + wb.height) y -= wb.height; maggot.pos(x, y); } tick += 0.1; } })();module laya { import Sprite = Laya.Sprite; import Browser = Laya.Browser; import Handler = Laya...
来源: Laya_示例 发布时间: 20251130
... this.enemyUnit.push(new Laya.Animation()); this.loadUnit(); } loadUnit(){ for(let i of this.playerUnit ){ i.loadAtlas("./character/m1.atlas",Laya.Handler.create(this,this.playerUnitLoaded)); } for(let i of this.enemyUnit){ i.loadAtlas("./character/m1.atlas",Laya.Handler.create(t...
来源: Laya_社区 发布时间: 20200910
...t; var pixelsInfo = texture.getPixels(); var aStarArr = []; var index = 0; for (var w = 0; w < textureWidth; w++) { var colaStarArr = aStarArr[w] = []; for (var h = 0; h < textureHeight; h++) { var r = pixelsInfo[index++]; var g = pixelsInfo[index++]; var b = pixelsInfo[index++]; var a = pixel...
来源: Laya3.0_文档 发布时间: 20230303
...,简化了下坐标计算。var card = ; var button = ; // 设定卡片 for (var i = 0; i < 8; i++) { for (var j = 0; j < 3; j++) { var index = 8 * j + i card[index] = new Laya.Sprite(); Laya.stage.addChild(card[index]); card[index].name = index; card[index].graphics.drawRect(0, 0, 80, 120, ...
来源: Laya_社区 发布时间: 20160623