var Mobile = require('./mobile'); function PlayerCharacter(game) { this.inventory = []; this.maxInventory = 10; this.id = 0; this.mobile = null; this.init = function(mobileId, socketKey, playerData) { this.mobile = new Mobile(); this.mobile.id = mobileId; this.id = mobileId; this.mobile.socketKey = socketKey; this.mobile.name = "Player " + mobileId; for(var key in this.mobile) { if(playerData.hasOwnProperty(key)) { this.mobile[key] = playerData[key]; } } this.mobile.type = "player"; this.inventory = []; return this.mobile; }; this.update = function(delta, game) { }; }; module.exports = PlayerCharacter;