Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private class BGPlayer
- {
- public BGPlayer(String PlayerName)
- {
- this.m_PlayerName = PlayerName;
- }
- private String m_PlayerName;
- public String getPlayerName(){ return m_PlayerName; }
- private int m_CapturedFlags = 0;
- public int getCapturedFlags(){ return this.m_CapturedFlags;}
- private int m_Multi = 0;
- private long m_KillTimestamp = System.currentTimeMillis();
- private int m_Kills = 0;
- public int getKills(){ return this.m_Kills;}
- public void KilledPlayer()
- {
- // add player kills
- this.m_Kills += 1;
- // check for multikill
- if (System.currentTimeMillis() - m_KillTimestamp < 1000)
- {
- m_Multi+=1;
- }
- else
- {
- m_Multi = 1;
- }
- // update kill timestamp
- m_KillTimestamp = System.currentTimeMillis();
- }
- private int m_Deaths = 0;
- public int getDeaths(){ return this.m_Deaths;}
- public void Died(){ this.m_Deaths += 1;}
- private int m_DamageDealt = 0;
- public int getDamageDealt() { return this.m_DamageDealt; }
- public void dealtDamage(int Damage) { this.m_DamageDealt += Damage;}
- private int m_DamageTaken = 0;
- public int getDamageTaken() { return this.m_DamageTaken; }
- public void tookDamage(int Damage) { this.m_DamageTaken += Damage;}
- }
Advertisement
Add Comment
Please, Sign In to add comment