Cocos2d iphone 在Cocos2d中,如何移动背景精灵图像?
我在做汽车游戏,我想在纵向模式下移动背景图像(图像大小为320) × 1024),因此我不想使用CCParallaxNode移动背景图像,甚至不想移动平铺贴图。是否有其他方法可以在纵向模式下移动背景 2分钟后我想提高背景精灵的速度,有人能帮我怎么做吗Cocos2d iphone 在Cocos2d中,如何移动背景精灵图像?,cocos2d-iphone,xcode4.2,Cocos2d Iphone,Xcode4.2,我在做汽车游戏,我想在纵向模式下移动背景图像(图像大小为320) × 1024),因此我不想使用CCParallaxNode移动背景图像,甚至不想移动平铺贴图。是否有其他方法可以在纵向模式下移动背景 2分钟后我想提高背景精灵的速度,有人能帮我怎么做吗 提前感谢。只需在计划更新方法上设置背景精灵的位置 -(void) anUpdate:(ccTime)dt { bgSprite.position = ccp(<new x coordinate>, <new y coor
提前感谢。只需在计划更新方法上设置背景精灵的位置
-(void) anUpdate:(ccTime)dt {
bgSprite.position = ccp(<new x coordinate>, <new y coordinate>);
-(无效)更新:(ccTime)dt{
bgSprite.position=ccp(,);
在更新方法中定位您的bgImage:
-(void) update:(ccTime)dt{
total_time_ += dt;
if(total_time_> 2*60)
speed_ *=2;
bgSprite.position = ccp(bgSprite.position.x, bgSprite.position.y+speed_*dt);
}
你的意思是,你想向下滚动背景..?就像无限滚动背景..?每次更新都要更改精灵的位置属性?使用CCMoveTo操作?