2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- @module Touch
|
2014-03-20 10:21:28 +08:00
|
|
|
-- @extend Ref
|
2014-06-25 17:36:50 +08:00
|
|
|
-- @parent_module cc
|
2014-03-18 15:55:30 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-23 16:29:35 +08:00
|
|
|
-- Returns the previous touch location in screen coordinates. <br>
|
|
|
|
-- return The previous touch location in screen coordinates.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Touch] getPreviousLocationInView
|
|
|
|
-- @param self
|
2014-05-27 14:31:18 +08:00
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-23 16:29:35 +08:00
|
|
|
-- Returns the current touch location in OpenGL coordinates.<br>
|
|
|
|
-- return The current touch location in OpenGL coordinates.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Touch] getLocation
|
|
|
|
-- @param self
|
2014-05-27 14:31:18 +08:00
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-23 16:29:35 +08:00
|
|
|
-- Returns the delta of 2 current touches locations in screen coordinates.<br>
|
|
|
|
-- return The delta of 2 current touches locations in screen coordinates.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Touch] getDelta
|
|
|
|
-- @param self
|
2014-05-27 14:31:18 +08:00
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-23 16:29:35 +08:00
|
|
|
-- Returns the start touch location in screen coordinates.<br>
|
|
|
|
-- return The start touch location in screen coordinates.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Touch] getStartLocationInView
|
|
|
|
-- @param self
|
2014-05-27 14:31:18 +08:00
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-23 16:29:35 +08:00
|
|
|
-- Returns the start touch location in OpenGL coordinates.<br>
|
|
|
|
-- return The start touch location in OpenGL coordinates.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Touch] getStartLocation
|
|
|
|
-- @param self
|
2014-05-27 14:31:18 +08:00
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-23 16:29:35 +08:00
|
|
|
-- Get touch id.<br>
|
2014-09-02 13:45:07 +08:00
|
|
|
-- js getId<br>
|
2015-03-23 16:29:35 +08:00
|
|
|
-- lua getId<br>
|
|
|
|
-- return The id of touch.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Touch] getID
|
|
|
|
-- @param self
|
|
|
|
-- @return int#int ret (return value: int)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-23 16:29:35 +08:00
|
|
|
-- Set the touch infomation. It always used to monitor touch event.<br>
|
|
|
|
-- param id A given id<br>
|
|
|
|
-- param x A given x coordinate.<br>
|
|
|
|
-- param y A given y coordinate.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Touch] setTouchInfo
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #int id
|
|
|
|
-- @param #float x
|
|
|
|
-- @param #float y
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Touch#Touch self (return value: cc.Touch)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-23 16:29:35 +08:00
|
|
|
-- Returns the current touch location in screen coordinates.<br>
|
|
|
|
-- return The current touch location in screen coordinates.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Touch] getLocationInView
|
|
|
|
-- @param self
|
2014-05-27 14:31:18 +08:00
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-23 16:29:35 +08:00
|
|
|
-- Returns the previous touch location in OpenGL coordinates.<br>
|
|
|
|
-- return The previous touch location in OpenGL coordinates.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Touch] getPreviousLocation
|
|
|
|
-- @param self
|
2014-05-27 14:31:18 +08:00
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-24 11:25:31 +08:00
|
|
|
-- Constructor.<br>
|
|
|
|
-- js ctor
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Touch] Touch
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Touch#Touch self (return value: cc.Touch)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
return nil
|