summaryrefslogtreecommitdiffstats
path: root/js-platformer/src/player.js
blob: e3520a550f1c893b50c359814e3476a9a1ef0ae2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
var Player = function() {
	this.texture = PIXI.Texture.fromImage("res/player.png");
	this.sprite = new PIXI.Sprite(this.texture);

	Engine.instance.addGameObject(this);
	this.initPosition();

	this.update = function() {
		//this.prototype.update.call(this);
	}

	return this;
}

Player.prototype = new GameObjectPrototype();

//create a player instance
Engine.player = new Player();