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

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

941. 微信小游戏运行导出项目的时候报错:Scene: the .lh file root type must be Scene [ 53%]

...sceneURl, clas:MyScene}], Laya.Handler.create(this, this.loadComplete)); } private loadComplete():void { console.log("debuginfo LayaAir3D constructer loadres complete"); this._scene = MyScene.load(this._sceneURl) as MyScene; this._scene.output(); Laya.stage.addChild(this._scene); var camer...

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

942. Touch接口缺少stageX,stageY [ 53%]

...MO “鼠标交互--双指旋转(多点触控)”有这样的代码: private onMouseDown(e: Event): void {             var touches: Array<any> = e.touches;             if (touches && touches.length == 2) {                 this.preRadian = Math.atan2(       ...

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

943. 关于fillText问题 [ 53%]

关于fillText问题 private label_image:Laya.Sprite=new Laya.Sprite(); this.label_image.graphics.fillText(xxx, xxx,"15px Arial","#000000","center"); this.label_image.pos(0,0) Laya.stage.addChild(this.label_image); 这样写为什么CurMem会增加接近16M,这不就是在精灵上绘制嘛,...

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

944. tesT中是一个按钮,在这按钮中加入怎么样的函数,才能调用SAMPLE中的MOVEleft这个函数? [ 53%]

...与内容相关的链接 提交 1 个回复 cuixueying 赞同来自:   把private function moveleft改为public function moveleft,在Sample中实例化moveleft所在的类,就可以通过实例去调用了。   建议你网上找下AS3的属性和函数相互调用的相关教程,学习下...

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

945. 怎么让laya h5自动适应等比缩放? [ 53%]

...StageScaleMode.NO_SCALE; stage.addEventListener(Event.RESIZE,stageResize); private function stageResize(event:Event):void { trace(stage.stageWidth) trace(stage.stageHeight) } 转换成h5后获取浏览器的宽高://[IF-JS]var fullScreenWidth = Laya.window.innerWidth; //[IF-JS]var fullScreenHeight...

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

946. LayaAir IDE有没有像Flash Builder里的代码模板的功能? [ 53%]

... 输入方法名myFunction()然后ctrl+1 可以自动补全方法的定义private myFunction():void { } 2017-10-28 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 Monica - 知识达人 赞同来自: 你可以去VSC...

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

947. 关于官方技术文档中《微信飞机大战》实战开发中监听界面是否关闭 [ 53%]

...面是否关闭 this.once(Event.CLOSE,this,onClose); /** * 界面关闭 */ private function onClose():void { console.log("GameStart界面关闭!"); //从舞台移除自己 this.removeSelf(); //只加载一次,因此直接消毁自己 this.destroy(); }onClose方法并没走到,控制台没输...

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

948. Laya.Resource.destroyUnusedResources导致界面变形 [ 53%]

...钮2关闭界面, 按钮3执行destroyUnusedResources。 核心代码: private onBtnClick(e:Laya.Event):void { switch(e.target) { case this.btn1: Laya.Scene.open("ui/p1/Page1.scene", false); break; case this.btn2: Laya.Scene.close("ui/p1/Page1.scene"); break; case this.btn3: Laya.Resource.destro...

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

949. 使用3D UI · LayaAir3.4 · 引擎文档 · LAYABOX [ 53%]

...uctor() { super(); Main.instance = this; } @property({type:Laya.Sprite3D}) private target: Laya.Sprite3D; @property({type:Laya.UI3D}) private ui3d: Laya.UI3D; public animator: Laya.Animator; onEnable() { // 广告牌模式 this.ui3d.billboard = true; //获得状态机 this.animator = this.target.get...

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

950. 预制体模块 · LayaAir3文档 · LAYABOX [ 53%]

....Script { //declare owner : Laya.Sprite3D; @property( { type: Laya.Box } ) private box: Laya.Box; constructor() { super(); } onStart(): void { //加载预制体文件 Laya.loader.load("resources/Title.lh").then( (res)=>{ //创建预制体 let label: Laya.Label = res.create(); //添加预制体Lab...

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