Class: TF2Engineer
- Defined in:
- lib/steam/community/tf2/tf2_engineer.rb
Overview
Represents the stats for the Team Fortress 2 Engineer class for a specific user
Instance Attribute Summary collapse
-
#max_buildings_built ⇒ Fixnum
readonly
Returns the maximum number of buildings built by the player in a single life as an Engineer.
-
#max_sentry_kills ⇒ Fixnum
readonly
Returns the maximum number of enemies killed by sentry guns built by the player in a single life as an Engineer.
-
#max_teleports ⇒ Fixnum
readonly
Returns the maximum number of teammates teleported by teleporters built by the player in a single life as an Engineer.
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) ⇒ TF2Engineer
constructor
Creates a new instance of the Engineer class based on the given XML data.
Constructor Details
#initialize(class_data) ⇒ TF2Engineer
Creates a new instance of the Engineer class based on the given XML data
35 36 37 38 39 40 41 |
# File 'lib/steam/community/tf2/tf2_engineer.rb', line 35 def initialize(class_data) super class_data @max_buildings_built = class_data['ibuildingsbuilt'].to_i @max_teleports = class_data['inumteleports'].to_i @max_sentry_kills = class_data['isentrykills'].to_i end |
Instance Attribute Details
#max_buildings_built ⇒ Fixnum (readonly)
Returns the maximum number of buildings built by the player in a single life as an Engineer
18 19 20 |
# File 'lib/steam/community/tf2/tf2_engineer.rb', line 18 def max_buildings_built @max_buildings_built end |
#max_sentry_kills ⇒ Fixnum (readonly)
Returns the maximum number of enemies killed by sentry guns built by the player in a single life as an Engineer
24 25 26 |
# File 'lib/steam/community/tf2/tf2_engineer.rb', line 24 def max_sentry_kills @max_sentry_kills end |
#max_teleports ⇒ Fixnum (readonly)
Returns the maximum number of teammates teleported by teleporters built by the player in a single life as an Engineer
30 31 32 |
# File 'lib/steam/community/tf2/tf2_engineer.rb', line 30 def max_teleports @max_teleports end |