- 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."
推薦閱讀
- 程序員修煉之道:從小工到專家
- Greenplum:從大數(shù)據(jù)戰(zhàn)略到實現(xiàn)
- Voice Application Development for Android
- Learning Spring Boot
- 大數(shù)據(jù)算法
- Python數(shù)據(jù)分析:基于Plotly的動態(tài)可視化繪圖
- R Object-oriented Programming
- 商業(yè)智能工具應用與數(shù)據(jù)可視化
- Access 2016數(shù)據(jù)庫應用基礎
- 區(qū)塊鏈應用開發(fā)指南:業(yè)務場景剖析與實戰(zhàn)
- 數(shù)據(jù)之美:一本書學會可視化設計
- 數(shù)字化轉型方法論:落地路徑與數(shù)據(jù)中臺
- Trino權威指南(原書第2版)
- 數(shù)據(jù)庫基礎與應用
- Nagios Core Administrators Cookbook