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

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

31. 封装类的时候 怎么在类中表示自身? [ 81%]

...class BackGround extends Laya.Sprite{ constructor() { super(); new init(); function init() { var bg1 = new Laya.Sprite(); var bg2 = new Laya.Sprite(); //背景图 // box.loadImage("../bin/background.png"); // Laya.stage.addChild(box); bg1.loadImage("../bin/background.png"); this.addChild(bg1); bg2.l...

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

32. Laya.Pool.getItemByClass 闪退 [ 81%]

...t(type) 调用init方法时候闪退,错误信息是 "fish.init is not a function" "TypeError: fish.init is not a function at Function.CFSprite.reusableFishWithType (file:///Users/heboyce/Desktop/Work/Web/CatchFish/bin/js/common/CFSprite.js:28:14) at GameView.addFinsh (file:///Users/heboyce/Deskto...

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

33. 无法清除指定定时器 [ 80%]

...复 w1114367261 赞同来自: Laya.timer.loop(100, this, looppp); private function looppp():void          {             trace("______________________");         } this.stage.on(Event.MOUSE_UP, this, onB); private function onB():void          {             Laya.t...

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

34. Templet资源删除不掉 [ 80%]

...能删除         private var factory:Templet;         public function Main()         {             //初始化引擎             Laya.init(800, 480, WebGL);             Stat.show(0, 0);             Laya.stage.scaleMode = "showall";        ...

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

35. DrawPie例子中无法显示遮罩区域 [ 80%]

...http://layaair.ldc.layabox.com ... Image 输入已下代码并执行: (function() { var Sprite = Laya.Sprite; var Stage = Laya.Stage; var Texture = Laya.Texture; var Browser = Laya.Browser; var Handler = Laya.Handler; var WebGL = Laya.WebGL; (function() { // 不支持WebGL时自动切换至Canvas ...

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

36. 执行回调函数时报is not a function [ 80%]

执行回调函数时报is not a function 解压缩laya_game.rar,双击打开laya_game\hgameStarter\bin\h5目录下的index.html,待浏览器打开后,打开开发者工具查看:    Main.as里把getRolesBack函数作为回调函数传给SocketProxy.as setRoleCall,但是回调回来执...

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

37. list里面可以加入多个view吗? [ 79%]

...ya.utils.Handler; public class LayaAirDemo { private var list:List; public function LayaAirDemo() { Laya.init(Browser.width,Browser.height); Laya.stage.bgColor="#EEFFCC"; Laya.loader.load("res/atlas/comp.json",Handler.create(this,onLoaded),null,Loader.ATLAS); } private function onLoaded():void { lis...

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

38. timer无法用clear清除的BUG [ 79%]

...p函数用this绑定时,clear无法清除 ,clearAll可以清除 public function startLoop() {       Laya.timer.loop(2000,this,this.onLoop.bind(this)); }   private function onLoop():void {     if(this.stop){         Laya.timer.clear(this,this.onLoop.bind(this));  //     } } ...

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

39. 三个图好像无法绑定不同的事件? [ 79%]

...,100,100,90,90); Laya.stage.addChild(img1); img1.on(Laya.Event.CLICK,this, function(name){ console.log(name);},['图1']); var img2 = new Laya.Sprite(); img2.loadImage('https://layaair.ldc.layabox.com/demo/h5/res/apes/monkey2.png',200,300,90,90); Laya.stage.addChild(img2); img2.on(Laya.Event.CLICK,th...

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

40. 最新版本IDE,如何获取http返回的json数据 [ 79%]

...下什么问题 //注册按钮响应函数 Login.prototype.onButtonLogin = function (){ console.log ('按了登录按钮')  var xhr = new Laya.HttpRequest(); xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr....

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