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

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

1081. ts怎么调用input file弹框选择本地文件 [ 48%]

... 2018-09-14 0 0 分享 微博 QZONE 微信 Laya_Aaron 赞同来自:    private function LoZp():void         {             trace("111");             var fileReader:Object = new Browser.window.FileReader();             trace("上传点击");   Browser.d...

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

1082. Sprite3D添加组件或脚本(TypeScript-3D基础(TS)-LayaAir3D之精灵) [ 48%]

...本的物体) > ```typescript class MonkeyScript extends Laya.Script3D { private rotation:Laya.Vector3 = new Laya.Vector3(0, 0.01, 0); constructor(){ super(); } onAwake() { console.log("onAwake"); } onStart() { console.log("onStart"); } onUpdate() { (this.owner as Laya.Sprite3D).transform.rotate(thi...

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

1083. 2D聚光灯 · LayaAir3.4 · 引擎文档 · LAYABOX [ 48%]

...ort class SpotLight extends Laya.Script { @property({ type: Laya.Sprite }) private spotLight: Laya.Sprite; //组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { this.setSpotLight(); } // 创建聚光灯 setSpotLight(): void { this.spotLight.pos(336, 280); let spotLightCom...

来源: Laya3.0_文档 发布时间: 20251010

1084. 打包后启动游戏后报错 [ 48%]

... Browser.window[callbackName] = callback; //loading Main.tl.startLoad(); } private function callback(data:*):void { //移除 var script:* = Browser.getElementById("serverlist"); Browser.document.head.removeChild(script); DataCollection.jsonp.parseData(data); //loading Main.tl.stopLoad(); } 2018-02-0...

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

1085. 微信小游戏声音,使用playsound播放音效问题 [ 48%]

...下并没有你说的问题! this.stage.on(Event.MOUSE_UP, this, onB); private function onB():void          {             Laya.SoundManager.playSound("res/sound/onClick.wav");         } 你看看是不是你的代码逻辑有问题那? 2018-05-03 0 2 分享 微博 QZONE 微...

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

1086. safari横屏在一定条件下会出现显示内容错位问题。必现!! [ 48%]

...细点 Victor • 2017-07-07 14:40 @cuixueying 这样处理是个死循环 private onStageResize(e:Laya.Event):void{ if(Laya.Browser.onMobile){ alert("自适应") Laya.stage.scaleMode = Laya.Stage.SCALE_SHOWALL; Laya.stage.alignV = Laya.Stage.ALIGN_TOP; Laya.stage.alignH = Laya.Stage.ALIGN...

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

1087. image在相应loaded的时候,无法正确获取高度 [ 48%]

...Matter.Body; constructor() { super(); this.on('start', this, this.init); } private init():void { console.log("init", this.x, this.y, this.width, this.height, this.scaleX, this.scaleY); var createOption: any = { isStatic: false, }; this.matterBody = Matter.Bodies.rectangle(this.x, this.y, this.width,...

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

1088. 物理引擎-Slingshot [ 48%]

...ions); Matter.World.add(engine.world, rock); elastic.bodyB = rock; } }); } private function onResize():void { // 设置鼠标的坐标缩放 // Laya.stage.clientScaleX代表舞台缩放 // Laya.stage._canvasTransform代表画布缩放 Matter.Mouse.setScale(mouseConstraint.mouse, {x: 1 / (Laya.stage....

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

1089. 图像组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 48%]

...建完毕,此方法只执行一次 */ onAwake(): void { this.setup(); } private setup(): void { let img: Laya.Image = new Laya.Image("resources/layaAir.png"); img.pos(165, 62.5); this.owner.addChild(img); } } Copyright ©Layabox 2026 all right reserved,powered by LayaAir Engine更新时间: 20...

来源: Laya3.0_文档 发布时间: 20251010

1090. LayaAir IDE 语言包的使用? [ 48%]

...loader.load("lang.lang",Handler.create(this,onLoaded),null,Loader.JSON); } private function onLoaded():void { var obj:Object=Laya.loader.getRes("lang.lang"); Text.langPacks=obj; var texts:Text=new Text(); texts.text="hello!welcom LayaBox"; Laya.stage.addChild(texts); } } }   2016-10-18 1 0 分享 ...

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