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

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

1. 其他引擎的Demo-Example_05 [ 100%]

...tion setup() { Laya.stage.on(Event.RESIZE, this, onResize); makeObject(0); for (var i = 0; i objs) { current = 0; } makeObject(current); } function makeObject(t) { var xd; var i; switch (t) { case 0: for (i = 0; i tpoint1[i]) { tpoint1[i] = tpoint1[i] + 1; } if (points1[i] tpoint2[i]) { tpoint2[i] =...

来源: Laya_示例 发布时间: 20241118

2. 性能测试-骨骼 [ 99%]

...Factory.parseData(tTexture, arraybuffer, 10); } function parseComplete() { for (var i = 0; i = tAnimNum) { mActionIndex = 0; } for (var i = 0, n = mAnimationArray.length; i = []; private mFactory: Templet; constructor() { this.mSpacingX = Browser.width / this.colCount; this.mSpacingY = Browser.heigh...

来源: Laya_示例 发布时间: 20241118

3. 输入设备-贪吃蛇(重力感应) [ 98%]

... 游戏开始时有一个食物 produceFood(); })() function initSnake() { for (var i = 0; i 0) { var prevSeg = segments[segments.length - 1]; seg.rotation = prevSeg.rotation; var point = seg.getPinPosition(); seg.x = prevSeg.x - point.x; seg.y = prevSeg.y - point.y; } segments.push(seg); } function...

来源: Laya_示例 发布时间: 20241118

4. 缓动-逐字缓动 [ 97%]

...w >> 1; var endY = Laya.stage.height / 2 - 50; var demoString = "LayaBox"; for (var i = 0, len = demoString.length; i > 1; var endY: number = Laya.stage.height / 2 - 50; var demoString: string = "LayaBox"; for (var i: number = 0, len: number = demoString.length; i > 1; var endY:int = Laya.stage.heig...

来源: Laya_示例 发布时间: 20241118

5. 网络和格式-Socket [ 95%]

...onstrate "); // 使用output.writeByte发送 var message = "demonstrate "; for (var i = 0; i "); // 使用output.writeByte发送 var message: string = "demonstrate "; for (var i: number = 0; i "); // 使用output.writeByte发送 var message:String = "demonstrate "; for (var i:int = 0; i < message.le...

来源: Laya_示例 发布时间: 20241118

6. UI-CheckBox [ 95%]

...s, onCheckBoxSkinLoaded)); })(); function onCheckBoxSkinLoaded() { var cb; for (var i = 0; i ; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOW...

来源: Laya_示例 发布时间: 20241118

7. 网络和格式-XML [ 95%]

...en(xml) { var rootNode = xml.firstChild ; var nodes = rootNode.childNodes; for (var i = 0; i item aitem bsomethis..."; var xmlValue:string = "item aitem bsomethings..."; this.proessXML(xmlValueContainsError); console.log("\n"); this.proessXML(xmlValue); } // 使用xml private proessXML(source:string...

来源: Laya_示例 发布时间: 20241118

8. 性能测试-卡通人物 [ 94%]

...l, Loader.ATLAS); })(); function createCharacters() { characterGroup = []; for(var i = 0; i = 0; --i) { animateCharactor(characterGroup[i]); } } function animateCharactor(charactor) { charactor.x += moveSpeed; charactor.rotation += rotateSpeed; if (charactor.x > Laya.stage.width + extraSpace) { char...

来源: Laya_示例 发布时间: 20241118

9. 其他引擎的Demo-Example_04 [ 94%]

... { Laya.init(w, h, WebGL); createText(); start(); })(); function start() { for (var i = 0; i w) { stars[i].x = stars[i].x - w; } else if (stars[i].x h) { stars[i].y = stars[i].y - h; } else if (stars[i].y = []; private w:number = Browser.width; private h:number = Browser.height; private slideX:numbe...

来源: Laya_示例 发布时间: 20241118

10. Sprite-容器 [ 93%]

...tn = new Sprite(); Laya.stage.addChild(apesCtn); // 添加4张猩猩图片 for (var i = 0; i < 4; i++) { var ape = new Sprite(); ape.loadImage("../../res/apes/monkey" + i + ".png"); ape.pivot(55, 72); // 以圆周排列猩猩 ape.pos( Math.cos(radianUnit * i) * layoutRadius, Math.sin(radianUnit * i)...

来源: Laya_示例 发布时间: 20241118