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

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

3701. Sprite中的width,height和size(width,height)感觉没作用啊 [ 49%]

...ya.display.Sprite(); sprite.loadImage("comp/bg.png",0,0,0,0,Handler.create(this,function(texture:laya.resource.Texture){         sprite.graphics.clear();         sprite.graphics.drawTexture(texture,0,0,50,50);         sprite.autoSize = true; })); Laya.stage.addChild(sprite); 或者...

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

3702. 微信小游戏设置网络动态加载无法显示 [ 49%]

...", type:Laya.Loader.IMAGE });  Laya.loader.load(asset,Laya.Handler.create(this,loadingCallback),null);  用Chrome调试可以显示,用Layaair调试报 [warn]Retry to load: res/atlas/bubbles.atlas [warn]Retry to load: res/atlas/game.atlas [warn]Retry to load: game/bgGame.png在微信开发工具...

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

3703. 想用js写一个什么也不继承的类,但每次实例化这个类的时候会报错,是不是这个类写得不对呀 [ 49%]

...呀 var Test = (function(_super){ function Test(){         Test.super(this);         console.log("执行测试构造函数"); } //注册类 Laya.class(Test,"Test",_super); //获取执行域 var _proto = Test.prototype; //_proto. return Test; })(); 2018-06-05 添加评论 免费帖 --> 分享...

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

3704. 屏幕适配-自动横屏 [ 49%]

...tage.screenMode = Stage.SCREEN_HORIZONTAL; Laya.stage.bgColor = "#232628"; this.showText(); } private showText(): void { var text: Text = new Text(); text.text = "Orientation-Landscape"; text.color = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width - text.width >> 1; text....

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

3705. 屏幕适配-自动竖屏 [ 49%]

....stage.screenMode = Stage.SCREEN_VERTICAL; Laya.stage.bgColor = "#232628"; this.showText(); } private showText(): void { var text: Text = new Text(); text.text = "Orientation-Portrait"; text.color = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width - text.width >> 1; text.y...

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

3706. 3d物理 刚体旋转bug 2.17到2.12都有 [ 49%]

...置计算。将以下代码复制到分支处理内: var shapeOffset = this._colliderShape.localOffset; var position = transform.position; var btPosition = PhysicsComponent._btVector30; if (shapeOffset.x !== 0 || shapeOffset.y !== 0 || shapeOffset.z !== 0) { var physicPosition = PhysicsComponent._...

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

3707. layaBox2.2中这个错误怎解决或者怎么忽略不报这个错误 [ 49%]

...新导出导致的。 1568167817用户 • 2019-09-12 11:44 我找到了, this.loadScene("Login/LoginUI");注释这个就没有报错了, 我不知道为什么?

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

3708. [LayaAir3]通过对象池创建的物体,发生碰撞后,再通过对象池复用就会出现pos函数找不到的情况 [ 49%]

...你想要的Laya.Box;所以回收时应为 Laya.Pool.recover("Bullet", this.owner); 2024-08-13 1 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 炳志要爆发 相关问题 两个对象new了一个相同的对象,调用第一个的一...

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

3709. import自己写的类,new出来后为什么一片漆黑 [ 49%]

... npc { export class BaseNPC extends Laya.Sprite { constructor() { super(); this.graphics.drawCircle(0, 0, 10, "#ff0000"); } } }   然后在我的主文件中import,并new出来。代码如下:import BaseNPC = npc.BaseNPC; var npcc:BaseNPC = new BaseNPC(); 只要我new它,都没addChild到舞...

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

3710. 启动ide后有个关于tsc compiler和vs code's language service的提示 [ 49%]

...ompiler (2.1.5) and VS Code's language service (1.8.10) has been detected. This might result in inconsistent compile errors. 我的全局typescript是2.1.5的,我必须要降级吗? 2017-01-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相...

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