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

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

221. matter 2d 碰撞检测 [ 80%]

...onGameOver不是函数,麻烦有时间的大佬看看,很奇怪:   this.Matter.Events.on(this._engine, 'collisionActive', this.onCollision);   private onCollision(event): void { for(var i = 0; i < event.pairs.length; i++) {  var pair = event.pairs[i];  if(pair.bodyA.label === 'gun' &amp...

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

222. 分享一个自己做的游戏公告功能,跑马灯效果 [ 80%]

...                  </span>" constructor() { super() this.width = 1200 this.height = 55 this.visible = false this.pos(565,150) this._createHorn() this._createBg() this._createView() this.on(Laya.Event.UNDISPLAY,this,this.stop) this.on(Laya.Event.DISPLAY,this,this.play) } /** ...

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

223. UI-Clip [ 80%]

..."#232628"; Laya.loader.load([buttonSkin, clipSkin, bgSkin], Handler.create(this, this.onSkinLoaded)); } onSkinLoaded() { this.showBg(); this.createTimerAnimation(); this.showTotalSeconds(); this.createController(); } showBg() { const Image = Laya.Image; let bg = new Image(bgSkin); bg.size(224, 302);...

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

224. 加载-销毁Texture使用的图片资源 [ 80%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.init(); } init() { const Sprite = Laya.Sprite, Animation = Laya.Animation, Text = Laya.Text, Event = Laya.Event; // 创建背景 this.spBg = Sprite.fromImage(PathBg); Laya.stage.addChild(this.spBg); // 创建动画 this....

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

225. Laya.loader.create 进度回调函数执行两次 [ 80%]

... Laya.loader.create(["Main/SMain.ls","Role/Role.lh"],Laya.Handler.create(this,this.on3DComplete),Laya.Handler.create(this,this.onProgress,null,false)); Manager.prototype.onProgress = function(value) { console.log("value=="+Math.floor(value*100)+"%"); }   输出结果: 0.19186599730944645 0.525199...

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

226. Dialog关闭时如何向open他的页面传值? [ 80%]

...是哪个按钮,抛出具体的事件并监听。 myClose.on(Event.CLICK,this,onClicks); myYes.on(Event.CLICK,this,onClicks); myNo.on(Event.CLICK,this,onClicks) } private function onClicks(e:Event):void { // TODO Auto Generated method stub if(e.target.name=="close") { open页面.event(CLOSE, [para...

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

227. this.bitmap.activeResource is not a function TypeError: this.bitmap.activeResource is not a function [ 80%]

this.bitmap.activeResource is not a function TypeError: this.bitmap.activeResource is not a function if (bitmap&&bitmap._addReference){ bitmap._addReference(); } 这个代码过滤已经加了,但是会报下面这个错 this.bitmap.activeResource is not a function TypeError: this.bitmap....

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

228. 为什么没有on的方法? [ 80%]

...:Animator = hero.getComponent(Animator) as Animator; ani.on(Event.COMPLETE,this,onAniComplete,[ani]); 官方例子里这样写.但编辑器和运行都报错显示没on的方法 2018-11-23 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链...

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

229. 播放视频只有声音没有图像 [ 80%]

...ginGame extends Laya.Scene { constructor() { super(); LoginGame.instance = this; Laya.MouseManager.multiTouchEnabled = false; this.loadScene("LoginGame.scene"); } onEnable() { SoundManager.playMusic("audio/梅林茂 - 静かな古都.mp3", 0); this.login_game_button.on(Laya.Event.CLICK, this,this.on...

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

230. UI-Clip [ 80%]

...Laya.loader.load([buttonSkin, clipSkin, bgSkin], laya.utils.Handler.create(this, onSkinLoaded)); })(); function onSkinLoaded() { showBg(); createTimerAnimation(); showTotalSeconds(); createController(); } function showBg() { var bg = new Image(bgSkin); bg.size(224, 302); bg.pos(Laya.stage.width - bg...

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