aboutsummaryrefslogtreecommitdiffstats
path: root/src/gameobject.js
blob: 0b505539984b19564c3311a297f5c076be143a9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
function GameObject(texture) {
	this.texture = PIXI.Texture.fromImage("res/" + texture + ".png");
	this.sprite = new PIXI.Sprite(this.texture);

	this.initPosition();
	this.active = true;
	this.objectType = "gameobject";
}

GameObject.prototype.initPosition = function() {
	this.sprite.anchor.x = 0.5;
	this.sprite.anchor.y = 0.5;

	this.sprite.position.x = Settings.STAGE_WIDTH * 0.5;
	this.sprite.position.y = Settings.STAGE_HEIGHT * 0.5;
}

GameObject.prototype.update = function() {

}