- Box2D for Flash Games
- Emanuele Feronato
- 236字
- 2021-08-05 18:44:24
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 are shown as follows: "Nothing new, we just added an ENTER_FRAME
event, but we needed it in order to run the simulation inside the updateWorld
function."
A block of code is set as follows:
package { import flash.display.Sprite import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; public class Main extends Sprite { public function Main() { trace("my awesome game starts here"); } } }
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
package { import flash.display.Sprite; import flash.events.Event; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; public class Main extends Sprite { public function Main() { var gravity:b2Vec2=new b2Vec2(0,9.81); var sleep:Boolean=true; var world:b2World = new b2World(gravity,sleep); addEventListener(Event.ENTER_FRAME,updateWorld); } private function updateWorld(e:Event):void { trace("my awesome simulation runs here"); } } }
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: "Please notice the names under AS Linkage as I will be using them in the code."
推薦閱讀
- 漫話大數(shù)據(jù)
- 同步:秩序如何從混沌中涌現(xiàn)
- 有趣的二進制:軟件安全與逆向分析
- Access 2007數(shù)據(jù)庫應(yīng)用上機指導(dǎo)與練習(xí)
- 商業(yè)分析思維與實踐:用數(shù)據(jù)分析解決商業(yè)問題
- 算法與數(shù)據(jù)中臺:基于Google、Facebook與微博實踐
- 城市計算
- OracleDBA實戰(zhàn)攻略:運維管理、診斷優(yōu)化、高可用與最佳實踐
- SQL優(yōu)化最佳實踐:構(gòu)建高效率Oracle數(shù)據(jù)庫的方法與技巧
- INSTANT Apple iBooks How-to
- Python數(shù)據(jù)分析與數(shù)據(jù)化運營
- HikariCP連接池實戰(zhàn)
- Access 2010數(shù)據(jù)庫程序設(shè)計實踐教程
- 信息融合中估計算法的性能評估
- 中國云存儲發(fā)展報告