Class: Caldera::Events::PlayerUpdateEvent
- Inherits:
-
Object
- Object
- Caldera::Events::PlayerUpdateEvent
- Defined in:
- lib/caldera/events.rb
Instance Attribute Summary collapse
-
#player ⇒ Object
readonly
Returns the value of attribute player.
-
#position ⇒ Object
readonly
Returns the value of attribute position.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize(data, player) ⇒ PlayerUpdateEvent
constructor
A new instance of PlayerUpdateEvent.
Constructor Details
#initialize(data, player) ⇒ PlayerUpdateEvent
Returns a new instance of PlayerUpdateEvent.
93 94 95 96 97 |
# File 'lib/caldera/events.rb', line 93 def initialize(data, player) @player = player @time = Time.at(data['time']) @position = data['position'] end |
Instance Attribute Details
#player ⇒ Object (readonly)
Returns the value of attribute player.
91 92 93 |
# File 'lib/caldera/events.rb', line 91 def player @player end |
#position ⇒ Object (readonly)
Returns the value of attribute position.
91 92 93 |
# File 'lib/caldera/events.rb', line 91 def position @position end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
91 92 93 |
# File 'lib/caldera/events.rb', line 91 def time @time end |