ara pots recolocar al jugador en debug amb el ratoli
This commit is contained in:
@@ -887,4 +887,22 @@ auto Player::getProjection(Direction direction, float displacement) -> SDL_FRect
|
||||
.w = 0.0F,
|
||||
.h = 0.0F};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
// Establece la posición del jugador directamente (debug)
|
||||
void Player::setDebugPosition(float x, float y) {
|
||||
x_ = x;
|
||||
y_ = y;
|
||||
syncSpriteAndCollider();
|
||||
}
|
||||
|
||||
// Fija estado ON_GROUND, velocidades a 0, actualiza last_grounded_position_ (debug)
|
||||
void Player::finalizeDebugTeleport() {
|
||||
vx_ = 0.0F;
|
||||
vy_ = 0.0F;
|
||||
state_ = State::ON_GROUND;
|
||||
last_grounded_position_ = static_cast<int>(y_);
|
||||
syncSpriteAndCollider();
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user