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

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

201. 如何使用graphics.loadImage加载图片资源的时候,如何判断加载失败? [ 70%]

...mage加载图片资源的时候,如何判断加载失败? 伪代码: this.avatar.graphics.loadImage(url, 0, 0, 0, 0, __complete);这个时候,如果我的url为空或者为一个不存在的图片地址,我如何判断它加载失败呢? 我尝试使用了这样的代码来获取失败...

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

202. 背景音乐来回切换报错 [ 69%]

...null         Laya.loader.load("res/dreams.mp3",Laya.Handler.create(this,function(){             dreamsSound = Laya.SoundManager.playMusic("res/dreams.mp3")         }))          let mainSound:Laya.SoundChannel = null;         this.btn_sound.on(Laya.Event.C...

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

203. 创建对象时使用wx报错 [ 69%]

...wx报错 代码如下 private var wxLaya:* = wx; 编译后提示如下 wx This variable is not defined 2018-06-08 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Laya_Aaron 赞同来自: zmhway as使用微信js的a...

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

204. 2.0.0类库,camera关闭遮挡剔除会报错 [ 69%]

...if (camera.useOcclusionCulling){ FrustumCulling.renderObjectCulling(camera,this,context,this._renders); }else { FrustumCulling.renderObjectCulling(null,this,context,this._renders); } 而被调用的函数中又直接用到了camera中的变量,传入null的就会报错

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

205. 使用 addChild 加载界面后,绑定事件报错 [ 69%]

...artUI {     constructor() {         super();          this.btnStart.on(Laya.Event.CLICK, this, this.startGame);     }      startGame(): void {         //Laya.Scene.open("GameView.scene");         if (!Main.gameView) {             Main.gameVie...

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

206. 发布安卓包对接穿山甲banner广告问题 [ 69%]

...ntView设置为activity_main,laya的gameView添加到RelativeLayout来。this.setContentView(R.layout.activity_main); this.gameContainer = findViewById(R.id.game_container); this.banner_container = findViewById(R.id.banner_container); View gameView = mPlugin.game_plugin_get_view(); this.gameContai...

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

207. 类未找到方法 [ 69%]

...llback(success:Boolean):void { if(success) { loadingRes(); } } "TypeError: this.loadingRes is not a function\n at RequestConfig.__proto.requestCallback [as _callback] 2017-01-18 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 ...

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

208. oppo CanvasRenderingContext2D 并没有实现 drawImage;报错; [ 69%]

...premultiplyAlpha=false); var width=source.width; var height=source.height; this._width=width; this._height=height; this._setWarpMode(/*laya.webgl.WebGLContext.TEXTURE_WRAP_S*/0x2802,this._wrapModeU); this._setWarpMode(/*laya.webgl.WebGLContext.TEXTURE_WRAP_T*/0x2803,this._wrapModeV); this._setFilter...

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

209. Canvas模式下不报错,WebGL模式下运行时报错 [ 69%]

...WebGLContext2D.fileRect()方法,具体行见截图   RenderContext类:this._drawRect=function(x,y,args){                 var ctx=this.ctx;                 if (args[4] !=null){                     ctx.fillStyle=args[4];                     ct...

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

210. 在开启webgl模式下,每次运行texture类的getPixels方法内存都会增加 [ 69%]

...背景色 Laya.stage.bgColor = "#ffffff" Laya.Stat.show() //资源路径 this.Res = "test.png"; this.img = new Laya.Image(); this.img.pos(200, 200) //获取图片资源,绘制到画布 this.img.skin = this.Res //添加到舞台 Laya.stage.addChild(this.img); } private cacheCanvas: Laya.HTMLCanvas ...

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