Class: MG::Events::Acceleration

Inherits:
Object
  • Object
show all
Defined in:
doc/API_reference.rb

Overview

the device, usually from the Scene#on_accelerate method.

Instance Attribute Summary collapse

Instance Attribute Details

#timestampFloat (readonly)

Returns the timestamp of the acceleration event.

Returns:

  • (Float)

    the timestamp of the acceleration event.



519
520
521
# File 'doc/API_reference.rb', line 519

def timestamp
  @timestamp
end

#xFloat (readonly)

Returns the x coordinate of the acceleration event.

Returns:

  • (Float)

    the x coordinate of the acceleration event.



510
511
512
# File 'doc/API_reference.rb', line 510

def x
  @x
end

#yFloat (readonly)

Returns the y coordinate of the acceleration event.

Returns:

  • (Float)

    the y coordinate of the acceleration event.



513
514
515
# File 'doc/API_reference.rb', line 513

def y
  @y
end

#zFloat (readonly)

Returns the z coordinate of the acceleration event.

Returns:

  • (Float)

    the z coordinate of the acceleration event.



516
517
518
# File 'doc/API_reference.rb', line 516

def z
  @z
end