Changeset 84 for pycodeshooter/trunk/shooter
- Timestamp:
- 01/01/11 14:42:26 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pycodeshooter/trunk/shooter/system.js
r81 r84 21 21 "height": 0 22 22 }, 23 "message": null, 23 24 "boss": null, 24 25 "player": null, … … 96 97 } 97 98 99 function setMessage(elem, msg) { 100 if (elem) 101 elem.innerHTML = msg; 102 } 103 104 function addMessage(elem, msg) { 105 if (elem) 106 elem.innerHTML += msg; 107 } 108 98 109 99 110 /* … … 189 200 * Initializer 190 201 */ 191 function initGame(canvas, bossId, bossData, playerData) {202 function initGame(canvas, msg, bossId, bossData, playerData) { 192 203 System.screen.canvas = canvas; 204 System.message = msg; 193 205 System.screen.ctx = System.screen.canvas.getContext("2d"); 194 206 System.screen.width = System.screen.canvas.width; … … 252 264 var brrgs = new Array(); 253 265 254 debugMsgSet("ActionsIdx:");266 setMessage(System.message, "ActionsIdx:"); 255 267 256 268 for (i = 0; i < numAct; i++) { … … 258 270 acts.push(new EnemyActions[idx](new shot())); 259 271 260 debugMsgAdd(String(idx) + ",");261 } 262 263 debugMsgAdd("<br>");272 addMessage(System.message, String(idx) + ","); 273 } 274 275 addMessage(System.message, "<br>"); 264 276 265 277 for (i = 0; i < numBrrg; i++) { … … 267 279 var brrgCls = EnemyBarrages[idx]; 268 280 269 debugMsgAdd("BarragesIdx:" + String(idx) + " / BulletsIdx:"); 281 addMessage(System.message, 282 "BarragesIdx:" + String(idx) + " / BulletsIdx:"); 270 283 271 284 for (k = 0; k < numBlt; k++) { … … 283 296 ); 284 297 285 debugMsgAdd(String(iidx) + ",");298 addMessage(System.message, String(iidx) + ","); 286 299 } 287 300 288 debugMsgAdd("<br>");301 addMessage(System.message, "<br>"); 289 302 } 290 303
Note: See TracChangeset
for help on using the changeset viewer.