feat: implemented enemies spawning based on current region difficulty
This commit is contained in:
parent
96b5be405c
commit
9b07c70b11
8 changed files with 341 additions and 131 deletions
|
|
@ -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 });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue