feat: increased random modifier to enemy update interval

main
Sara 2025-01-05 23:33:01 +01:00
parent 7f131a7add
commit 37afae2071
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ void Enemy::_ready() {
// set up the timer used to reduce process time
gd::Timer *timer{memnew(gd::Timer)};
this->add_child(timer);
timer->start(this->update_interval);
timer->start(this->update_interval + this->update_interval * gd::UtilityFunctions::randf_range(0.0f, 0.25f));
timer->connect("timeout", callable_mp(this, &Enemy::update));
// starting target rotation is just the current rotation
this->target_rotation = this->get_rotation().y;