Class: NetObj::Laser
- Inherits:
-
SnapItemBase
- Object
- SnapItemBase
- NetObj::Laser
- Defined in:
- lib/snapshot/items/laser.rb
Instance Attribute Summary collapse
-
#from_x ⇒ Object
Returns the value of attribute from_x.
-
#from_y ⇒ Object
Returns the value of attribute from_y.
-
#start_tick ⇒ Object
Returns the value of attribute start_tick.
-
#x ⇒ Object
Returns the value of attribute x.
-
#y ⇒ Object
Returns the value of attribute y.
Attributes inherited from SnapItemBase
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hash_or_raw) ⇒ Laser
constructor
A new instance of Laser.
Methods inherited from SnapItemBase
#init_hash, #init_raw, #init_unpacker, #to_a, #to_h, #to_s, #validate
Constructor Details
#initialize(hash_or_raw) ⇒ Laser
Returns a new instance of Laser.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/snapshot/items/laser.rb', line 9 def initialize(hash_or_raw) @field_names = i[ x y from_x from_y start_tick ] super end |
Instance Attribute Details
#from_x ⇒ Object
Returns the value of attribute from_x.
7 8 9 |
# File 'lib/snapshot/items/laser.rb', line 7 def from_x @from_x end |
#from_y ⇒ Object
Returns the value of attribute from_y.
7 8 9 |
# File 'lib/snapshot/items/laser.rb', line 7 def from_y @from_y end |
#start_tick ⇒ Object
Returns the value of attribute start_tick.
7 8 9 |
# File 'lib/snapshot/items/laser.rb', line 7 def start_tick @start_tick end |
#x ⇒ Object
Returns the value of attribute x.
7 8 9 |
# File 'lib/snapshot/items/laser.rb', line 7 def x @x end |
#y ⇒ Object
Returns the value of attribute y.
7 8 9 |
# File 'lib/snapshot/items/laser.rb', line 7 def y @y end |
Class Method Details
.match_type?(type) ⇒ Boolean
20 21 22 |
# File 'lib/snapshot/items/laser.rb', line 20 def self.match_type?(type) type == NETOBJTYPE_LASER end |