Skip to content

Commit

Permalink
Fix up
Browse files Browse the repository at this point in the history
  • Loading branch information
lqc committed Apr 14, 2012
1 parent da709c1 commit 76c671b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 7 additions & 9 deletions client/src/battle_scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion client/src/world.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var gamejs = require("gamejs");
var gamejs = require("gamejs"), transform = require("gamejs/transform");

var sprites = exports.OBJECT_SPRITES = {
"cannonball": {
Expand Down

0 comments on commit 76c671b

Please sign in to comment.