Modified annotations (#18521)

Only some of sentences are start with capitalize the first letter of them. So it's not  regular.
This commit is contained in:
Sun 2017-11-29 10:20:15 +09:00 committed by minggo
parent 187a6639e9
commit 685a5441c0
1 changed files with 13 additions and 13 deletions

View File

@ -29,7 +29,7 @@ void AppDelegate::initGLContextAttrs()
bool AppDelegate::applicationDidFinishLaunching() bool AppDelegate::applicationDidFinishLaunching()
{ {
// initialize director // Initialize director
auto director = Director::getInstance(); auto director = Director::getInstance();
auto glview = director->getOpenGLView(); auto glview = director->getOpenGLView();
if(!glview) { if(!glview) {
@ -49,23 +49,23 @@ bool AppDelegate::applicationDidFinishLaunching()
// In this demo, we select resource according to the frame's height. // In this demo, we select resource according to the frame's height.
// If the resource size is different from design resolution size, you need to set contentScaleFactor. // If the resource size is different from design resolution size, you need to set contentScaleFactor.
// We use the ratio of resource's height to the height of design resolution, // We use the ratio of resource's height to the height of design resolution,
// this can make sure that the resource's height could fit for the height of design resolution. // This can make sure that the resource's height could fit for the height of design resolution.
// if the frame's height is larger than the height of medium resource size, select large resource. // If the frame's height is larger than the height of medium resource size, select large resource.
if (frameSize.height > mediumResource.size.height) if (frameSize.height > mediumResource.size.height)
{ {
searchPath.push_back(largeResource.directory); searchPath.push_back(largeResource.directory);
director->setContentScaleFactor(MIN(largeResource.size.height/designResolutionSize.height, largeResource.size.width/designResolutionSize.width)); director->setContentScaleFactor(MIN(largeResource.size.height/designResolutionSize.height, largeResource.size.width/designResolutionSize.width));
} }
// if the frame's height is larger than the height of small resource size, select medium resource. // If the frame's height is larger than the height of small resource size, select medium resource.
else if (frameSize.height > smallResource.size.height) else if (frameSize.height > smallResource.size.height)
{ {
searchPath.push_back(mediumResource.directory); searchPath.push_back(mediumResource.directory);
director->setContentScaleFactor(MIN(mediumResource.size.height/designResolutionSize.height, mediumResource.size.width/designResolutionSize.width)); director->setContentScaleFactor(MIN(mediumResource.size.height/designResolutionSize.height, mediumResource.size.width/designResolutionSize.width));
} }
// if the frame's height is smaller than the height of medium resource size, select small resource. // If the frame's height is smaller than the height of medium resource size, select small resource.
else else
{ {
searchPath.push_back(smallResource.directory); searchPath.push_back(smallResource.directory);
@ -73,7 +73,7 @@ bool AppDelegate::applicationDidFinishLaunching()
director->setContentScaleFactor(MIN(smallResource.size.height/designResolutionSize.height, smallResource.size.width/designResolutionSize.width)); director->setContentScaleFactor(MIN(smallResource.size.height/designResolutionSize.height, smallResource.size.width/designResolutionSize.width));
} }
// set searching path // Set searching path
FileUtils::getInstance()->setSearchPaths(searchPath); FileUtils::getInstance()->setSearchPaths(searchPath);
// Uncomment follow block to use localize manager to set localize strings // Uncomment follow block to use localize manager to set localize strings
@ -96,16 +96,16 @@ bool AppDelegate::applicationDidFinishLaunching()
// auto vrImpl = new VRGenericRenderer; // auto vrImpl = new VRGenericRenderer;
// glview->setVR(vrImpl); // glview->setVR(vrImpl);
// turn on display FPS // Turn on display FPS
director->setDisplayStats(true); director->setDisplayStats(true);
// set FPS. the default value is 1.0/60 if you don't call this // Set FPS. the default value is 1.0/60 if you don't call this
director->setAnimationInterval(1.0f / 60); director->setAnimationInterval(1.0f / 60);
// create a scene. it's an autorelease object // Create a scene. it's an autorelease object
auto scene = HelloWorld::scene(); auto scene = HelloWorld::scene();
// run // Run
director->runWithScene(scene); director->runWithScene(scene);
return true; return true;
@ -116,14 +116,14 @@ void AppDelegate::applicationDidEnterBackground()
{ {
Director::getInstance()->stopAnimation(); Director::getInstance()->stopAnimation();
// if you use SimpleAudioEngine, it must be paused // If you use SimpleAudioEngine, it must be paused
// SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic(); // SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic();
} }
// this function will be called when the app is active again // This function will be called when the app is active again
void AppDelegate::applicationWillEnterForeground() { void AppDelegate::applicationWillEnterForeground() {
Director::getInstance()->startAnimation(); Director::getInstance()->startAnimation();
// if you use SimpleAudioEngine, it must resume here // If you use SimpleAudioEngine, it must resume here
// SimpleAudioEngine::sharedEngine()->resumeBackgroundMusic(); // SimpleAudioEngine::sharedEngine()->resumeBackgroundMusic();
} }