Codetyle updates.

This commit is contained in:
Relintai 2024-04-15 13:59:36 +02:00
parent 6faa98c32a
commit b5ce7b875e

View File

@ -43,15 +43,17 @@ void EntityResourceSpeed::_init() {
ERR_FAIL_COND(!ESS::get_singleton()); ERR_FAIL_COND(!ESS::get_singleton());
if (ESS::get_singleton()->stat_is_property("Speed")) if (ESS::get_singleton()->stat_is_property("Speed")) {
speed_stat_id = ESS::get_singleton()->stat_get_id("Speed"); speed_stat_id = ESS::get_singleton()->stat_get_id("Speed");
}
} }
void EntityResourceSpeed::_ons_added(Node *entity) { void EntityResourceSpeed::_ons_added(Node *entity) {
refresh(); refresh();
} }
void EntityResourceSpeed::_notification_sstat_changed(int statid, float current) { void EntityResourceSpeed::_notification_sstat_changed(int statid, float current) {
if (statid == speed_stat_id) if (statid == speed_stat_id) {
refresh(); refresh();
}
} }
void EntityResourceSpeed::refresh() { void EntityResourceSpeed::refresh() {
ERR_FAIL_COND(get_owner() == NULL); ERR_FAIL_COND(get_owner() == NULL);