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

大约有 4,095 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0078 秒)

671. 动画无法添加到舞台问题 [ 91%]

...ero_fly1.png", "fj/hero_fly2.png"], "hero_fly");//创建飞机飞行缓存 this.LeadBody = new Laya.Animation(); this.LeadBody.play("hero_fly");//播放动画 this.bound = this.LeadBody.getBounds(); this.LeadBody.pos(-this.bound.width/2,-this.bound.height/2);//设置动画位置 Laya.stage.addChild(...

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

672. UI-ComboBox [ 91%]

...ALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(skin, Handler.create(this, onLoadComplete)); })(); function onLoadComplete() { var cb = createComboBox(skin); cb.autoSize = true; cb.pos((Laya.stage.width - cb.width) / 2, 100); cb.autoSize = false; } function createComboBox(skin) { var comboBox ...

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

673. 物体每帧y方向移动,超出屏幕高度消失,可还没有超出屏幕高度就提前消失了! [ 91%]

...的代码在两个不同的页面------------- _proto.run = function () { this.speed = 1; Laya.timer.frameLoop(1, this, () => { console.log(this.obstacle0.y, Laya.Browser.height); //this.obstacle0是一个精灵对象 this.obstacle0.y += this.speed; if (this.obstacle0.y > Laya.Browser.height) ...

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

674. UI-Input [ 91%]

...t (3).png", "res/ui/input (4).png"] Laya.loader.load(skins, Handler.create(this, this.onLoadComplete)); } onLoadComplete() { for (let i = 0, len = skins.length; i ; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stag...

来源: Laya2.0_示例 发布时间: 20251209

675. 要做一个方形倒计时,请问该怎么实现,不知道该怎么做 [ 91%]

...nt; public var isCd:Boolean = false; public function CdSprite() { super(); this.scrollRect = rect; this.alpha = 0.85; } public function setSize(bian:int):void{ r = bian / Math.SQRT2; rect = new Rectangle(0,0,bian,bian); this.scrollRect = rect; pos = bian * 0.5; } public function set360(value:int):vo...

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

676. 百度小游戏 内存不断增大的情况 [ 91%]

...Laya.loader.load([{url:"res/atlas/comp.json",type:"atlas"}],Handler.create(this,this.onLoadUi)); } __proto.onLoadUi=function(){ Laya.timer.loop(100,this,this.onLoaded); } __proto.onLoaded=function(){ if(this.isOpen){ return; } this.isOpen=true; var testView=new TestView(); Laya.stage.addChild(testVi...

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

677. 灯光-聚光 [ 91%]

.../LayaMonkey/LayaMonkey.lh")); layaMonkey.once(Laya.Event.HIERARCHY_LOADED, this, function () { var aniSprite3d = layaMonkey.getChildAt(0); var animator = aniSprite3d.getComponentByType(Laya.Animator); animator.play(null, 1.0, 115, 150); }); var _quaternion = new Laya.Quaternion(); var _position = ne...

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

678. 在微信分享成功的回调函数里,Laya播放音效失败。 [ 91%]

...x.resume() gameex.gameInfo.visible = true; gameex.bar.destoyRankSprite()  this.nCountDown = 15; // console.log(gameex.snakeSelf) } })     //暂停 GameEx.prototype.pause = function () { console.log("停止播放音乐") Laya.SoundManager.stopMusic(); //停止游戏主循环 Laya.timer.clear(this,...

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

679. Sprite3D的Layer(JavaScript-3D基础(JS)-LayaAir3D之精灵) [ 91%]

...yer)): ```typescript //添加显示图层(为相机添加一个蒙版) this.camera.addLayer(5); //设置蒙版(所属图层) layaMonkey_clone1.layer = 2; layaMonkey_clone2.layer = 3; layaMonkey_clone3.layer = 4; ...... //切换图层按钮事件监听 this.changeActionButton.on(Laya.Event.CLICK,...

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

680. Sprite3D的Layer(TypeScript-3D基础(TS)-LayaAir3D之精灵) [ 91%]

...yer)): ```typescript //添加显示图层(为相机添加一个蒙版) this.camera.addLayer(5); //设置蒙版(所属图层) layaMonkey_clone1.layer = 2; layaMonkey_clone2.layer = 3; layaMonkey_clone3.layer = 4; ...... //切换图层按钮事件监听 this.changeActionButton.on(Laya.Event.CLICK,...

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