function Talkable(x, y, text) { Entity.call(this, x, y); this.graphic = new TiledGraphic(loader.get('tiles_player'), 16, 16, 0, 0); this.graphic.addTileName('standing', 0); this.graphic.currentTile = 'standing'; this.type = 'talkable'; this.setHitbox(0, 0, 16, 16); this.text = text; }
function Player(x, y) { Entity.call(this, x, y); this.col = 6; this.playertiles = new TiledGraphic(loader.get('player'),16,24); this.currentSprite = 0; this.keydown_delay = 0; this.keyheld = false; this.heldblocks = []; this.grabkey = true; this.throwkey = true; this.get_blocks_sound = new Sound(loader.get('get_blocks')); this.push_blocks_sound = new Sound(loader.get('push_blocks')); this.get_blocks_sound.audio.volume = 0.1; this.push_blocks_sound.audio.volume = 0.1; }
// ADD INITIAL STATE (entities, worlds, etc) HERE function Player(x, y) { Entity.call(this, x, y); this.graphic = new Graphic(loader.get('firefox')); }