大约有 1,232 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0050 秒)
Laya_社区(702) Laya_示例(137) Laya2.0_文档(123) Laya2.0_示例(116) Laya3.0_文档(75) Laya3.0_api(39) laya_api(29) Laya2.0_api(11)
...置他们的Index索引值就可以获取到里面切好的图片。 private function updateScore():void{ var data:Object = {}; var temp:Number = this.score; for (var i:int = 5; i > 0; i-- ){ data["item" i] = {index:Math.floor(temp)}; temp = temp/10; ...
来源: Laya_社区 发布时间: 20170221
...dle size 10479616, width 1080, height 2408, stride 4352, fd 8, format: <private>, phy 0x0, usage 0xb, viraddr 0x0000000000000000 01-06 17:34:41.531 902 1210 I C01401/Bufferqueue: <163>Alloc: buffer handle size 10479616, width 1080, height 2408, stride 4352, fd 106, transform 0 01-06 17:3...
来源: Laya_社区 发布时间: 20250106
...:"No."+m}); } mDemoUi.m_list.array=data; Laya.stage.addChild(mDemoUi); ... private function onChange():void{ trace("list index= "+mDemoUi.m_list.scrollBar.value); mDemoUi.valueLab.text="滚动条位置value= "+mDemoUi.m_list.scrollBar.value; } 如上所示,给list组件创建了21个item,但是val...
来源: Laya_社区 发布时间: 20171016
...果是个Button的话,可以通过类似的代码来声明、获取: private backBtn: Laya.Button; this.backBtn = this.scene.getChildByName('backBtn') as Laya.Button;但这个Rect就不知道是什么类型的了,试了下Laya.Rect/Laya.Graphics.Rect之类的,都没有这个类。 附...
来源: Laya_社区 发布时间: 20191022
...tage.bgColor = "#232628"; Laya.timer.once(500,this,onLoop); Stat.show(); } private function onLoop():void { __JS__('var LayaCanvas1=document.getElementsByTagName("canvas")[0]'); __JS__('var LayaCanvas2=document.getElementsByTagName("canvas")[1]'); __JS__('var LayaContainer=document.getElementById("l...
来源: Laya_社区 发布时间: 20170421
..."#FF0000"); Laya.stage.addChild(sp); Laya.timer.loop(delay,this,onLoop); } private function onLoop():void { delay-=50; sp.x+=20; Laya.timer.clear(this,onLoop); Laya.timer.loop(delay,this,onLoop); } 2017-06-26 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请...
来源: Laya_社区 发布时间: 20170626
...。 > **脚本类**: ```typescript class MouseScript extends Script3D{ private var meshsp:MeshSprite3D; public function MouseScript() {} /** * 覆写3D对象组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ override public function onAwake():voi...
来源: Laya2.0_文档 发布时间: 20210715
...rt/LayaScene_role/role.lh", Handler.create(_instance, OnCreateComplete1)); private static function OnCreateComplete1():void{ trace("complete load role"); var sprite3D:Sprite3D = Laya.loader.getRes("laya_assert/LayaScene_role/role.lh"); mainScene.addChild(sprite3D); } 上面是我加载的代码。ma...
来源: Laya_社区 发布时间: 20181117
...空表示场景已加载完成 this.garbageCollection(); break; } /** * @private 销毁场景并且释放资源 */ garbageCollection() { this._scene.destroy();//销毁场景 this._scene = null; Laya.Resource.destroyUnusedResources();//销毁无用资源(没有被场景树引用,并且没有加资源...
来源: Laya2.0_文档 发布时间: 20210715
...ite的pivot和pos,结果位置不正确 // 程序入口 class GameMain { private sp: Laya.Sprite; constructor() { Laya.init(2000, 1500); //设置舞台背景色 Laya.stage.bgColor = "#ffffff" this.sp = new Laya.Sprite(); let width = 660 let height = 420 this.sp.size(width, height) this.sp.pivot(Ma...
来源: Laya_社区 发布时间: 20171230