官术网_书友最值得收藏!

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text folder names, filenames, file extensions, pathnames, dummy URLs, and user input are shown as follows: "In order to add accelerometer support to our game, we are first going to add the following method declaration to our HelloWorldScene.h header file."

A block of code is set as follows:

void HelloWorld::movePlayerByTouch(Touch* touch, Event* event)
{
  Vec2 touchLocation = touch->getLocation();
  if(_sprPlayer->getBoundingBox().containsPoint(touchLocation)){
    movePlayerIfPossible(touchLocation.x);
  }
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

   Size screenSize = glview->getFrameSize();
   Size designSize(768, 1280);
   std::vector<std::string> searchPaths;   
   searchPaths.push_back("sounds");

Any command-line input or output is written as follows:

cocos new MyGame -p com.your_company.mygame -l cpp -d NEW_PROJECTS_DIR

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Clicking on the Next button moves you to the next screen."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

主站蜘蛛池模板: 个旧市| 叙永县| 焦作市| 宜黄县| 如皋市| 霍邱县| 桐柏县| 岗巴县| 南江县| 上思县| 余姚市| 将乐县| 禹城市| 迁安市| 沁水县| 乌海市| 平舆县| 工布江达县| 安岳县| 榕江县| 阳城县| 扶沟县| 桂东县| 丰城市| 牙克石市| 新野县| 南和县| 桃园市| 汶上县| 柳州市| 岱山县| 怀来县| 乐昌市| 周口市| 杭锦后旗| 迁安市| 通州区| 涞水县| 太原市| 海宁市| 苏尼特右旗|