大约有 1,493 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0121 秒)
Laya_社区(918) Laya2.0_文档(193) Laya_示例(125) Laya2.0_示例(101) Laya3.0_api(79) Laya3.0_文档(73) laya_api(2) Laya2.0_api(2)
...发不了? 这是我的代码: var Block = new Sprite(); Laya.stage.addChild(Block); Block.graphics.drawRect(300, 200, 50, 50, "#000"); Block.pos(300, 100); Block.on(Event.MOUSE_DOWN, this, function() { console.log(1); }); 点击无效,但我给用 Laya.stage.on(Event.MOUSE_DOWN); ...
来源: Laya_社区 发布时间: 20170324
...dler(this,onChange); //当progressBar的value值改变时触发 Laya.stage.addChild(progressBar); onchange(); } function onChange(value) { trace("进度: "+Math.floor(value*100)+"%"); } function onProgress(pro) { trace("加载了总文件的:"+pro+"%") progressBar.value=pro; if(progressBar.value==1)...
来源: Laya_社区 发布时间: 20170701
...reate(this, function (scene: Scene3D): void { //添加到场景 Laya.stage.addChild(scene); var camera: Camera = scene.getChildByName("Main Camera") as Camera; camera.addComponent(CameraMoveScript); camera.transform.localPosition = new Vector3(8.937199060699333, 61.364798067809126, -66.7783608647265...
来源: Laya2.0_文档 发布时间: 20210714
...播放 // 设置画布上的对齐参照物 reference = new Sprite(); this.addChild(reference); reference.pos(0, 0); reference.size(GoldConsts.contextWidth, GoldConsts.contextHeight); reference.graphics.drawRect(0, 0, reference.width, reference.height, "#cccccc"); // 每次舞台尺寸变更时,...
来源: Laya_社区 发布时间: 20180313
...以直接跳过排版。 ```typescript this.text.text="text"; Laya.stage.addChild(this.text); //后面只是更新文字内容,使用changeText能提高性能 this.text.changeText("text changed."); ``` Text.changeText会直接修改绘图指令中该文本绘制的最后一条指令,这种前面...
来源: Laya2.0_文档 发布时间: 20210714
...ap.getLayerByName(layerName); if (itemlevel == null) { return; } itemlevel.addChild(); 2019-06-12 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 0 个回复 为什么被折叠? 0 个回复被折叠 要回复问题请先登录...
来源: Laya_社区 发布时间: 20190612
...= new MyDialog("注册功能暂未开通!"); dlg.popup(true); Laya.stage.addChild(dlg); }); 2018-03-05 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 qian 赞同来自: 不能添加到stage上 2018-03-05 0 0 ...
来源: Laya_社区 发布时间: 20180305
... 1 个回复 李伟 赞同来自: var Wall_TL = new Sprite(); Laya.stage.addChild(Wall_TL); Wall_TL.graphics.drawRect(0, 0, 400, 32, "#ffff00"); Wall_TL.pivot(200, 16); var Collision_Wall_TL:any = Matter.Bodies.rectangle(200, 400, 400, 32, { layaSprite:Wall_TL,isStatic: true }) Matter.World.add...
来源: Laya_社区 发布时间: 20180529
...('scene/Game.ls', Laya.Handler.create(null, function (res:any){ Laya.stage.addChild(res); })); //用Laya.loader的方式加载,加载后根节点是Scene2D Laya.loader.load('scene/Game.ls', Laya.Handler.create(this, this.onLoaded), Laya.Handler.create(this, this.onLoading)).then( (res)=>{ let s...
来源: Laya3.0_文档 发布时间: 20251010
...(0.5, 0.5); mArmature.on(Event.STOPPED, this, completeHandler); Laya.stage.addChild(mArmature); play(); }); } function completeHandler() { mArmature.stop(); mArmature.removeSelf(); mArmature.removeChildren(); mArmature.destroy(true); Laya.Pool...
来源: Laya_社区 发布时间: 20181120