Issue #4294: Add unimplemented position getter/setter in MotionStreak

This commit is contained in:
pandamicro 2014-03-07 16:32:00 +08:00
parent 9b0c0ab44e
commit a005fa1dce
2 changed files with 43 additions and 0 deletions

View File

@ -143,6 +143,42 @@ void MotionStreak::setPosition(const Point& position)
_positionR = position;
}
void MotionStreak::setPosition(float x, float y)
{
setPosition(Point(x, y));
}
const Point& MotionStreak::getPosition() const
{
return _positionR;
}
void MotionStreak::getPosition(float* x, float* y) const
{
*x = _positionR.x;
*y = _positionR.y;
}
float MotionStreak::getPositionX() const
{
return _positionR.x;
}
void MotionStreak::setPositionX(float x)
{
setPosition(Point(x, _positionR.y));
}
float MotionStreak::getPositionY() const
{
return _positionR.y;
}
void MotionStreak::setPositionY(float y)
{
setPosition(Point(_positionR.x, y));
}
void MotionStreak::tintWithColor(const Color3B& colors)
{
setColor(colors);

View File

@ -74,6 +74,13 @@ public:
// Overrides
virtual void setPosition(const Point& position) override;
virtual void setPosition(float x, float y);
virtual const Point& getPosition() const override;
virtual void getPosition(float* x, float* y) const override;
virtual void setPositionX(float x) override;
virtual void setPositionY(float y) override;
virtual float getPositionX(void) const override;
virtual float getPositionY(void) const override;
/**
* @js NA
* @lua NA