PsyOps

BGPlayer

May 22nd, 2014
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.25 KB | None | 0 0
  1.     private class BGPlayer
  2.     {
  3.         public BGPlayer(String PlayerName)
  4.         {
  5.             this.m_PlayerName = PlayerName;
  6.         }
  7.        
  8.         private String m_PlayerName;
  9.         public  String getPlayerName(){ return m_PlayerName; }
  10.        
  11.         private int m_CapturedFlags = 0;
  12.         public int getCapturedFlags(){  return this.m_CapturedFlags;}
  13.        
  14.         private int m_Multi = 0;
  15.         private long m_KillTimestamp = System.currentTimeMillis();
  16.        
  17.         private int m_Kills = 0;
  18.         public int getKills(){ return this.m_Kills;}
  19.         public void KilledPlayer()
  20.         {
  21.             // add player kills
  22.             this.m_Kills += 1;
  23.             // check for multikill
  24.             if (System.currentTimeMillis() - m_KillTimestamp < 1000)
  25.             {
  26.                 m_Multi+=1;
  27.             }
  28.             else
  29.             {
  30.                 m_Multi = 1;
  31.             }
  32.            
  33.             // update kill timestamp
  34.             m_KillTimestamp = System.currentTimeMillis();
  35.         }
  36.        
  37.         private int m_Deaths = 0;
  38.         public int getDeaths(){ return this.m_Deaths;}
  39.         public void Died(){ this.m_Deaths += 1;}
  40.        
  41.         private int m_DamageDealt = 0;
  42.         public int getDamageDealt() {   return this.m_DamageDealt;  }
  43.         public void dealtDamage(int Damage) { this.m_DamageDealt += Damage;}
  44.        
  45.         private int m_DamageTaken = 0;
  46.         public int getDamageTaken() {   return this.m_DamageTaken;  }
  47.         public void tookDamage(int Damage) { this.m_DamageTaken += Damage;}
  48.     }
Advertisement
Add Comment
Please, Sign In to add comment