We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.
Rename cc.Touch.getLocation() to cc.Touch.getPosition()?
Rename cc.Touch.getLocation() to cc.Touch.getPosition()?
Bug #3889 [Closed]
Redmine issue system is closed, we are using github issue system instead.
This issue was moved to https://github.com/cocos2d/cocos2d-x/issues/8330
Status: | Closed | |
---|---|---|
Start date: | 2014-02-03 | |
Priority: | Low | |
Due date: | ||
Assignee: | - | |
% Done: | 0% |
|
Category: | - | |
Target version: | - |
In all nodes and sprites, etc, the method for getting the
cc.Point
of the position of said element is always calledgetPosition
, but for touch (and mouse) events it is calledgetLocation
. Is there a reason for this difference? If not, wouldn't it be better -for consistency- to add a methodgetPosition
to take over this responsibility and deprecategetLocation
incc.Touch
with a waring (obviously, not just deleting it, in order to not break existing games)?