var Ritual = Ritual || {};

Ritual.Obstacle = function (game_state, position, properties) {
    "use strict";
    Ritual.Prefab.call(this, game_state, position, properties);
    //console.log(properties);	
	this.animations.add('burn');
	this.animations.play('burn', 10, true);
    this.game_state.game.physics.arcade.enable(this);
	//this.body.collideWorldBounds = true;
	//this.body.checkCollision.up = false;
	//this.body.checkCollision.down = true;
	this.lastHit = 0;
    this.body.velocity.x = 0;	
	this.body.immovable = true;
	this.body.setSize(16, 16, 0, 16);
	if(properties.texture == 'stone') {
		this.stone = true;
	}
	else {
		this.stone = false;
	}
    
    this.anchor.setTo(0.5);
};

Ritual.Obstacle.prototype = Object.create(Ritual.Prefab.prototype);
Ritual.Obstacle.prototype.constructor = Ritual.Obstacle;

Ritual.Obstacle.prototype.update = function () {
    "use strict";
	//this.body.velocity.x *= -1;
	return;
};