diff --git a/src/enemy.cpp b/src/enemy.cpp index fdf8f41..9ab40b9 100644 --- a/src/enemy.cpp +++ b/src/enemy.cpp @@ -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;