- 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ù)要素安全流通
- 數(shù)據(jù)庫應(yīng)用實(shí)戰(zhàn)
- 在你身邊為你設(shè)計(jì)Ⅲ:騰訊服務(wù)設(shè)計(jì)思維與實(shí)戰(zhàn)
- Hands-On Data Structures and Algorithms with Rust
- 算法競賽入門經(jīng)典:習(xí)題與解答
- Live Longer with AI
- 商業(yè)分析思維與實(shí)踐:用數(shù)據(jù)分析解決商業(yè)問題
- iOS and OS X Network Programming Cookbook
- MySQL 8.x從入門到精通(視頻教學(xué)版)
- Proxmox VE超融合集群實(shí)踐真?zhèn)?/a>
- 計(jì)算機(jī)應(yīng)用基礎(chǔ)教程上機(jī)指導(dǎo)與習(xí)題集(微課版)
- Hadoop集群與安全
- 新手學(xué)會(huì)計(jì)(2013-2014實(shí)戰(zhàn)升級(jí)版)
- SAS金融數(shù)據(jù)挖掘與建模:系統(tǒng)方法與案例解析
- 數(shù)據(jù)會(huì)說話:活用數(shù)據(jù)表達(dá)、說服與決策