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

大约有 132 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0043 秒)

101. 通过laya设计模式制作的,要怎么给按钮绑定事件呢? [ 63%]

...uot;; this.init() } init() { // 预加载图集 Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(this, this.onLoaded ), null, Laya.Loader.ATLAS) } onLoaded(){ Laya.stage.addChild(new TopUI()) Laya.stage.addChild(new TabUI()) this.getGold.on(Laya.Event.MOUSE_DOWN,this,function()...

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

102. Android替换游戏启动logo看不到设置的图片 [ 62%]

....loading(50); } //加载引擎需要的资源 Laya.loader.load([{url: "res/atlas/comp.json", type: Loader.ATLAS}], Handler.create(this, onLoaded)); } private function onLoaded():void { //实例UI界面 var testView:TestView = new TestView(); Laya.stage.addChild(testView); __JS__("if(window.conch)") ...

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

103. 使用laya官方示例代码制作微信小游戏无法显示 [ 61%]

...urceVersion.FILENAME_VERSION); function beginLoad(){ Laya.loader.load("res/atlas/comp.atlas", Handler.create(null, onLoaded)); } function onLoaded(): void { //实例UI界面 new laya.UI_Label(); }   上图为在layaIDE中的显示效果。   不知道具体是什么原因,希望得到大家的...

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

104. 使用二进制图片 · LayaAir3.0文档 · LAYABOX [ 61%]

...作。代码如下: var xhr = new XMLHttpRequest(); xhr.open("get", "res/atlas/comp.png", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload =...

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

105. 限制区域拖动效果,为什么会无法限制呢? [ 61%]

...eVersion.FILENAME_VERSION);  function beginLoad() { Laya.loader.load("res/atlas/comp.atlas", Handler.create(null, onLoaded)); }  function onLoaded() { Laya.stage.addChild(new GolfMainUI()); }   附件 : --> 2018-06-27 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 ...

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

106. VBOX动态增加的元素没有自动布局 [ 61%]

...了 } } // 程序入口 Laya.init(600, 400); Laya.loader.load([{ url: "res/atlas/comp.json", type: Loader.ATLAS }], Handler.create(this, this.onLoaded)); function onLoaded(): void { //实例UI界面 var testUI: TestUI = new TestUI(); Laya.stage.addChild(testUI); }         完整项目请见附...

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

107. 分享:为List组件下Item(Box)下的Button(或其他组件)进行监听! [ 60%]

... Laya.init(600, 400); Laya.stage.bgColor='#EEFFCC'; Laya.loader.load("res/atlas/comp.json", Handler.create(this, onAssetLoaded), null, Loader.ATLAS); //添加UI界面 function onAssetLoaded() { Laya.stage.addChild(new TestUI()); } 附件 : --> ButtonClickDemo.rar 2017-05-13 添加评论 免费帖 --...

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

108. HttpRequest 回调方法都没执行 LayaAir 1.7.17 beta JS版本 [ 59%]

...ce(); })(); function loadResource(){ var resourceArray = [ { url:"res/atlas/comp.atlas" , type : Laya.Loader.ATLAS} ]; Laya.loader.load(resourceArray,Laya.Handler.create(null,loadResourceComplete)); } function loadResourceComplete() { Laya.stage.addChild(new LoginView()); } })(); feiguangf...

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

109. 精灵 · LayaAir3.3 · 引擎文档 · LAYABOX [ 59%]

...毕,此方法只执行一次 */ onAwake(): void { this.sprite.loadImage("atlas/comp/image.png"); //纹理:图片路径 this.sprite.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); //位置:屏幕中心 this.sprite.x = Laya.stage.width/2; //x、y分别设置位置 this.sprite.y =...

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

110. 在微信小游戏中,主域中显示开发域的list为什么显示不全? [ 59%]

...n.FILENAME_VERSION);  function beginLoad(){     Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(null, onLoaded)); }*/  function updateItem(cell, index) { cell.setImg(cell.dataSource); }  function onLoaded(): void {      var rankList = new Laya.List();      //rankList.sc...

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