feat: increased random modifier to enemy update interval
parent
7f131a7add
commit
37afae2071
|
@ -17,7 +17,7 @@ void Enemy::_ready() {
|
||||||
// set up the timer used to reduce process time
|
// set up the timer used to reduce process time
|
||||||
gd::Timer *timer{memnew(gd::Timer)};
|
gd::Timer *timer{memnew(gd::Timer)};
|
||||||
this->add_child(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));
|
timer->connect("timeout", callable_mp(this, &Enemy::update));
|
||||||
// starting target rotation is just the current rotation
|
// starting target rotation is just the current rotation
|
||||||
this->target_rotation = this->get_rotation().y;
|
this->target_rotation = this->get_rotation().y;
|
||||||
|
|
Loading…
Reference in New Issue