Class: Carbuncle::Gesture::Drag

Inherits:
Event show all
Defined in:
gems/carbuncle-input/mrblib/gesture.rb

Overview

Handles the dinformation about the drag event

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Event

#to_s

Constructor Details

#initialize(vector, angle) ⇒ Drag

Returns a new instance of Drag.



87
88
89
90
# File 'gems/carbuncle-input/mrblib/gesture.rb', line 87

def initialize(vector, angle)
  @vector = vector
  @angle = angle
end

Instance Attribute Details

#angleFloat (readonly)

The angle of the Drag

Returns:



85
86
87
# File 'gems/carbuncle-input/mrblib/gesture.rb', line 85

def angle
  @angle
end

#vectorPoint (readonly)

The Vector of the touch

Returns:



82
83
84
# File 'gems/carbuncle-input/mrblib/gesture.rb', line 82

def vector
  @vector
end

Instance Method Details

#inspectObject



92
93
94
# File 'gems/carbuncle-input/mrblib/gesture.rb', line 92

def inspect
  "Drag(#{vector}, #{angle})"
end