Cocos2D:滚动背景中的间隙
问题描述
I´ve seen tons of people having this problem but I can´t seem to find a solution for my case. Like the title explains I have a scrolling background, using two sprites containing the same image. I´ve set the height to 321 (321x480) believing that would fix the problem, boy, it did not.
Well, this is my setup in the init:
Nothing fancy here, just an setup.
And this is my schedule scroll(with has a ccTime parameter of course): Oh, the background scrolls upwards, increasing the y-value.
GAME_SPEED is defined to 50.0. I´ve added the "+ 1" believing THAT would fix the problem, wrong again though!
So, to the question, does anyone know a way to remove the gap in this case? Would be forever grateful!
Regards
Here is some old code that i use to make clouds appears over an scene
Clouds.h
Clouds.m
Using
you add the node to your main layer/scene
I don't know if this is exactly what you need but maybe it helps. See a video of the effect that i get using this approach https://rapidshare.com/files/3478655240/2012-02-14_1458.swf
这篇关于Cocos2D:滚动背景中的间隙的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!