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

大约有 1,155 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0057 秒)

651. 引擎示例中的错误 [ 65%]

...Form 1、constructor里的最后一行: Laya.stage.on(Laya.Event.RESIZE, this, this.fitDOMElements, [emailInput, birthdayInput, passwordInput]); 当stage调整尺寸时,对3个input位置进行调整,当初次运行时,3个input框排在网页左上角,必须手动改变一下浏览器大...

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

652. at api readFile fail callback function [ 65%]

...官方API中有反余弦的方法吗? 调用动画结束on方法,报错this.zombieAnimator.on is not a function 使用API:loadAnimation 加载并播放动画问题 layaair2.0)请问js的Laya.Event.FRAME怎么用,看api中有,但写了不执行。 layair 两点之间的距离api在哪里 ...

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

653. LayaAir和原生DOM交互(TypeScript-2D进阶篇(TS)-扩展模块) [ 65%]

...lor = "#ffcccc"; var div:any = Laya.Browser.document.createElement("div"); this.qrcode = new Laya.Browser.window.QRCode(div,{ width:100, height:100 }); var url:string = "http://layabox.com/"; this.qrcode.makeCode(url); Laya.stage.once("click",this,this.clickHandler); this.qrcodeSp = new Laya.Sprite(...

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

654. 请问如何给ui下所有的button加一个点击监听事件? [ 65%]

...数的target判断是不是button来做。 Laya.stage.on(Laya.Event.CLICK, this, function(res:Laya.Event){ if (res.target instanceof Laya.Button){ // click button } }) 2018-12-01 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 183*****288...

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

655. matter.js mouseconstraint在微信小游戏中无效 [ 65%]

... 'clientWidth',      get: function get() {      var ret = parseInt(this.style.fontSize, 10) * this.innerHTML.length;      return Number.isNaN(ret) ? this.width : ret;      }      }, {      key: 'clientHeight',      get: function get() {      var ret = parseInt(this.st...

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

656. Socket能连接到服务器,客户端发请求也能收到服务端的数据,但是服务端主动推送数据,客户端就是收不到数据? [ 65%]

...tion Connect(url:String):void { socket=new Socket(); socket.on(Event.OPEN, this, onSocketOpen); socket.on(Event.CLOSE, this, onSocketClose); socket.on(Event.MESSAGE, this, onMessageReveived); socket.on(Event.ERROR, this, onConnectError); socket.connectByUrl(url); } public function Add(handler:IHandl...

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

657. 2.0 beta UI Button无法获取 [ 65%]

...n; constructor(){ super()} createChildren():void { super.createChildren(); this.loadScene("Attack"); } } } 扩展UI代码:   import { ui } from "../ui/layaMaxUI"; export default class AttackView extends ui.AttackUI { constructor() { super(); this.btn_attack.on("click", this, this.onAttack); } pri...

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

658. 微信小游戏加载资源问题 [ 65%]

...annel extends Laya.SoundChannel { constructor(audio, miniSound) { super(); this._audio = audio; this._miniSound = miniSound; this._onEnd = MiniSoundChannel.bindToThis(this.__onEnd, this); audio.onEnded(this._onEnd); } static bindToThis(fun, scope) { var rst = fun; rst = fun.bind(scope); return rst; ...

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

659. 是我判断语句写错吗?怎么一直执行第一个条件 [ 65%]

...语句写错吗?怎么一直执行第一个条件 我的本意是判断this.boy.visible=true的话,鼠标可以点击然后到isShowBoy方法中,可是在这个时候我已经将this.boy.visible=false了,点击的时候为什么控制台还是会一直输出8,不是应该输出9嘛 附件 : ...

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

660. 只播放一次获取回调需要Event.STOPPED [ 65%]

...的链接 提交 1 个回复 Apple 赞同来自: xxx.on(Laya.Event.STOPPED,this,this.onStop); function onStop(){     //你的代码 } 2018-04-04 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 ssss111 相关问题 配置layaAir需要注...

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