1
A
回答
7
假設PS是你的粒子系統,你可以啓動和停止這樣的:
[ps resetSystem]; // starts, newly created effects are already running
[ps stopSystem]; // stops
等待10秒就能完成調度以10秒的間隔選擇。
1
希望它能幫助:)
-(void)addParticles
{
[particles resetSystem]; //restarts particles
}
-(void)playParticles //call this later somewhere in your code e.g in touches began [self playParticles];
{
id playParticles = [CCCallFuncN actionWithTarget:self selector:@selector(addParticles)];
id stopParticles = [CCCallFuncN actionWithTarget:self selector:@selector(stopParticles)];
id wait = [CCActionInterval actionWithDuration:3];
CCSequence *Particlesbegin = [CCSequence actions:wait,playParticles,wait,stopParticles, nil];
[self runAction: Particlesbegin];
}
-(void)stopParticles
{
[particles stopSystem];
}
//in touches began
if(CGRectContainsPoint(Btn.boundingBox, location))
{
[self playParticles];
}
相關問題
- 1. 如何在Unity中啓動和停止粒子系統?
- 2. Cocos2d/Cocos2d-x粒子系統暫停
- 3. Cocos2d粒子系統定位
- 4. cocos2d粒子系統自動刪除
- 5. 如何停止粒子系統
- 6. cocos2d中的多粒子系統
- 7. 在Three.JS粒子系統中移動單個粒子
- 8. 粒子系統第一次在cocos2d-x中沒有可見
- 9. 統一3d - 粒子系統
- 10. 這是開始和停止粒子系統的正確方式
- 11. 粒子系統
- 12. three.js中的粒子vs粒子系統
- 13. 在AndEngine GLES2中定位粒子系統和粒子系統的壽命
- 14. 在OpenGL ES 2.0中包含Cocos2d粒子系統
- 15. 我可以在cocos2d的粒子系統中翻轉紋理嗎?
- 16. SFML.NET粒子系統
- 17. 粒子系統libGDX
- 18. 粒子系統DontDestroyOnLoad
- 19. AndEngine粒子系統
- 20. libGdx中的粒子系統
- 21. 粒子系統:粒子生成
- 22. 讓2D粒子系統統一
- 23. 如何在Mac Lion系統啓動時啓動/停止JBoss?
- 24. (Cocos2d)使用粒子系統時,在哪裏放置autoRemoveOnFinish?
- 25. 訪問THREE.js粒子系統中的單個粒子
- 26. 如何檢測three.js中的粒子系統中的粒子懸停?
- 27. 如何在cocos2d android 1中創建一個cocos2d粒子效果?
- 28. 在THREEJS/GLSL中照明粒子系統
- 29. C++粒子系統Allegro 5
- 30. 粒子系統設計?