aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Script.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/api/Script.hpp')
-rw-r--r--src/crepe/api/Script.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/crepe/api/Script.hpp b/src/crepe/api/Script.hpp
index e94278d..a2463bf 100644
--- a/src/crepe/api/Script.hpp
+++ b/src/crepe/api/Script.hpp
@@ -20,9 +20,9 @@ T & Script::get_component() const {
template <typename T>
RefVector<T> Script::get_components() const {
- ComponentManager & mgr = *this->component_manager_ref;
+ ComponentManager & mgr = this->component_manager;
- return mgr.get_components_by_id<T>(*this->game_object_id_ref);
+ return mgr.get_components_by_id<T>(this->game_object_id);
}
template <typename... Args>
@@ -33,10 +33,10 @@ void Script::logf(Args &&... args) {
template <typename EventType>
void Script::subscribe_internal(const EventHandler<EventType> & callback,
event_channel_t channel) {
- EventManager & mgr = *this->event_manager_ref;
+ EventManager & mgr = this->event_manager;
subscription_t listener = mgr.subscribe<EventType>(
[this, callback](const EventType & data) -> bool {
- bool & active = *this->active_ref;
+ bool & active = this->active;
if (!active) return false;
return callback(data);
},