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

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

271. Image.loadImage 方法加载问题 [ 54%]

...publicSpaceData = cell.dataSource; } module gamepublicspaceitem {  export class PublicSpaceItem extends Laya.Box  {   public static BTN_ENTRER_CLICK:string = "BtnEnterClick";   public _publicSpaceData:datasheet.PublicSpaceData;   private bg:Laya.Image;   private btnEnter:Laya.Button;   c...

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

272. 请问 layaair2.0的js有没有api可以查询 例如Laya.Script [ 54%]

...击它们无法获知,我点的是哪个,代码 如下 export default class btn1 extends Laya.Script { constructor(){super();} onEnable(){} onClick(){ alert("id="+this.id); //这里有一个id,但是系统自动生成的,无法获知这个id代表哪个按钮被点(因为我有4个按钮...

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

273. List属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 54%]

....layabox.com/api2/Chinese/index.html?version=2.9.0beta&type=2D&category=UI&class=laya.ui.List)。 ### 1.1 创建 List 组件 #### 1.编辑列表项。 ​ 列表项可以是 Box 对象或 View(页面) 或其它自定义页面对象。此处以Box 对象为例。 ​ **a.**从资源面板里选...

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

274. image在相应loaded的时候,无法正确获取高度 [ 53%]

image在相应loaded的时候,无法正确获取高度 class RoleUIDynamic extends Laya.Image { matterBody: Matter.Body; constructor() { super(); this.on('start', this, this.init); } private init():void { console.log("init", this.x, this.y, this.width, this.height, this.scaleX, this.scaleY); var ...

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

275. 请大家帮助优化一下这个抛物线的代码 [ 53%]

...码  希望大家指正 https://my.oschina.net/u/659068/blog/1564002  class Ball extends Laya.Sprite{ private static cached:boolean = false; private body:Laya.Sprite; constructor(){ super(); this.init(); } public init():void{ if(!Ball.cached){ Ball.cached = true; this.body = new Laya.Sprite(); th...

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

276. prop 识别不到 [ 53%]

...de报未定义,IDE F8编译时也不通过   代码: export default class Index extends Laya.Script {     /* @prop {name: speed, tips: "速度", type: Number, default: 10} */      constructor() {         super();     }      onAwake() {        ...

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

277. 重复背景,全方向地图拖动Demo [ 53%]

...o UI创建4个image  var分别: map0,map1,map2,map3 背景图宽高 1800 class WorldPage extends ui.WorldPageUI{ constructor (x,y) { super() this.maxX = 149850 this.maxY = 97500 this.offsetX = x * 150 this.offsetY = y * 150 this.downMouseX = 0 this.downMouseY = 0 Laya.loader.load(['bg/world_bg.jpg...

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

278. 为什么pannel里显示两张同样的图片显示不出来,只能显示一张 [ 53%]

...pannel里显示两张同样的图片显示不出来,只能显示一张 class LevelScrollUI extends ui.LevelUI { private panel:Laya.Panel; constructor() { super(); this.panel = new Laya.Panel(); this.panel.size(720, 1136); this.panel.vScrollBarSkin = "comp/vscroll.png"; Laya.stage.addChild(this.pan...

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

279. tiledmap 可以在图块层的指定格子上添加Sprite吗 [ 53%]

...会报错说_showGridList不存在,需要在libs/LayaAir.d.ts里,找到class MapLayer extends Sprite这一行,在下面加上 _showGridList: Array<any>;即可 wu语 • 2018-08-07 19:51 1.7.19.1版本不行

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

280. 调用ui,new的时候出现Uncaught TypeError: Cannot read property 'call' of undefined [ 52%]

...){    function Test(){         Test.super(this);     };     Laya.class(Test, "Test", _surper);     return Test;      })(ui.TestUI);     报错Uncaught TypeError: Cannot read property 'call' of undefined     at Function.<anonymous> (laya.core.js:127)     at new Test (Test.j...

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