feat: implemented enemies spawning based on current region difficulty

This commit is contained in:
Sara 2025-08-27 14:06:59 +02:00
parent 96b5be405c
commit 9b07c70b11
8 changed files with 341 additions and 131 deletions

View file

@ -22,7 +22,7 @@ void EnemyBody::ready() {
void EnemyBody::physics_process(double delta) {
GETSET(velocity, {
velocity = Vector3{ this->movement_direction.x * this->movement_speed, velocity.y, this->movement_direction.y * this->movement_speed };
velocity = Vector3{ this->movement_direction.x * this->movement_speed, velocity.y, this->movement_direction.y * this->movement_speed } + (velocity * delta);
});
if (!this->movement_direction.is_zero_approx()) {
look_at(get_global_position() + Vector3{ this->movement_direction.x, 0.f, this->movement_direction.y });