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

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

2321. 微信小游戏编译出错 [ 61%]

...码的吗 Yangcy • 2018-06-11 10:39 @Laya_Aaron:ascii编码? private var assetArr:Array=[{url: "res/atlas/comp.atlas"}, {url: "res/atlas/wxlocal.atlas"}, {url: "res/atlas/middleMoive.atlas"}, {url: "res/atlas/resoutel.atlas"}, {url: "res/atlas/texiaol...

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

2322. 屏幕方向:自动横屏与自动竖屏的设置详解(TypeScript-LayaAir基础篇(TS)-屏幕适配) [ 61%]

...示例代码如下: ```javascript function showScreen(): void { //图片 var img:Laya.Image = new Laya.Image(); img.centerX = 0; img.centerY = -70; img.skin = "res/monkey2.png"; Laya.stage.addChild(img); //文字 var text:Laya.Label = new Laya.Label(); text.text = "游戏的水平方向"; text.col...

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

2323. laya.ani.bone.Skeleton [ 61%]

...果可以当作图片源,再次绘制到其他Sprite里面,示例: var htmlCanvas:HTMLCanvas = sprite.drawToCanvas(100, 100, 0, 0);//把精灵绘制到canvas上面 var texture:Texture = new Texture(htmlCanvas);//使用htmlCanvas创建Texture var sp:Sprite = new Sprite().pos(0, 200);//创建精...

来源: laya_api 发布时间: 20170929

2324. 微信飞机大战报错 [ 61%]

...    at readableAddChunk (_stream_readable.js:[...]   GameInfo.js代码: var GameInfo = (function(_super){     function GameInfo(){         GameInfo.super(this);         this.pauseBtn.on(Laya.Event.CLICK, this, this.onPauseBtnClick);         this.reset();     }     Laya.class(Gam...

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

2325. laya绘制图形进行缩放的时候有问题 [ 61%]

...amp; this.scaleX >= 0.5) { this.scaleX -= 0.1; this.scaleY -= 0.1; for (var i = 0; i < this.nodes.length; i++) { this.nodes[i].scaleX += 0.1; this.nodes[i].scaleY += 0.1; } } else if (e.delta < 0 && this.scaleX <= 1.5) { this.scaleX += 0.1; this.scaleY += 0.1; for (var i = 0; i &...

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

2326. Cannot read property 'rayCast' of undefined [ 61%]

...useY; //产生射线 this.camera.viewportPointToRay(this.point, this.ray); var out = new Laya.CannonHitResult(); this.scene.cannonPhysicsSimulation.rayCast(this.ray,out); if(out.succeeded) { console.log(111); } } } 附件 : --> web.rar 2020-09-03 添加评论 免费帖 --> 分享 微博 QZONE 微信...

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

2327. 如何使用vscode编译laya项目 [ 61%]

... //获取Node插件和工作路径 let ideModuleDir; let workSpaceDir; for(var argv of process.argv) { if(argv.indexOf("--cwd=") == 0) { ideModuleDir = argv.split("=")[1] + "\\node_modules\\"; } else if(argv.indexOf("--gulpfile=") == 0) { workSpaceDir = argv.split("=")[1].replace("/.laya/compile.js"...

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

2328. 分享-js资源进度加载 [ 61%]

分享-js资源进度加载 var ui_Socket: Socket; // 程序入口 class GameMain { //进度UI Progress: Progress; Socket: Socket; arr = [ { url: "images/1.jpg", type: Laya.Loader.IMAGE } , { url: "images/2.jpg", type: Laya.Loader.IMAGE } , { url: "images/3.jpg", type: Laya.Loader.IMAGE } , { url: ...

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

2329. 官方提供的关系链代码执行报错,是不是wx的sharedCanvas不是Laya的canvas导致的问题 [ 61%]

...的代码 微信主域代码: Laya.timer.once(400,this,function():void{ var rankTexture:Texture = new Texture(Browser.window.sharedCanvas); rankTexture.bitmap.alwaysChange = true;//小游戏使用,非常费,每帧刷新 rankSprite2.graphics.drawTexture(rankTexture,5,78,rankTexture.width,rankTe...

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

2330. 分享:关于自定义场景继承的实现 [ 60%]

...t {base} from "../script/base/BaseScene"; import BaseScene=base.BaseScene; var REG: Function = Laya.ClassUtils.regClass; export module ui { export class CustomSceneUI extends BaseScene { public txt_hello:Laya.Label; constructor(){ super()} createChildren():void { super.createChildren(); this.loadSce...

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