var MyBitmapAlias = Spriteset_Map.prototype.createCharacters;
Spriteset_Map.prototype.createCharacters = function() {
if ($gameMap.mapId() == tankPos[0][2]){
this.sprite = new Sprite();
this.sprite.bitmap = ImageManager.loadCharacter('$Tank01');
this.sprite.setFrame(32, 32, 32, 32);
this.addChild(this.sprite);
// get player's coordinate
this.sprite.x = $gamePlayer.screenX() - ($gamePlayer.x - tankPos[0][0]) * 48 - 18;
this.sprite.y = $gamePlayer.screenY() - ($gamePlayer.y - tankPos[0][1]) * 48 + 12;
this.sprite.z = 2;
}
MyBitmapAlias.call(this);
};
var updateMyBitmap = Spriteset_Map.prototype.update;
Spriteset_Map.prototype.update = function() {
//If we wanted to spin the sprite constantly we'd do it
//here, like so.
this.sprite.x = $gamePlayer.screenX() - ($gamePlayer._realX - tankPos[0][0]) * 48 - 18;
this.sprite.y = $gamePlayer.screenY() - ($gamePlayer._realY - tankPos[0][1]) * 48 + 12;
this.sprite.z = 2;
updateMyBitmap.call(this);
};