Class: Caldera::Events::PlayerUpdateEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/caldera/events.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#playerObject (readonly)

Returns the value of attribute player.



91
92
93
# File 'lib/caldera/events.rb', line 91

def player
  @player
end

#positionObject (readonly)

Returns the value of attribute position.



91
92
93
# File 'lib/caldera/events.rb', line 91

def position
  @position
end

#timeObject (readonly)

Returns the value of attribute time.



91
92
93
# File 'lib/caldera/events.rb', line 91

def time
  @time
end