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

  • Box2D for Flash Games
  • Emanuele Feronato
  • 188字
  • 2021-08-05 18:44:25

Downloading and installing Box2D for Flash

You can download the latest version of Box2D for Flash either from the official site (http://www.box2dflash.org/download) or from the SourceForge project page (http://sourceforge.net/projects/box2dflash/).

Once you have downloaded the zipped package, extract the Box2D folder (you can find it inside the Source folder) into the same folder you are using for your project. The following is how your awesome game folder should look before you start coding:

Downloading and installing Box2D for Flash

You can see the Box2D folder, the FLA file that I am assuming has a document class called Main and therefore Main.as, which is the class we will work on.

I would suggest you work on a 640 x 480 Flash movie at 30 frames per second (fps). The document class should be called Main and the examples will look better if you use a dark stage background color, such as #333333. At least these are the settings I am using throughout the book. Obviously you can change them as you want, but in that case your final movies may look a bit different than the examples shown in the book.

Now let's import Box2D classes.

主站蜘蛛池模板: 龙岩市| 通海县| 会东县| 阿图什市| 富锦市| 神农架林区| 万源市| 宜黄县| 保德县| 南靖县| 武鸣县| 屏南县| 青田县| 中卫市| 泸溪县| 阿拉善左旗| 镇安县| 盘山县| 饶平县| 普兰店市| 水城县| 清河县| 蓬莱市| 遵义县| 东山县| 东安县| 石柱| 舒城县| 长子县| 全州县| 贵德县| 青田县| 铅山县| 腾冲县| 宾阳县| 旺苍县| 乌鲁木齐县| 泰和县| 淮滨县| 霍林郭勒市| 舞阳县|