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

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

181. canvas下资源清理的问题 [ 64%]

...e.addChild(btn2);                          btn1.on(Event.CLICK,this,onClick);             btn2.on(Event.CLICK,this,onClick);                          Laya.loader.load([{url: "res/atlas/common.atlas", type: Loader.ATLAS}]);                   ...

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

182. UI-Clip [ 64%]

...FFFFFF,#FFFFFF,#FFFFFF"; this.controller.size(84, 30); this.controller.on('click', this, this.onClipSwitchState); this.controller.x = (Laya.stage.width - this.controller.width) / 2; this.controller.y = (Laya.stage.height - this.controller.height) / 2 + 110; Laya.stage.addChild(this.controller); } on...

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

183. Sprite-屏幕截图 [ 64%]

... = new Laya.Button(skin,name); Laya.stage.addChild(btn); btn.on(Laya.Event.CLICK,this,cb); btn.size(147,55); btn.name = name; btn.right = 10; btn.top = index * (btn.height + 10); return btn; } onLoaded(){ for (let index = 0; index = ["res/button.png", "res/button.png", "res/button.png"]; private nam...

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

184. 刚刚接触2天layaair,有几个问题请教。 [ 64%]

...n1,但不知道怎么调用,强行在Main.js里面写入 btn1.on(Event.CLICK, this, onBtnClick); function onBtnClick() { alert('222'); } btn1 is not defined 按教程写脚本,实在找不到地方写,请问有没有类似教程呢。 问题3)我在Scenes 新建了2个view,一个是v1一...

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

185. 分享:销毁龙骨动画! [ 63%]

...ddBtn.x = 250; addBtn.y = 50; Laya.stage.addChild(addBtn); DesBtn.on(Event.CLICK, this, onDesBtn); addBtn.on(Event.CLICK, this, onAddBtn); } private function onDesBtn():void { destroy(); } private function onAddBtn():void { startFun(); } public function startFun():void { mAniPath = "Dragon/Dragon.sk...

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

186. 版本号:2.0.2 beta, 在sound文件夹下音乐播放不了,放入到res文件夹下可播放 [ 63%]

... = soundButton.y; Laya.stage.addChild(musicButton);  soundButton.on(Event.CLICK, this, this.onPlaySound); musicButton.on(Event.CLICK, this, this.onPlayMusic); }  private createButton(label: string): Sprite { var w: number = 110; var h: number = 40;  var button: Sprite = new Sprite(); button.size(...

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

187. tween有这个一个bug [ 63%]

...hare.y = this.Move2d.y; this.SceneMajor.addChild(share); share.btShare.on('click',this,function(){ // Laya.SoundManager.playSound(SfxPool.btPress, 1, null); this.SceneShareDark(); }); share.btSignUp.on('click',this, SignUp_Func); var timeLine = new Laya.TimeLine(); timeLine.addLabel("ZoomIn",0).to(s...

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

188. 微信飞机大战报错 [ 62%]

...         GameInfo.super(this);         this.pauseBtn.on(Laya.Event.CLICK, this, this.onPauseBtnClick);         this.reset();     }     Laya.class(GameInfo, "GameInfo", _super);     var _proto = GameInfo.prototype;     _proto.reset = function(){         this.infoLabel.text = "...

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

189. 发现bug,update大问题!!!!!!!!! 2.13版本 [ 62%]

...false         this.rig.gravityScale = 6         this.view.m_jump.onClick(this, this.onJump)         this.view.m_left.on(Laya.Event.MOUSE_DOWN,this, this.onleft)         this.view.m_left.on(Laya.Event.MOUSE_UP,this, this.notleft)         this.view.m_right.on(Laya.Event.MOUSE_DOWN,...

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

190. 2D物理-桥 [ 62%]

...; label.color = "#e69999"; } dispose() { Laya.Laya.stage.offAll(Laya.Event.CLICK); Laya.Laya.stage.removeChild(this.label); } } new Physics_Physics_Bridge();import { Laya } from "Laya"; import { Sprite } from "laya/display/Sprite"; import { Stage } from "laya/display/Stage"; import { Event } from "l...

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