Beispiel #1
0
void PhysicsSprite::getPosition(float* x, float* y) const
{
    if (x == nullptr || y == nullptr) {
        return;
    }
    const Vec2& pos = getPosFromPhysics();
    *x = pos.x;
    *y = pos.y;
}
void PhysicsSprite::getPosition(float* x, float* y) const
{
    if (x == NULL || y == NULL) {
        return;
    }
    const Point& pos = getPosFromPhysics();
    *x = pos.x;
    *y = pos.y;
}
Beispiel #3
0
float PhysicsSprite::getPositionY() const
{
    return getPosFromPhysics().y;
}
Beispiel #4
0
// Override the setters and getters to always reflect the body's properties.
const Vec2& PhysicsSprite::getPosition() const
{
    return getPosFromPhysics();
}
Vec3 PhysicsSprite::getPosition3D() const
{
    Vec2 pos = getPosFromPhysics();
    return Vec3(pos.x, pos.y, 0);
}