官方文档中:
// 创建一个节点
var node = new cc.Node();
// 并将节点添加到场景中
c.director.getScene().addChild(node);
// 并添加粒子组件到 Node 上
var particleSystem = node.addComponent(cc.ParticleSystem);
// 接下去就可以对 particleSystem 这个对象进行一系列操作了
添加无任何效果,然后添加
particleSystem.PlayOnLoad = true;
particleSystem.AutoRemoveOnFinish = true;
particleSystem.File = ‘resources/partcle/effect_flop _1’;
其中赋值文件,我看源码的File类型是string,我尝试了各种路径都不行(官方未做说明)
resources/partcle/effect_flop _1
effect_flop _1
甚至加上.plist
加上以后调用particleSystem.resetSystem();也无效。
我也尝试了用动态加载的资源,把加载到的例子资源传给File也不行。
我暂时不能解决这个问题了。
请教各位大神,怎么用脚本创建并播放

