Platformer.htm 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975
  1. <html xmlns:MSHelp="http://msdn.microsoft.com/mshelp" xmlns:ngmsxsl="urn:schemas-microsoft-com:xslt" xmlns:xanx="http://schemas.microsoft.com/developer/xanx/2005"><head>
  2. <title>Platformer</title>
  3. <META http-equiv="Content-Type" content="text/html; charset=utf-8"><META NAME="save" CONTENT="history"><title>Platformer</title>
  4. <style><!--
  5. /***********************************************************
  6. * SCRIPT-SUPPORTING STYLES
  7. ***********************************************************/
  8. /* Defines the userData cache persistence mechanism. */
  9. .userDataStyle
  10. {
  11. behavior: url(#default#userData);
  12. }
  13. /* Used to save the scroll bar position when navigating away from a page. */
  14. div.saveHistory
  15. {
  16. behavior: url(#default#saveHistory);
  17. }
  18. /* Formats the expand/collapse images for all collapsible regions. */
  19. img.toggle
  20. {
  21. border: 0;
  22. margin-right: 5;
  23. }
  24. /* Formats the Language filter drop-down image. */
  25. img#languageFilterImage
  26. {
  27. border: 0;
  28. margin-left: 0;
  29. vertical-align: middle;
  30. }
  31. /* Formats the Members Options filter drop-down image. */
  32. img#membersOptionsFilterImage
  33. {
  34. border: 0;
  35. margin-left: 0;
  36. vertical-align: middle;
  37. }
  38. /* Formats the Collapse All/Expand All images. */
  39. img#toggleAllImage
  40. {
  41. margin-left: 0;
  42. vertical-align: middle;
  43. }
  44. /* Supports XLinks */
  45. MSHelp\:link
  46. {
  47. text-decoration: underline;
  48. color: #0000ff;
  49. hoverColor: #3366ff;
  50. filterString: ;
  51. }
  52. body
  53. {
  54. background: #FFFFFF;
  55. color: #000000;
  56. font-family: Verdana;
  57. font-size: medium;
  58. font-style: normal;
  59. font-weight: normal;
  60. margin-top: 0;
  61. margin-bottom: 0;
  62. margin-left: 0;
  63. margin-right: 0;
  64. width: 100%;
  65. /*font-size: 110%;*/
  66. }
  67. div.section
  68. {
  69. margin-left: 15px;
  70. }
  71. div.hxnx5
  72. {
  73. margin-left: 1.5em;
  74. }
  75. /* Font for all headings */
  76. h1, h2, h3, h4, h5, h6
  77. {
  78. font-family: Verdana, Arial, Helvetica, sans-serif;
  79. margin-top: 18;
  80. margin-bottom: 8;
  81. font-weight: bold;
  82. }
  83. h1
  84. {
  85. font-size: 130%;
  86. color: #003399;
  87. }
  88. div#scrollyes h1 /* Changes font size for full-scrolling topic */
  89. {
  90. font-size: 150%;
  91. }
  92. h2
  93. {
  94. font-size: 125%;
  95. }
  96. h3
  97. {
  98. font-size: 115%;
  99. margin-top: 9;
  100. margin-bottom: 4;
  101. }
  102. h4
  103. {
  104. font-size: 115%;
  105. margin-top: 9;
  106. margin-bottom: 4;
  107. }
  108. h5
  109. {
  110. font-size: 100%;
  111. margin-top: 9;
  112. margin-bottom: 4;
  113. }
  114. h6
  115. {
  116. font-size: 100%;
  117. margin-top: 9;
  118. margin-bottom: 4;
  119. }
  120. ul p, ol p, dl p
  121. {
  122. margin-left: 0em;
  123. }
  124. p
  125. {
  126. margin-top: .6em;
  127. margin-bottom: .6em;
  128. }
  129. td p
  130. {
  131. margin-top: 0.0em;
  132. margin-bottom: 0.6em;
  133. }
  134. dd p
  135. {
  136. margin-top: 0.0em;
  137. margin-bottom: 0.6em;
  138. }
  139. .image
  140. {
  141. text-align: center;
  142. }
  143. dl
  144. {
  145. margin-top: 0em;
  146. margin-bottom: 1.3em;
  147. }
  148. dd
  149. {
  150. margin-bottom: 0em;
  151. margin-left: 0;
  152. }
  153. dl.glossary dd
  154. {
  155. margin-bottom: 0em;
  156. margin-left: 1.5em;
  157. }
  158. dt
  159. {
  160. margin-top: .6em;
  161. margin-bottom: 1;
  162. }
  163. ul, ol
  164. {
  165. margin-top: 0.6em;
  166. margin-bottom: 0.6em;
  167. }
  168. ol
  169. {
  170. margin-left: 2.5em;
  171. }
  172. ul
  173. {
  174. list-style-type: disc;
  175. margin-left: 1.9em;
  176. }
  177. li
  178. {
  179. margin-bottom: 0.4em;
  180. }
  181. ul ol, ol ol
  182. {
  183. list-style-type: lower-alpha;
  184. }
  185. pre
  186. {
  187. margin-top: .6em;
  188. margin-bottom: .6em;
  189. }
  190. pre
  191. {
  192. font: 105% Lucida, mono;
  193. color: #000066;
  194. }
  195. code
  196. {
  197. font-family: Monospace, Courier New, Courier;
  198. font-size: 105%;
  199. color: #000066;
  200. }
  201. table.userdata td
  202. {
  203. background: #ffffff;
  204. background-color: #F5F5F5;
  205. border-color: #ffffff;
  206. border: none;
  207. }
  208. table.clsWarning
  209. {
  210. background: #ffffff;
  211. padding: 0px;
  212. margin: 0px;
  213. border: none;
  214. }
  215. table.clsWarning td
  216. {
  217. padding: 0px;
  218. margin: 0px;
  219. background: #ffffff;
  220. vertical-align: middle;
  221. font-size: 70%;
  222. }
  223. div#mainSection table
  224. {
  225. width: 98%;
  226. background: #ffffff;
  227. margin-top: 5px;
  228. margin-bottom: 5px;
  229. }
  230. div#mainSection table th
  231. {
  232. padding: 5px 6px;
  233. background: #EFEFF7;
  234. text-align: left;
  235. font-size: 70%;
  236. vertical-align: bottom;
  237. border-bottom: 1px solid #C8CDDE;
  238. }
  239. div#mainSection table td
  240. {
  241. padding: 5px 5px;
  242. background: #F7F7FF;
  243. vertical-align: top;
  244. font-size: 70%;
  245. border-bottom: 1px solid #D5D5D3;
  246. }
  247. div#syntaxCodeBlocks table th
  248. {
  249. padding: 1px 6px;
  250. color: #000066;
  251. }
  252. div#syntaxCodeBlocks table td
  253. {
  254. padding: 1px 5px;
  255. }
  256. /* Applies to the running header text in the first row of the upper table in the
  257. non-scrolling header region. */
  258. span#runningHeaderText
  259. {
  260. color: #003399;
  261. font-size: 90%;
  262. padding-left: 13;
  263. }
  264. /* Applies to the topic title in the second row of the upper table in the
  265. non-scrolling header region. */
  266. span#nsrTitle
  267. {
  268. color: #003399;
  269. font-size: 120%;
  270. font-weight: 600;
  271. padding-left: 13;
  272. }
  273. /* Applies to everything below the non-scrolling header region. */
  274. div#mainSection
  275. {
  276. font-size: 70%;
  277. width: 100%;
  278. }
  279. /* Applies to everything below the non-scrolling header region, minus the footer. */
  280. div#mainBody
  281. {
  282. font-size: 90%;
  283. margin-left: 15;
  284. margin-top: 10;
  285. padding-bottom: 20;
  286. }
  287. /* Adds right padding for all blocks in mainBody */
  288. div#mainBody p, div#mainBody ol, div#mainBody ul, div#mainBody dl
  289. {
  290. padding-right: 5;
  291. }
  292. div#mainBody div.alert, div#mainBody div.code, div#mainBody div.tableSection
  293. {
  294. width:98.9%;
  295. }
  296. div.alert p, div.code p
  297. {
  298. margin-top:5;
  299. margin-bottom:8;
  300. }
  301. /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Begin Note Styles - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
  302. div#mainSection div.alert table
  303. {
  304. border: 0;
  305. }
  306. div#mainSection div.alert table th
  307. {
  308. padding-top: 0;
  309. padding-bottom: 0;
  310. padding-left: 5;
  311. padding-right: 5;
  312. }
  313. div#mainSection div.alert table td
  314. {
  315. padding-left: 5;
  316. padding-right: 5;
  317. }
  318. img.note
  319. {
  320. border: 0;
  321. margin-left: 0;
  322. margin-right: 3;
  323. }
  324. /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - End Note Styles - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
  325. /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Begin Non-scrolling Header Region Styles - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
  326. /* Applies to the entire non-scrolling header region. */
  327. div#header
  328. {
  329. background-color: #D4DFFF;
  330. padding-top: 0;
  331. padding-bottom: 0;
  332. padding-left: 0;
  333. padding-right: 0;
  334. width: 100%;
  335. }
  336. /* Applies to both tables in the non-scrolling header region. */
  337. div#header table
  338. {
  339. margin-top: 0;
  340. margin-bottom: 0;
  341. border-bottom-color: #C8CDDE;
  342. border-bottom-style: solid;
  343. border-bottom-width: 1;
  344. background: #D4DFFF;
  345. width: 100%;
  346. }
  347. /* Applies to cells in both tables in the non-scrolling header region. */
  348. div#header table td
  349. {
  350. color: #0000FF;
  351. font-size: 70%;
  352. padding-right: 20;
  353. padding-top: 1;
  354. padding-bottom: 1;
  355. border: none;
  356. background: #D4DFFF;
  357. }
  358. /* Applies to the last row in the upper table of the non-scrolling header region. Text
  359. in this row includes See Also, Constructors, Methods, and Properties. */
  360. div#header table tr#headerTableRow3 td
  361. {
  362. padding-bottom: 2;
  363. padding-top: 5;
  364. padding-left: 15;
  365. }
  366. /* Applies to the lower table in the non-scrolling header region. Text in this table
  367. includes Collapse All/Expand All, Language Filter, and Members Options. */
  368. div#header table#bottomTable
  369. {
  370. border-top-color: #FFFFFF;
  371. border-top-style: solid;
  372. border-top-width: 1;
  373. text-align: left;
  374. padding-left: 15;
  375. }
  376. blockquote
  377. {
  378. margin-left: 3.8em;
  379. margin-right: 3.8em;
  380. margin-top: .6em;
  381. margin-bottom: .6em;
  382. }
  383. sup
  384. {
  385. text-decoration: none;
  386. font-size: smaller;
  387. }
  388. a:link
  389. {
  390. color: #0000FF;
  391. /* font-weight: bold */
  392. }
  393. a:visited
  394. {
  395. color: #0000AA;
  396. /* font-weight: bold */
  397. }
  398. a:hover
  399. {
  400. color: #3366FF;
  401. /* font-weight: bold */
  402. }
  403. .label
  404. {
  405. font-weight: bold;
  406. margin-top: 1em;
  407. margin-left: -26px;
  408. }
  409. .tl
  410. {
  411. margin-bottom: .75em;
  412. }
  413. .atl
  414. {
  415. padding-left: 1.5em;
  416. padding-bottom: .75em;
  417. }
  418. .cfe
  419. {
  420. font-weight: bold;
  421. }
  422. .mini
  423. {
  424. font-size: smaller;
  425. }
  426. .dt
  427. {
  428. margin-bottom: -.6em;
  429. }
  430. .indent
  431. {
  432. margin-left: 1.9em;
  433. margin-right: 1.9em;
  434. }
  435. .product
  436. {
  437. text-align: right;
  438. color: #333333;
  439. font-size: smaller;
  440. font-style: italic;
  441. }
  442. .buttonbarshade
  443. {
  444. position: relative;
  445. margin: 0;
  446. left: 0px;
  447. top: 2;
  448. width: 50%;
  449. height: 40px;
  450. }
  451. .buttonbartable
  452. {
  453. position: absolute;
  454. margin: 0;
  455. padding:0;
  456. border:0;
  457. left:0px;
  458. top: 2;
  459. width: 100%;
  460. height: 40px;
  461. }
  462. /* background color, font for header */
  463. table.buttonbartable td, table.buttonbarshade td
  464. {
  465. background: #ffffff; /*#5177B8; #80C615;*/
  466. border-left: 0px solid #80C615;
  467. margin: 0;
  468. padding: 0px 0px 0px 0px;
  469. font-family: Impact, sans-serif;
  470. font-size: 14pt;
  471. }
  472. table.buttonbartable td.button1
  473. {
  474. background: #5177B8; /*#80C615;*/;
  475. padding: 0;
  476. font-weight: bold;
  477. text-align: center;
  478. cursor: hand;
  479. }
  480. table.buttonbartable td.button2
  481. {
  482. background: #5177B8; /*#80C615;*/;
  483. font-weight: bold;
  484. text-align: center;
  485. }
  486. table.buttonbartable td.button3
  487. {
  488. background: #5177B8; /*#80C615;*/;
  489. font-weight: bold;
  490. text-align: center;
  491. }
  492. table.buttonbartable td.runninghead
  493. {
  494. padding-left: 0px;
  495. font-style: italic;
  496. text-align: left;
  497. }
  498. .version
  499. {
  500. text-align: left;
  501. color: #000000;
  502. margin-top: 3em;
  503. margin-left: -26px;
  504. font-size: smaller;
  505. font-style: italic;
  506. }
  507. .lang, .ilang
  508. {
  509. color: #0000ff;
  510. font: normal 7pt Arial, Helvetica, sans-serif;
  511. }
  512. div.langMenu
  513. {
  514. position: absolute;
  515. z-index: 1;
  516. width: 96pt;
  517. padding: 8pt;
  518. visibility: hidden;
  519. border: 1px solid #000000;
  520. background: #ffffd0;
  521. }
  522. div.langMenu ul
  523. {
  524. padding-left: 2em;
  525. margin-left: 0;
  526. }
  527. div.filtered
  528. {
  529. margin: 4pt 0 8pt -26px;
  530. padding: 4px 4px 8px 26px;
  531. width: 100%;
  532. border: 2px solid #aaaacc;
  533. background: #ffffff;
  534. }
  535. div.filtered2
  536. {
  537. margin: 4pt 0 8pt -26px;
  538. padding: 4px 4px 8px 26px;
  539. width: 100%;
  540. border: none;
  541. background: #ffffff;
  542. }
  543. div.filtered h1, div.filtered h2, div.filtered h3, div.filtered h4
  544. {
  545. margin-left: -22px;
  546. }
  547. div.filtered span.lang
  548. {
  549. position: relative;
  550. left: -22px;
  551. }
  552. div.reftip
  553. {
  554. position: absolute;
  555. z-index: 1;
  556. padding: 8pt;
  557. visibility: hidden;
  558. border: 1px solid #000000;
  559. background: #ffffd0;
  560. }
  561. a.synParam
  562. {
  563. color: #0000FF;
  564. /*color: #3F7800;*/
  565. /*color: #8DC54F;*/
  566. text-decoration: none;
  567. font-weight: normal;
  568. }
  569. a.synParam:hover
  570. {
  571. text-decoration: underline;
  572. font-weight: normal;
  573. }
  574. div.sapop
  575. {
  576. position: absolute;
  577. z-index: 1;
  578. left: 26px;
  579. width: 100%;
  580. padding: 10px 10px 10px 36px;
  581. visibility: hidden;
  582. border: 1px solid #000000;
  583. background: #ffffd0;
  584. }
  585. div.footer
  586. {
  587. width: 100%;
  588. border: none;
  589. background: #ffffff;
  590. margin-top: 18pt;
  591. padding-bottom: 12pt;
  592. color: #0000FF;
  593. /*color: #228B22; */
  594. text-align: center;
  595. font-size: 76%;
  596. }
  597. div.preliminary
  598. {
  599. margin-top: 8pt;
  600. padding-bottom: 12pt;
  601. color: #A0A0A0;
  602. }
  603. /* A procedure section. eg. 'To create a file', 'To add a value' */
  604. div.proc
  605. {
  606. margin-left: 0.5em;
  607. }
  608. /* The title of a 'procedure' section. */
  609. div.proc h3
  610. {
  611. font-family: Verdana, Arial, Helvetica, sans-serif;
  612. font-weight: bold;
  613. font-size: 115%;
  614. margin-top: 1em;
  615. margin-bottom: 0.4em;
  616. margin-left: -0.5em;
  617. color: #003399;
  618. }
  619. div.proc ul
  620. {
  621. margin-left: 1.5em;
  622. }
  623. div.proc ol
  624. {
  625. margin-left: 2.0em;
  626. }
  627. .note
  628. {
  629. margin-left: 14pt;
  630. margin-right: 12pt;
  631. }
  632. .indent1
  633. {
  634. margin-left: 12pt;
  635. }
  636. .indent2
  637. {
  638. margin-left: 24pt;
  639. }
  640. .indent3
  641. {
  642. margin-left: 36pt;
  643. }
  644. p.proch
  645. {
  646. padding-left: 16px;
  647. }
  648. p.proch img
  649. {
  650. position: relative;
  651. vertical-align: top;
  652. left: -18px;
  653. margin-right: -14px;
  654. margin-bottom: -18px;
  655. }
  656. div.clsPlatSpec
  657. {
  658. background-color:#FFF8DC;
  659. border-style:solid;
  660. border-width:1pt 0pt 0pt 1pt;
  661. border-color:#ffE4C4;
  662. margin-top:0.6em;
  663. width:100%;
  664. }
  665. /* Applies to the language labels in the Language Filter drop-down list. */
  666. .languageFilter
  667. {
  668. color: #0000FF;
  669. cursor:hand;
  670. text-decoration:underline;
  671. padding-bottom:4;
  672. }
  673. /* Dropdown areas */
  674. #languageSpan {
  675. position: absolute;
  676. visibility: hidden;
  677. border-style: solid;
  678. border-width: 1px;
  679. border-color: #C8CDDE;
  680. background: #d4dfff;
  681. padding: 4px;
  682. font-size: 70%;
  683. }
  684. #membersOptionsSpan {
  685. position: absolute;
  686. visibility: hidden;
  687. border-style: solid;
  688. border-width: 1px;
  689. border-color: #C8CDDE;
  690. background: #d4dfff;
  691. padding: 4px;
  692. font-size: 70%;
  693. }
  694. --></style>
  695. <xml>
  696. <MSHelp:TOCTitle Title="Platformer" />
  697. <MSHelp:RLTitle Title="Platformer" />
  698. <MSHelp:Keyword Index="A" Term="O:Microsoft.Xna.Platformer" />
  699. <MSHelp:Keyword Index="A" Term="ff347d3f-59a6-7e3f-1f3b-a7d123932524" />
  700. <MSHelp:Keyword Index="K" Term="Platformer" />
  701. <MSHelp:Attr Name="ProjType" Value="LocalProj" />
  702. <MSHelp:Attr Name="ProjType" Value="XNA" />
  703. <MSHelp:Attr Name="DocSet" Value="XNA" />
  704. <MSHelp:Attr Name="DocSet" Value="ExpressLibVS" />
  705. <MSHelp:Attr Name="DocSet" Value="C#" />
  706. <MSHelp:Attr Name="Locale" Value="en-us" />
  707. <MSHelp:Attr Name="AssetID" Value="ff347d3f-59a6-7e3f-1f3b-a7d123932524" />
  708. <MSHelp:Attr Name="TopicType" Value="kbOrient" />
  709. </xml>
  710. </head><body><div id="mainSection"><div id="mainBody">
  711. <h1>Platformer</h1>
  712. <p>The Platformer Starter Kit is a near-complete, self-contained game solution that includes both game code and game assets. The game is a standard 2D platformer with levels, enemies, and collectable gems.</p>
  713. <p>This starter kit is intentionally incomplete. Several nonessential features and systems are not finished. This makes it easier and quicker to understand the structure of the game, and how the pieces fit together to provide a rich gaming experience. The Platformer Starter Kit includes the following features:<br></p>
  714. <ul>
  715. <li>Cross-platform support for Windows, Windows Phone, and Xbox 360.</li>
  716. <li>Control of the player character using either the keyboard or gamepad.</li>
  717. <li>Simple physics modeling (falling and jumping) and dynamic collision checking.</li>
  718. <li>Production-level sprite sheets, sound effects, and other game assets.</li>
  719. <li>High and low resolution assets, and an additional content project containing audio assets.</li>
  720. </ul>
  721. <br>
  722. <table>
  723. <tr>
  724. <th>Action</th>
  725. <th>Keyboard</th>
  726. <th>Gamepad</th>
  727. <th>Windows Phone</th>
  728. </tr>
  729. <tr>
  730. <td>Run left, Run right</td>
  731. <td>A, D</td>
  732. <td>Left thumbstick or analog D-pad</td>
  733. <td><strong>TILT</strong> device</td>
  734. </tr>
  735. <tr>
  736. <td>Jump</td>
  737. <td>Space</td>
  738. <td>
  739. <ui><strong>A</strong></ui>
  740. </td>
  741. <td><strong>TAP</strong></td>
  742. </tr>
  743. <tr>
  744. <td>Exit Game</td>
  745. <td><strong>ESC</strong> or <strong>ALT+F4</strong></td>
  746. <td>
  747. <strong>BACK</strong></td>
  748. <td><strong>BACK</strong></td>
  749. </tr>
  750. </table>
  751. <title>Platformer Code Architecture</title>
  752. <p>The following is a list of classes shipped with the Platformer starter kit. The file containing the implementation for each class shares the name of the class. For example, Gem.cs contains the <icode>Gem</icode> class implementation.</p>
  753. <table>
  754. <tr>
  755. <th>Name</th>
  756. <th>Description</th>
  757. </tr>
  758. <tr>
  759. <td>Gem</td>
  760. <td>
  761. <p>Implements a floating gem in the game. Gems are collectable by the player, and are worth a set amount of points.</p>
  762. <p>
  763. Gems are used to load, draw, and update a gem.</p>
  764. </td>
  765. </tr>
  766. <tr>
  767. <td>Circle (structure)</td>
  768. <td>
  769. Implements a bounding circle for checking collision against gem
  770. objects.
  771. </td>
  772. </tr>
  773. <tr>
  774. <td>Tile (structure)</td>
  775. <td>
  776. Stores basic information about a game tile.<a a="O:Microsoft.Xna.PlatformerSK_BasicFeatures"/>
  777. </td>
  778. </tr>
  779. <tr>
  780. <td>TileCollision (enumeration)</td>
  781. <td>
  782. Stores the different collision types a tile can have: Passable,
  783. Impassable, Platform.</td>
  784. </tr>
  785. <tr>
  786. <td>AnimationPlayer (structure)</td>
  787. <td>
  788. <p>
  789. Implements playback of the animation stored by <icode>Animation</icode>.
  790. </p>
  791. <p>
  792. &nbsp;</p>
  793. </td>
  794. </tr>
  795. <tr>
  796. <td>Animation</td>
  797. <td>
  798. <p>Stores an animated texture. Used to animate the player character and enemy sprite sheets.</p>
  799. <p>
  800. &nbsp;</p>
  801. </td>
  802. </tr>
  803. <tr>
  804. <td>Enemy</td>
  805. <td>
  806. <p>Implements an enemy in the game. Used to load, draw, and update an enemy.</p>
  807. <p>
  808. &nbsp;</p>
  809. </td>
  810. </tr>
  811. <tr>
  812. <td>FaceDirection (enumeration)</td>
  813. <td>
  814. Stores the different directions an enemy can face.</td>
  815. </tr>
  816. <tr>
  817. <td>PlatformerGame</td>
  818. <td>
  819. <p>Implements major game components such as content and level loading, HUD management and display, and game object updating.</p>
  820. <p>
  821. &nbsp;</p>
  822. </td>
  823. </tr>
  824. <tr>
  825. <td>Level</td>
  826. <td>
  827. <p>
  828. Implements a level in the game. A <icode>Level</icode> object contains a multi-dimensional array of tiles, a player character, a start and end location, point total, remaining level time, a list of gems, and a list of enemies.
  829. </p>
  830. <p>
  831. &nbsp;</p>
  832. </td>
  833. </tr>
  834. <tr>
  835. <td>Player</td>
  836. <td>
  837. <p>Implements the player character. Used to load, draw, and update the character.</p>
  838. <p>
  839. &nbsp;</p>
  840. </td>
  841. </tr>
  842. <tr>
  843. <td>RectangleExtensions</td>
  844. <td>
  845. Implements an extension to the standard XNA Framework structure <a a="T:Microsoft.Xna.Framework.Rectangle">Rectangle</a>.</td>
  846. </tr>
  847. </table>
  848. <title>Execution Flow</title>
  849. <p>Think of the execution flow of Platformer as follows:</p>
  850. <ol>
  851. <li>
  852. The next level is loaded. Important methods are <icode>PlatformerGame.LoadContent</icode> and <icode>PlatformerGame.LoadNextLevel</icode>.
  853. </li>
  854. <li>
  855. The game is updated using <icode>PlatformerGame.Update</icode> and <icode>Level.Update</icode>. If the player is dead or if time has expired, input is ignored and the game is in a pause state. If the player has reached the exit, the remaining time is converted to points. If there is still time and the player hasn't reached the exit location, the time remaining is decremented and all level objects are updated (player character, enemies, gems, and so on) using their <icode>Update</icode> methods. At this time, checks are also made for the player reaching the exit and falling off the edge of the screen.
  856. </li>
  857. <li>
  858. <p>
  859. The gameplay screen is drawn using <icode>PlatformerGame.Draw</icode>. This method, in turn, calls <icode>Level.Draw</icode> and <icode>PlatformerGame.DrawHud</icode>.
  860. </p>
  861. <p>
  862. <icode>Level.Draw</icode> is responsible for drawing the tiles, player character, gems and enemies using calls to the <icode>Draw</icode> method of each previously-mentioned game object.
  863. </p>
  864. </li>
  865. </ol>
  866. </section>
  867. </div><div class="footer" id="footer"><p>© 2010 Microsoft Corporation. All rights reserved.<br>Send feedback to
  868. <a href="mailto:[email protected]?subject=Documentation Feedback: Platformer">
  869. [email protected]</a>.</p></div></div></body></html>