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

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

651. 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

652. 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

653. 微信小游戏加载资源问题 [ 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

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

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

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

655. 只播放一次获取回调需要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

656. 类似抠图、挖空效果的实现 [ 65%]

...         blue.size(500, 500);             blue.on("click", this, onClick);             Laya.stage.addChild(blue);                          //增加一个容器             box = new Sprite();             //设置容器为画布缓存    ...

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

657. iOS环境浏览器使用mask黑屏 [ 65%]

...行如下代码:private _sp = new Laya.Sprite(); private _testMask() { this._sp.graphics.clear(); this._sp.graphics.drawCircle(100, 100, 50, '#ffffff'); Laya.timer.once(3000, this, () => { this.img.mask = this._sp; }) }之后编译项目 2. 使用iphone手机的safari扫码功能运行项目 3...

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

658. 关于onFocus的问题 [ 65%]

...复 cuixueying 赞同来自: 你有给你的textInput.on(Laya.Event.Focus,this,this.onFocus)进行监听吗,如果有的话,可以把你的测试例子提供下,我们看下! 2017-08-01 0 0 分享 微博 QZONE 微信 akane01 赞同来自: 好像没有,请问怎么进行监听? 2017-08-01 0...

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

659. 父元素,子元素,兄弟元素 [ 65%]

...:e:Laya.Event,这个能数有阻止点击事件冒泡 点击事件: this.btnHome.on(Laya.Event.CLICK, thisthis.homeClick);   private homeClick(e) { //防止点击事件穿透 e.stopPropagation(); } 2018-10-12 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回...

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

660. layaAir 打包成apk后在真机上运行 使用粒子时报错 [ 65%]

...=出错啦,请把此信息截图给研发商            TypeError: this._emitter.advanceTime is not a function            http://192.168.1.240:8900/bin/ ... :831: TypeError: this._emitter.advanceTime is not a function                        this._emitter && this._em...

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