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.

Properties collapse

Instance Attribute Details

#timestampFloat (readonly)

Returns the timestamp of the acceleration event.

Returns:

  • (Float)

    the timestamp of the acceleration event.



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

def timestamp
  @timestamp
end

#xFloat (readonly)

Returns the x coordinate of the acceleration event.

Returns:

  • (Float)

    the x coordinate of the acceleration event.



508
509
510
# File 'doc/API_reference.rb', line 508

def x
  @x
end

#yFloat (readonly)

Returns the y coordinate of the acceleration event.

Returns:

  • (Float)

    the y coordinate of the acceleration event.



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

def y
  @y
end

#zFloat (readonly)

Returns the z coordinate of the acceleration event.

Returns:

  • (Float)

    the z coordinate of the acceleration event.



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

def z
  @z
end