mirror of https://github.com/axmolengine/axmol.git
CCNode: add [set|get]Position[X|Y](void) back.
This commit is contained in:
parent
c184567329
commit
996d2be2b6
|
@ -293,6 +293,26 @@ void CCNode::setPosition(float x, float y)
|
||||||
setPosition(ccp(x, y));
|
setPosition(ccp(x, y));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float CCNode::getPositionX(void)
|
||||||
|
{
|
||||||
|
return m_obPosition.x;
|
||||||
|
}
|
||||||
|
|
||||||
|
float CCNode::getPositionY(void)
|
||||||
|
{
|
||||||
|
return m_obPosition.y;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCNode::setPositionX(float x)
|
||||||
|
{
|
||||||
|
setPosition(ccp(x, m_obPosition.y));
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCNode::setPositionY(float y)
|
||||||
|
{
|
||||||
|
setPosition(ccp(m_obPosition.x, y));
|
||||||
|
}
|
||||||
|
|
||||||
/// children getter
|
/// children getter
|
||||||
CCArray* CCNode::getChildren()
|
CCArray* CCNode::getChildren()
|
||||||
{
|
{
|
||||||
|
|
|
@ -311,6 +311,14 @@ public:
|
||||||
* @see setPosition(float, float)
|
* @see setPosition(float, float)
|
||||||
*/
|
*/
|
||||||
void getPosition(float* x, float* y);
|
void getPosition(float* x, float* y);
|
||||||
|
/**
|
||||||
|
* Gets/Sets x or y coordinate individually for position.
|
||||||
|
* These methods are used in Lua and Javascript Bindings
|
||||||
|
*/
|
||||||
|
void setPositionX(float x);
|
||||||
|
float getPositionX(void);
|
||||||
|
void setPositionY(float y);
|
||||||
|
float getPositionY(void);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue