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

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

121. 那个文本溢出需要滚动条怎么弄,API里面就说用Scroll接口,小白 不懂怎么弄 [ 86%]

...来自: Laya.init(500,400,Laya.WebGL);createText();function createText(){this.txt = new Laya.Text();this.txt.overflow = Laya.Text.SCROLL;this.txt.text = "Layabox是HTML5引擎技术提供商与优秀的游戏发行商,面向AS/JS/TS开发者提供HTML5开发技术方案!\n" ;this.txt.size(200,10...

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

122. 按钮旋转 点击区域 [ 86%]

... pivotToCenter, 并且 setMouseDownHandler: function (context, handler) { this.on(this.EVENT.MOUSE_DOWN, context, handler); }, setMoveHandler: function (context, handler) { this.on(this.EVENT.MOUSE_MOVE, context, handler); }, setMouseUpHandler: function (context, handler) { this.on(this.EVENT.MOUSE_...

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

123. 分享一个虚拟摇杆,比较粗糙,没做优化 [ 86%]

...虚拟摇杆,比较粗糙,没做优化 function ModeKey() { //大圆 this.moveMax = null; //小圆点 this.moveKey = null; //当前的舞台 this.layer = null; //是否按下 this.isDown = false; //是否弹起 this.isUp = false; //是否移动 this.isMove = false; } tip:其实是否按下,是...

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

124. 使用方向键 控制精灵在格子中移动 [ 86%]

...的微信 一起研究 13890999   事件 Laya.stage.on(Laya.Event.KEY_UP,this,this.onkeyup); Laya.stage.on(Laya.Event.KEY_DOWN,this,this.onkeydown); Laya.timer.frameLoop(1,this,this.loop);事件响应 onkeyup(e){ for(let i:number = 0;i<this.keyList.length;i++){ if(this.keyList[i]==e.keyCode){ th...

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

125. 加载-错误处理和进度 [ 86%]

...r.png", "../../res/legend/map.jpg"]; Laya.loader.load(urls, Handler.create(this, onAssetLoaded), Handler.create(this, onLoading, null, false), Loader.TEXT); // 侦听加载失败 Laya.loader.on(Event.ERROR, this, onError); })(); function onAssetLoaded(texture) { // 使用texture console.log("加载...

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

126. 打飞机点开始游戏加载飞机动画不出来,点重新开始,才出来,新手求助! [ 86%]

... onLoaded() { start = new GameStartUI(); start.btn_start.on(Event.MOUSE_UP,this,gameInit) Laya.stage.addChild(start); } function gameInit() { map = new GameBgUI(); Laya.stage.addChild(map); play = new GamPlayUI(); Laya.stage.addChild(play); hero = new Hero("hero", 25) hero.pos(100,200) Laya.stage.ad...

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

127. on和off的bug [ 85%]

...g 是这样的,我写了类似这样的代码a.on(Laya.Event.MOUSE_DOWN, this, onStartDrag); 之后我想去掉拖动,就写了a.off(Laya.Event.MOUSE_DOWN, this, onStartDrag); 但发现不行,于是我改成a.offAll(); 就可以了。 需要说明的是onStartDrag是函数内定义的lamda表...

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

128. WebSocket发送与接收数据(ActionScript-LayaAir基础篇(AS3)-数据与通信) [ 85%]

...e; public function Game() { //初始化引擎 Laya.init(600, 400,WebGL);// this.byte = new Byte(); this.byte.endian = Byte.LITTLE_ENDIAN;//这里我们采用小端; this.socket = new Socket(); this.socket.endian = Byte.LITTLE_ENDIAN;//这里我们采用小端; this.socket.connectByUrl("ws://loca...

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

129. 龙骨动画的监听回调,有时能回调,有时不能回调 [ 85%]

...ya.Skeleton> = [];  public static getInstance():DdzLandlordAni{ return this.instance(DdzLandlordAni); }  public constructor(){ super(); this.initTemplet(); }  public static destoryInstance(){ if(this.mInstance){ (<DdzLandlordAni>this.mInstance).destory(); this.mInstance = null; } }  pub...

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

130. dialog.removeSelf is not a function [ 85%]

dialog.removeSelf is not a function (一个界面)this.ui = new ui.common.PlaneGameInfoDialogUI;。。。(关闭按钮)this.ui.ibtn_close.on(Laya.Event.CLICK,this,this.ui.close);。。。(点击之后)Uncaught TypeError: dialog.removeSelf is not a function....求助大神谢谢啦~~~ 20...

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