First update.
This commit is contained in:
33
Player.js
Normal file
33
Player.js
Normal file
@@ -0,0 +1,33 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Player = void 0;
|
||||
const DEFAULT_HP = 100;
|
||||
class Player {
|
||||
constructor(aName, aSocketId) {
|
||||
this.mCards = [];
|
||||
this.mStrength = 0;
|
||||
this.mStamina = 0;
|
||||
this.mAgile = 0;
|
||||
this.mAttack = 0;
|
||||
this.mDefener = 0;
|
||||
this.mHp = DEFAULT_HP;
|
||||
this.mPrepared = false;
|
||||
this.mCurrentEnemy = "";
|
||||
this.mIsResting = false;
|
||||
this.mRank = -1;
|
||||
this.mCharacterName = "";
|
||||
this.mPlayerName = aName;
|
||||
this.mSocketId = aSocketId;
|
||||
}
|
||||
setPlayerInfo(aStrength, aStamina, aAgile, aCards) {
|
||||
this.mStrength = aStrength;
|
||||
this.mStamina = aStamina;
|
||||
this.mAgile = aAgile;
|
||||
this.mCards = aCards;
|
||||
this.mPrepared = true;
|
||||
}
|
||||
setPlayerSocketId(aId) {
|
||||
this.mSocketId = aId;
|
||||
}
|
||||
}
|
||||
exports.Player = Player;
|
Reference in New Issue
Block a user