Class: SnapEventBase
- Inherits:
-
SnapItemBase
- Object
- SnapItemBase
- SnapEventBase
- Defined in:
- lib/snapshot/snap_event_base.rb
Direct Known Subclasses
NetEvent::Damage, NetEvent::Death, NetEvent::Explosion, NetEvent::HammerHit, NetEvent::SoundWorld, NetEvent::Spawn
Instance Attribute Summary collapse
-
#x ⇒ Object
readonly
Returns the value of attribute x.
-
#y ⇒ Object
readonly
Returns the value of attribute y.
Attributes inherited from SnapItemBase
Instance Method Summary collapse
-
#initialize(hash_or_raw) ⇒ SnapEventBase
constructor
A new instance of SnapEventBase.
Methods inherited from SnapItemBase
#init_hash, #init_raw, #init_unpacker, #to_a, #to_h, #to_s, #validate
Constructor Details
#initialize(hash_or_raw) ⇒ SnapEventBase
Returns a new instance of SnapEventBase.
9 10 11 12 13 |
# File 'lib/snapshot/snap_event_base.rb', line 9 def initialize(hash_or_raw) @field_names.prepend(:x) @field_names.prepend(:y) super end |
Instance Attribute Details
#x ⇒ Object (readonly)
Returns the value of attribute x.
7 8 9 |
# File 'lib/snapshot/snap_event_base.rb', line 7 def x @x end |
#y ⇒ Object (readonly)
Returns the value of attribute y.
7 8 9 |
# File 'lib/snapshot/snap_event_base.rb', line 7 def y @y end |