I am in the middle of a project and currently using 2.0.1. I have no problem rewriting ( and optimizing at the same time ) my code so that it works with 2.0.2 but is it worth the time and effort? From the changelogs, I find nothing that concerns my project except the multi-resolution support ( which I still haven’t tested ). Is it worth migrating to 2.0.2?
I think you should test multi-resolution first, then make a decision.
If think multi-resolution works and saves you many work, i think it is worth.
If I use CCEGLView::setDesignResolutionSize()
, will it scale all sprites ( existing ones and new ones ) and I won’t have to use setScale( )
anymore? If it does then it’s a big time saver for me.
For example, I created a sprite first, set the resolution size, then create another:
void MainLayer::drawScreenObjects( ) {
CCSprite * firstSprite = CCSprite::create( "Actor0-0.png" );
this -> addChild( firstSprite );
cout << "firstSprite.getScale( ) = " << firstSprite -> getScale( ) << endl;
// The above should display "firstSprite.getScale( ) = 1.0 )
CCEGLView::setDesignResolutionSize( DESIGN_RESOLUTION_SIZE ); // I still don't know the arguments ( still downloading 2.0.2 )
CCSprite * secondSprite = CCSprite::create( "Actor1-0.png" );
this -> addChild( secondSprite );
cout << "firstSprite.getScale( ) = " << firstSprite -> getScale( ) << endl;
// Will the firstSprite be scaled even if it's created before the Resolution Size was set?
cout << "secondSprite.getScale( ) = " << secondSprite -> getScale( ) << endl;
// I assume the secondSprite will be scaled into the new scale depending on the Resolution Size.
}
I know I should call setDesignResolutionSize( )
in the layer’s init( ) but what if?
Yeap, it will scale all sprites.