Class: TF2Spy
Overview
Represents the stats for the Team Fortress 2 Spy class for a specific user
Instance Attribute Summary collapse
-
#max_backstabs ⇒ Fixnum
readonly
Returns the maximum number enemies killed with a backstab by the player in a single life as a Spy.
-
#max_head_shots ⇒ Fixnum
readonly
Returns the head shots by the player in a single life as a Spy.
-
#max_health_leeched ⇒ Fixnum
readonly
Returns the maximum health leeched from enemies by the player in a single life as a Spy.
Attributes inherited from TF2Class
#max_buildings_destroyed, #max_captures, #max_damage, #max_defenses, #max_dominations, #max_kill_assists, #max_kills, #max_revenges, #max_score, #max_time_alive
Attributes included from GameClass
Instance Method Summary collapse
-
#initialize(class_data) ⇒ TF2Spy
constructor
Creates a new instance of the Spy class based on the given XML data.
Constructor Details
#initialize(class_data) ⇒ TF2Spy
Creates a new instance of the Spy class based on the given XML data
33 34 35 36 37 38 39 |
# File 'lib/steam/community/tf2/tf2_spy.rb', line 33 def initialize(class_data) super class_data @max_backstabs = class_data['ibackstabs'].to_i @max_head_shots = class_data['iheadshots'].to_i @max_health_leeched = class_data['ihealthpointsleached'].to_i end |
Instance Attribute Details
#max_backstabs ⇒ Fixnum (readonly)
Returns the maximum number enemies killed with a backstab by the player in a single life as a Spy
17 18 19 |
# File 'lib/steam/community/tf2/tf2_spy.rb', line 17 def max_backstabs @max_backstabs end |
#max_head_shots ⇒ Fixnum (readonly)
Returns the head shots by the player in a single life as a Spy
22 23 24 |
# File 'lib/steam/community/tf2/tf2_spy.rb', line 22 def max_head_shots @max_head_shots end |
#max_health_leeched ⇒ Fixnum (readonly)
Returns the maximum health leeched from enemies by the player in a single life as a Spy
28 29 30 |
# File 'lib/steam/community/tf2/tf2_spy.rb', line 28 def max_health_leeched @max_health_leeched end |