Class: NetEvent::Damage
- Inherits:
-
SnapEventBase
- Object
- SnapItemBase
- SnapEventBase
- NetEvent::Damage
- Defined in:
- lib/snapshot/events/damage.rb
Instance Attribute Summary collapse
-
#angle ⇒ Object
Returns the value of attribute angle.
-
#armor_amount ⇒ Object
Returns the value of attribute armor_amount.
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#health_ammount ⇒ Object
Returns the value of attribute health_ammount.
-
#self ⇒ Object
Returns the value of attribute self.
Attributes inherited from SnapEventBase
Attributes inherited from SnapItemBase
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hash_or_raw) ⇒ Damage
constructor
A new instance of Damage.
Methods inherited from SnapItemBase
#init_hash, #init_raw, #init_unpacker, #to_a, #to_h, #to_s, #validate
Constructor Details
#initialize(hash_or_raw) ⇒ Damage
Returns a new instance of Damage.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/snapshot/events/damage.rb', line 9 def initialize(hash_or_raw) @field_names = %i[ client_id angle health_ammount armor_amount self ] super end |
Instance Attribute Details
#angle ⇒ Object
Returns the value of attribute angle.
7 8 9 |
# File 'lib/snapshot/events/damage.rb', line 7 def angle @angle end |
#armor_amount ⇒ Object
Returns the value of attribute armor_amount.
7 8 9 |
# File 'lib/snapshot/events/damage.rb', line 7 def armor_amount @armor_amount end |
#client_id ⇒ Object
Returns the value of attribute client_id.
7 8 9 |
# File 'lib/snapshot/events/damage.rb', line 7 def client_id @client_id end |
#health_ammount ⇒ Object
Returns the value of attribute health_ammount.
7 8 9 |
# File 'lib/snapshot/events/damage.rb', line 7 def health_ammount @health_ammount end |
#self ⇒ Object
Returns the value of attribute self.
7 8 9 |
# File 'lib/snapshot/events/damage.rb', line 7 def self @self end |
Class Method Details
.match_type?(type) ⇒ Boolean
20 21 22 |
# File 'lib/snapshot/events/damage.rb', line 20 def self.match_type?(type) type == NETEVENTTYPE_DAMAGE end |