0
我有一个节点(名为'terrain'),我偏移了这样我的主要游戏对象(我的角色)留在屏幕的中心。我这样做是这样的:粒子系统中的粒子表现怪异
[_terrain setOffsetX:offsetX andOffsetY:offsetY*4/3];
事情是,在我的地形上,我有一个粒子系统。当移动我的角色(从而抵消地形)时,所发射的粒子不会考虑它们的上字轨迹。它看起来像排出的粒子是相互矛盾的。这里是我的粒子系统代码,我包括我的地形类(即自我指地形本身):
emitterSnow = [CCParticleSnow node];
emitterSnow.position = startPoint;
[emitterSnow setAnchorPoint:CGPointZero];
[self addChild:emitterSnow z:0 tag:windIndicatorTag];
CGPoint p = emitterSnow.position;
emitterSnow.position = ccp(p.x + width/2 , p.y);
emitterSnow.life = 1;
emitterSnow.lifeVar = .3f;
[emitterSnow setIsRelativeAnchorPoint:YES];
emitterSnow.posVar = CGPointMake(width/2,0);
// gravity
emitterSnow.gravity = ccp(0,1000);
// speed of particles
emitterSnow.speed = 140;
emitterSnow.speedVar = 20;
ccColor4F startColor = emitterSnow.startColor;
startColor.r = 0.9f;
startColor.g = 0.9f;
startColor.b = 0.9f;
emitterSnow.startColor = startColor;
ccColor4F startColorVar = emitterSnow.startColorVar;
startColorVar.b = 0.1f;
emitterSnow.startColorVar = startColorVar;
emitterSnow.emissionRate = 30;
emitterSnow.texture = [[CCTextureCache sharedTextureCache] addImage: @"bubble2.png"];
我怎么能有我的粒子从我的粒子系统源动起来?
kCCPositionTypeGrouped完成了这项工作!谢谢!保存了一整天关于这个问题扼杀的图形设计家伙的生活! :) – Alex 2012-07-10 08:06:26
哈哈,很高兴帮助。干杯! – George 2012-07-10 08:23:30