I'm new in cocos2d and game dev. I'm still learning in game dev. My goal is to make one game like Doodle Grub. But problem is snake body. I wrote like following
-(void)update:(ccTime)delta
{
//NSLog(@"%f",[GameScence sharedGameScence].playerVelocity.y);
CGPoint tmp=self.position;
float tmprotation;
self.position=[GameScence sharedGameScence].WormHeadPos;
[GameScence sharedGameScence].WormHeadPos=tmp;
tmprotation=self.rotation;
[self setRotation:[GameScence sharedGameScence].Headrotation];
[GameScence sharedGameScence].Headrotation=tmprotation;
}
snake is moving but problem is all of the body segments are same position when snake stop. And all of the body segments is so close and can't see segments like Doodle Grub. Any idea or Any suggestion ?
No comments:
Post a Comment