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

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

2241. LayaAirIDE中第一个程序“Hello Layabox”(ActionScript-LayaAir基础篇(AS3)-快速上手) [ 64%]

...的             Laya.init(600, 300);             var txt:Text = new Text();                           //设置文本内容             txt.text = "Hello Layabox";                           //设置文本颜...

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

2242. 如何用代码控制panel的vscroll滚动幅度 [ 64%]

...nction onLoaded():void { //panel 切记设置宽高,否则panel不显示 var panel:Panel=new Panel(); panel.size(300,300); panel.pos(100,100); panel.vScrollBarSkin='comp/vscroll.png'; panel.hScrollBarSkin='comp/hscroll.png'; Laya.stage.addChild(panel); //panel的子对象,,切忌要设置宽...

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

2243. tiledmap 可以在图块层的指定格子上添加Sprite吗 [ 64%]

...ledMap() this.tMap.antiCrack = true //创建Rectangle实例,视口区域 var viewRect:Laya.Rectangle = new Laya.Rectangle(0, 0, Conf.App_Width, Conf.App_Height); //创建TiledMap地图 this.tMap.createMap("map/"+mapname+".json",viewRect, laya.utils.Handler.create(this, this.test));//, null, new La...

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

2244. laya.ui.FontClip [ 64%]

...果可以当作图片源,再次绘制到其他Sprite里面,示例: var htmlCanvas:HTMLCanvas = sprite.drawToCanvas(100, 100, 0, 0);//把精灵绘制到canvas上面 var sp:Sprite = new Sprite();//创建精灵 sp.graphics.drawTexture(htmlCanvas.getTexture());//把截图绘制到精灵上 Laya.st...

来源: Laya2.0_api 发布时间: 20190513

2245. qq玩一玩 问题 [ 64%]

...载声音完成回调函数中调用播放该声音也无法播放) 2. var camera:Laya.Camera = new Laya.Camera(1280 / 720, 100, 2001);       camera.fieldOfView = 20;       camera.transform.rotate(new Laya.Vector3(0,180,0),true,false);       var skyBox:Laya.SkyBox=new Laya.SkyBox();...

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

2246. 使用 loader.create 预加载模型后。必须要在回调 Laya.Event.HIERARCHY_LOADED 中获取子元素吗?预加载是预加载的什么部分? [ 64%]

...源100%完成后,资源添加进scene中还需要回调吗? 例如: var effect3D=scene.addChild(Laya.loader.getRes("LayaScene_effect/effect.lh")); effect3D.once( Event.LOADED , this,function(sprite){ var child=effect3D.getChildAt(0); } ); sfsmmc • 2017-08-21 15:53 我试过,在lo...

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

2247. 在UI类里调用启动类的静态函数失败了 [ 64%]

...his, this.onLoading)); } static aaa(): void { } private onLoaded(): void { var info = new view.GameInfo(); info.zOrder = 99;//置最顶,这句话不写图层看不见 // info.init(); Laya.stage.addChild(info); } private onLoading(): void { var bj = new BeiJing(); Laya.stage.addChild(bj); } } new Gam...

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

2248. 从Unity中编辑并导出摄像机(TypeScript-3D基础(TS)-LayaAir3D之Camera) [ 64%]

...aya.Handler.create(this,this.onSceneOK)); } onSceneOK() { //添加3D场景 var scene = Laya.loader.getRes("monkey/monkey.ls"); Laya.stage.addChild(scene); //从场景中获取摄像机 var camera = scene.getChildByName("Main Camera"); //后续对摄像机的逻辑操作....... } } ``` ​ 在Untiy...

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

2249. 新手入坑请教下各位大神关于LayaMaxUI问题 [ 64%]

...import View=Laya.View; import Dialog=Laya.Dialog; import Scene=Laya.Scene; var REG: Function = Laya.ClassUtils.regClass; export module ui.test { export class TestSceneUI extends Laya.Scene {         public scoreLbl:Laya.Label;         public tipLbll:Laya.Label; constructor(){ super()...

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

2250. 关于intersects碰撞的疑问 [ 64%]

...题请参考下面代码示例,如果还有不明白的我们再沟通!var sp1:Sprite=new Sprite(); sp1.graphics.drawRect(0,0,200,400,"#FF0000"); Laya.stage.addChild(sp1); var sp2:Sprite=new Sprite(); sp2.graphics.drawRect(0,0,300,400,"#0000FF"); sp2.pos(100,100); if(sp1.getBounds().intersects(s...

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