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

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

341. 圆不跟谁 sprite 一起缩放? [ 94%]

...GameMain{ constructor() { Laya.init(Browser.width, Browser.height, WebGL); this.CreateCircle(); // this.CreateRectangle(); } private firstSp: Laya.Sprite; private _adaptSp: Laya.Sprite; private _pointList : Point[]; private _rootSp : Laya.Sprite;  public CreateCircle() { this._rootSp = new Laya.Spr...

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

342. 内置骨骼动画 · LayaAir3.0文档 · LAYABOX [ 94%]

...en((templet: Laya.Templet) => { //创建模式为1,可以启用换装 this.mArmature = templet.buildArmature(0); this.mArmature.x = 300; this.mArmature.y = 350; this.mArmature.scale(0.5, 0.5); this.owner.addChild(this.mArmature); //设置动画播放完成后,调用completeHandler继续播放...

来源: Laya3.0_文档 发布时间: 20230303

343. 鼠标交互-自定义事件 [ 94%]

...tage.height / 2; sp.size(200, 200); Laya.stage.addChild(sp); sp.on(ROTATE, this, onRotate); // 侦听自定义的事件 sp.on(Event.CLICK, this, onSpriteClick); } function onSpriteClick(e) { var randomAngle = Math.random() * 180; //发送自定义事件 sp.event(ROTATE, [randomAngle]); } // 触发...

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

344. ProgressBar属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 94%]

...d(["res/ui/progressBar.png", "res/ui/progressBar$bar.png"], Handler.create(this, this.onLoadComplete)); } private onLoadComplete(): void { this.progressBar = new ProgressBar("res/ui/progressBar.png"); this.progressBar.width = 400; this.progressBar.x = (Laya.stage.width - this.progressBar.width) / 2;...

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

345. 用LayaAir引擎解析Tiled Map地图(JavaScript-2D进阶篇(JS)-扩展模块) [ 94%]

...Laya.Browser.width,Laya.Browser.height,Laya.WebGL); //创建TiledMap实例 this.tMap = new Laya.TiledMap(); //创建Rectangle实例,视口区域 var viewRect = new Laya.Rectangle(0,0,Laya.Browser.width,Laya.Browser.height); //创建TiledMap地图 this.tMap.createMap("res/TiledMap/orthogonal.json",...

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

346. 在List渲染的时候,在滚动一个list的时候,如何实现另一个list也跟着滚动,并且两个list同时滚动一模一样。 [ 94%]

...决,谢谢! 注意点: 两个list的vScrollBarSkin都需要赋值; this.uiPanel.RankList.scrollBar.on( Laya.Event.CHANGE, this, this.OnScroll ); private OnScroll() { this.uiPanel.RankList1.scrollBar.value = this.uiPanel.RankList.scrollBar.value; } 2018-05-16 1 1 分享 微博 QZONE 微信 ...

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

347. HScrollBar属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 94%]

...ndler = Laya.Handler; var WebGL = Laya.WebGL; /***水平滚动条资源**/ this.skins = ["res/ui/hscroll.png", "res/ui/hscroll$bar.png", "res/ui/hscroll$down.png", "res/ui/hscroll$up.png"]; Laya.init(800, 600, WebGL); //画布垂直居中对齐 Laya.stage.alignV = Stage.ALIGN_MIDDLE; //画布水平...

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

348. LAYA js 1.7.12 Tween 使用时回调时 core报错 [ 94%]

...下 2017-11-12 0 1 分享 微博 QZONE 微信 Vivapercuore 赞同来自: this.body = new Laya.Animation(); this.body.loadAtlas(config[this.type].imgBang, Laya.Handler.create(this, this.onLoad)); this.body.width = config[this.type].width this.body.height = config[this.type].height onLoad(){ Tween.to(...

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

349. list只能显示一个图片 [ 94%]

...值 for (i=1;i<10;i++) { var item = {pic:{skin:'cards/'+i+'tong.jpg'}}; this.data.push(item); } console.log(this.data); this.list1.dataSource = this.data; this.list1.x = 50; this.list1.y = 500; this.list1.getChildAt(0).height = 100; this.list1.vScrollBarSkin = ""; this.list1.hScrollBarSkin = "com...

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

350. VScrollBar属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 94%]

...ndler = Laya.Handler; var WebGL = Laya.WebGL; /***垂直滚动条资源**/ this.skins = ["res/ui/vscroll.png", "res/ui/vscroll$bar.png", "res/ui/vscroll$down.png", "res/ui/vscroll$up.png"]; // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); //画布垂直居中对齐 Laya.stage.al...

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