Class: MG::Events::Acceleration
- Inherits:
-
Object
- Object
- MG::Events::Acceleration
- Defined in:
- motion-game
Overview
This class represents an event received from the accelerometer sensor of the device, usually from the Scene#on_accelerate method.
Properties (collapse)
-
- (Float) timestamp
readonly
The timestamp of the acceleration event.
-
- (Float) x
readonly
The x coordinate of the acceleration event.
-
- (Float) y
readonly
The y coordinate of the acceleration event.
-
- (Float) z
readonly
The z coordinate of the acceleration event.
Instance Attribute Details
- (Float) timestamp (readonly)
Returns the timestamp of the acceleration event.
157 158 159 |
# File 'motion-game', line 157 def @timestamp end |
- (Float) x (readonly)
Returns the x coordinate of the acceleration event.
148 149 150 |
# File 'motion-game', line 148 def x @x end |
- (Float) y (readonly)
Returns the y coordinate of the acceleration event.
151 152 153 |
# File 'motion-game', line 151 def y @y end |
- (Float) z (readonly)
Returns the z coordinate of the acceleration event.
154 155 156 |
# File 'motion-game', line 154 def z @z end |