[]简单粒子效果,发布成单机版apk在移动端安装运行,结果显示不出来
相关代码:(可以参考你们官网的粒子效果的例子:http://layaair.ldc.layabox.com/demo/?Particle_T1 )
主要就是:
Laya.loader.load("SnowParticle.part", Handler.create(this, onAssetsLoaded), null, Loader.JSON);
public function onAssetsLoaded(settings:ParticleSetting):void
{
sp = new Particle2D(settings);
sp.emitter.start();
sp.play();
Laya.stage.addChild(sp);
sp.x = Laya.stage.width / 2;
sp.y = Laya.stage.height / 2;
}
发布成单机版apk在移动端安装运行,移动端报错提示:
http://www.xxx.com/LayaUISampl ... annot read property 'start' of null
this.sp.emitter.start(Number.MAX_VALUE);
TypeError: Cannot read property 'start' of null
at LayaUISample.__proto.onAssetsLoaded (http://www.xxx.com/LayaUISample.max.js:440)
at EventHandler.__proto.run (http://www.xxx.com/LayaUISample.max.js:702)
at ResInfo.__proto.event (http://www.xxx.com/LayaUISample.max.js:495)
at LoaderManager.__proto._endLoad (http://www.xxx.com/LayaUISample.max.js:32270)
at onLoaded (http://www.xxx.com/LayaUISample.max.js:32249)
at Loader.<anonymous> (http://www.xxx.com/LayaUISample.max.js:32242)
at EventHandler.__proto.runWith (http://www.xxx.com/LayaUISample.max.js:716)
at Loader.__proto.event (http://www.xxx.com/LayaUISample.max.js:495)
at Loader.__proto.onError (LayaUISample.max.js:33514)
at EventHandler.__proto.runWith (LayaUISample.max.js:716)
主要就是:
Laya.loader.load("SnowParticle.part", Handler.create(this, onAssetsLoaded), null, Loader.JSON);
public function onAssetsLoaded(settings:ParticleSetting):void
{
sp = new Particle2D(settings);
sp.emitter.start();
sp.play();
Laya.stage.addChild(sp);
sp.x = Laya.stage.width / 2;
sp.y = Laya.stage.height / 2;
}
发布成单机版apk在移动端安装运行,移动端报错提示:
http://www.xxx.com/LayaUISampl ... annot read property 'start' of null
this.sp.emitter.start(Number.MAX_VALUE);
TypeError: Cannot read property 'start' of null
at LayaUISample.__proto.onAssetsLoaded (http://www.xxx.com/LayaUISample.max.js:440)
at EventHandler.__proto.run (http://www.xxx.com/LayaUISample.max.js:702)
at ResInfo.__proto.event (http://www.xxx.com/LayaUISample.max.js:495)
at LoaderManager.__proto._endLoad (http://www.xxx.com/LayaUISample.max.js:32270)
at onLoaded (http://www.xxx.com/LayaUISample.max.js:32249)
at Loader.<anonymous> (http://www.xxx.com/LayaUISample.max.js:32242)
at EventHandler.__proto.runWith (http://www.xxx.com/LayaUISample.max.js:716)
at Loader.__proto.event (http://www.xxx.com/LayaUISample.max.js:495)
at Loader.__proto.onError (LayaUISample.max.js:33514)
at EventHandler.__proto.runWith (LayaUISample.max.js:716)
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
cuixueying
赞同来自: