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

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

1. 屏幕适配-缩放-Show All [ 100%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } private createCantralRect(): void { this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } private updateRectPo...

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

2. 加载-加载序列 [ 94%]

...xLoader = 1; Laya.loader.load("../../res/apes/monkey2.png", Handler.create(this, onAssetLoaded), null, null, 0, false); Laya.loader.load("../../res/apes/monkey1.png", Handler.create(this, onAssetLoaded), null, null, 1, false); Laya.loader.load("../../res/apes/monkey0.png", Handler.create(this, onAss...

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

3. 屏幕适配-缩放-Show All [ 91%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } createCantralRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } update...

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

4. layaUI.max.all.js 这个文件怎么生成的? [ 90%]

...的? STATICATTR$(TestPageUI,         ['uiView',function(){return this.uiView={"type":"View","child":[{"props":{"x":0,"y":0,"skin":"comp/bg.png","sizeGrid":"30,4,4,4","width":600,"height":400},"type":"Image"},{"props":{"x":41,"y":56,"skin":"comp/button.png","label":"点我赋值","width":150,...

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

5. 加载-加载序列 [ 86%]

...der.maxLoader = 1; Laya.loader.load("res/apes/monkey2.png", Handler.create(this, this.onAssetLoaded), null, null, 0, false); Laya.loader.load("res/apes/monkey1.png", Handler.create(this, this.onAssetLoaded), null, null, 1, false); Laya.loader.load("res/apes/monkey0.png", Handler.create(this, this.on...

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

6. 物理射线检测(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 78%]

....HitResult = new Laya.HitResult(); var hitResults = []; //是否穿透 if (this.castAll) { //进行射线检测,检测所有碰撞的物体 this.scene.physicsSimulation.raycastAllFromTo(this.from, this.to, this.hitResults); //遍历射线检测的结果 for (i = 0, n = this.hitResults.length; i (图...

来源: Laya2.0_文档 发布时间: 20210715

7. 在父sprite中添加子sprite ,移动父Sprite 子sprite为什么不动? [ 77%]

...ngel.level; // 构造 function IsLand() { // 初始化 IsLand.__super.call(this); // 名字 this.name = "gemini"; this.init(); } // 注册类 IsLand Laya.class(IsLand,"IsLand",laya.display.Sprite); // 原型 var _proto = IsLand.prototype; // 初始化 _proto.init = function(){ // 球体 this.ball = ...

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

8. 通过laya设计模式制作的,要怎么给按钮绑定事件呢? [ 76%]

...的链接 提交 2 个回复 Laya_Aaron 赞同来自: on(Event.MOUSE_DOWN,this,onClick); 试一下吧  onclick 函数里再打印log 2017-12-13 0 10 分享 微博 QZONE 微信 Laya_Aaron 赞同来自: 这个进度条 var 为pro 另外一张图的类继承了之前页面发布生成的类,直接...

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

9. socket大型项目回调 [ 75%]

... = console.log; console.warn = console.log; console.error = console.log; } this._message = new Message(); this._package = new Package(); this.socket = null; this.callbacks = {}; this.handlers = {}; // Map from request id to route this.routeMap = {}; this.heartbeatInterval = 0; this.heartbeatTimeout ...

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

10. 用laya自带的ui编辑器 编辑了一个ui界面,怎么加载啊? 怎么写代码让这个ui界面, 在程序运行时,显示出来啊? [ 75%]

...?   STATICATTR$(TestPageUI,         ['uiView',function(){return this.uiView={"type":"View","child":[{"props":{"x":0,"y":0,"skin":"comp/bg.png","sizeGrid":"30,4,4,4","width":600,"height":400},"type":"Image"},{"props":{"x":41,"y":56,"skin":"comp/button.png","label":"点我赋值","width":150,...

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