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

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

181. hitArea用法问题 [ 96%]

...!  // 写法一 let g:Laya.Graphics = new Laya.Graphics(); g.drawRect(this.closeBtn.x-10,this.closeBtn.y-10,this.closeBtn.width+20,this.closeBtn.height+20,"#FF0000"); let hitA:Laya.HitArea = new Laya.HitArea(); hitA.hit = g; this.closeBtn.hitArea = hitA; // 写法二 this.closeBtn.graphics.drawRe...

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

182. laya 的list组件,如果有多页信息,怎么实现翻页丫?? [ 96%]

...x: number = -1; private m_downValue: number = -1; constructor() { super(); this.list_rule.hScrollBarSkin = ""; this.list_rule.renderHandler = new Laya.Handler(this, this.updateItem); this.list_rule.scrollBar.changeHandler = new Laya.Handler(this, this.onChange) this.list_rule.mouseHandler = new Laya...

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

183. 如何移动sprite3d [ 96%]

...018-01-25 11:41 浏览: 898 关注: 2 人 176*****233 • 2018-01-25 11:44 this.scene = new Laya.Scene(); this.pos = new Laya.Sprite3D(); this.scene.addChild(this.pos); this.camera = new Laya.Camera(); this.pos.addChild(this.camera); this.camera.transform.translate(this.cameraTrans, false); this.cam...

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

184. 分享个用美术资源做位图文本的方法。。。 [ 96%]

...序入口 class GameMain{ constructor() { Laya.init(600,400); var that = this; Laya.loader.load([{"url":"res/playerKpiFont.json","type":Laya.Loader.JSON}, {"url":"res/playerKpiFont.png","type":Laya.Loader.IMAGE}],new Laya.Handler(that,function(){ var jsonData = Laya.loader.getRes("res/playerKpiFont....

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

185. 物理引擎-牛顿摆 [ 96%]

...)(); function setup() { initMatter(); initWorld(); Laya.stage.on("resize", this, onResize); } function initMatter() { var gameWorld = new Sprite(); Laya.stage.addChild(gameWorld); // 初始化物理引擎 engine = Matter.Engine.create( { enableSleeping: true }); Matter.Engine.run(engine); var render...

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

186. 计时器-间隔循环 [ 96%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { let vGap = 100; this.rotateTimeBasedText = this.createText("基于时间旋转", Laya.stage.width / 2, (Laya.stage.height - vGap) / 2); this.rotateFrameRateBasedText = this.createText("基于帧频...

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

187. 网络和格式-POST [ 96%]

...})(); function connect() { hr = new HttpRequest(); hr.once(Event.PROGRESS, this, onHttpRequestProgress); hr.once(Event.COMPLETE, this, onHttpRequestComplete); hr.once(Event.ERROR, this, onHttpRequestError); hr.send('http://xkxz.zhonghao.huo.inner.layabox.com/api/getData', 'name=myname&psword=xxx', '...

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

188. 网络和格式-GET [ 96%]

...})(); function connect() { hr = new HttpRequest(); hr.once(Event.PROGRESS, this, onHttpRequestProgress); hr.once(Event.COMPLETE, this, onHttpRequestComplete); hr.once(Event.ERROR, this, onHttpRequestError); hr.send('http://xkxz.zhonghao.huo.inner.layabox.com/api/getData?name=myname&psword=xxx', null...

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

189. spine 播放错乱 [ 96%]

....SpineSkeleton; index = 0; private startFun(): void { //创建动画模板 this.templet = new Laya.SpineTemplet(); this.templet.loadAni("spine/10101001.json"); this.templet.on(Laya.Event.COMPLETE, this, this.parseComplete); this.templet.on(Laya.Event.ERROR, this, this.onError); } private parseComple...

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

190. progressbar设置皮肤后, 马上destroy会报bug [ 96%]

...ssbar设置皮肤后, 马上destroy会报bug set skin(value: string) { if (this._skin != value) { this._skin = value; if (this._skin && !Loader.getRes(this._skin)) { ILaya.loader.load(this._skin, Handler.create(this, this._skinLoaded), null, Loader.IMAGE, 1); // TODO TS } else { this._skinLo...

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