Permalink
Browse files

Fix up

  • Loading branch information...
1 parent da709c1 commit 76c671b189d61e18ba45ea9b209ce225d7e4fcae @lqc lqc committed Apr 14, 2012
Showing with 8 additions and 10 deletions.
  1. +7 −9 client/src/battle_scene.js
  2. +1 −1 client/src/world.js
View
@@ -30,11 +30,6 @@ var BattleScene = exports.BattleScene = function(director) {
/* predraw the background */
this.drawBackground();
-
- gamejs.draw.rect(this._surface_battle_bg,
- "#40ca40",
- new gamejs.Rect(0, this.height-100, this.width, 100)
- );
};
BattleScene.prototype.drawBackground = function() {
@@ -64,17 +59,20 @@ BattleScene.prototype.drawBackground = function() {
// draw ground
this._surface_battle_bg.blit(this.groundLeft,[0, this.height-96]);
this._surface_battle_bg.blit(this.groundRight,[this.width-528, this.height-96]);
- this._surface_battle_bg.blit(this._font.render("A"), [300, this.height-100]);
- this._surface_battle_bg.blit(this._font.render("B"), [this.width-300, this.height-100]);
+ // draw grass
+ this._surface_battle_bg.blit(this.grassImg, [0, this.height-75]);
+
+ //
+ this._surface_battle_bg.blit(this._font.render("A"), [200, this.height-60]);
+ this._surface_battle_bg.blit(this._font.render("B"), [this.width-200, this.height-60]);
// draw an example dwarf
this.dwarf = gamejs.image.load("./statics/images/dwarf.png");
this._surface_battle_bg.blit(this.dwarf, [100, this.height-200]);
this._surface_battle_bg.blit(this.dwarf, [180, this.height-200]);
this._surface_battle_bg.blit(this.dwarf, [240, this.height-200]);
- // draw grass
- this._surface_battle_bg.blit(this.grassImg, [0, this.height-75]);
+
}
BattleScene.prototype.handleEvent = function handleEvent(event) {
View
@@ -1,4 +1,4 @@
-var gamejs = require("gamejs");
+var gamejs = require("gamejs"), transform = require("gamejs/transform");
var sprites = exports.OBJECT_SPRITES = {
"cannonball": {

0 comments on commit 76c671b

Please sign in to comment.