function Actor() {
	this.width = 1;
	this.height = 1;
	this.position = new Vector2D(0, 0);
	this.velocity = new Vector2D(0, 0);
	this.hitBox = new HitBox(0, 0, this.width, this.height);
	this.label = '';
	this.active = false;
	this.color = 'rgba(128, 128, 128, 255)';
	this.sprite;
	this.direction = 1;
	this.states = {
		"collidedH": false
	}
}

Actor.prototype.draw = function(ctx) {
	ctx.drawImage(this.sprite.src, this.sprite.x, this.sprite.y, this.sprite.w, this.sprite.h, this.position.x, this.position.y, this.width, this.height);
}

Actor.prototype.collides = function(actor) {
	var x1 = this.hitBox.x + this.hitBox.w + this.position.x;
	var y1 = this.hitBox.y + this.hitBox.h + this.position.y;
	var x2 = actor.hitBox.x + actor.hitBox.w + actor.position.x;
	var y2 = actor.hitBox.y + actor.hitBox.h + actor.position.y;
	
	var collided = !(x1 <= (actor.hitBox.x + actor.position.x) || x2 <= (this.hitBox.x + this.position.x) || y1 <= (actor.hitBox.y + actor.position.y) || y2 <= (this.hitBox.y + this.position.y));
	
	return collided;
}

Actor.prototype.getPosition = function() {
	return this.position;
}

Actor.prototype.setPosition = function(x, y) {
	this.position = new Vector2D(x, y);
	return this;
}

Actor.prototype.getPositionX = function() {
	return this.position.x;
}

Actor.prototype.setPositionX = function(value) {
	this.position.x = parseInt(value);
	return this;
}

Actor.prototype.stepPositionX = function(value) {
	this.position.x += parseInt(value);
	return this;
}

Actor.prototype.getPositionY = function() {
	return this.position.y;
}

Actor.prototype.setPositionY = function(value) {
	this.position.y = parseInt(value);
	return this;
}

Actor.prototype.stepPositionY = function(value) {
	this.position.y += parseInt(value);
	return this;
}

Actor.prototype.getVelocity = function() {
	return this.velocity;
}

Actor.prototype.setVelocity = function(x, y) {
	this.velocity = new Vector2D(x, y);
	return this;
}

Actor.prototype.getVelocityX = function() {
	return this.velocity.x;
}

Actor.prototype.setVelocityX = function(value) {
	this.velocity.x = value;
	return this;
}

Actor.prototype.stepVelocityX = function(value) {
	this.velocity.x += value;
	return this;
}

Actor.prototype.getVelocityY = function() {
	return this.velocity.y;
}

Actor.prototype.setVelocityY = function(value) {
	this.velocity.y = value;
	return this;
}

Actor.prototype.stepVelocityY = function(value) {
	this.velocity.y += value;
	return this;
}

