20 lines
502 B
Text
20 lines
502 B
Text
#import "pedometer_module.h"
|
|
#import "pedometer.h"
|
|
|
|
#import "core/config/engine.h"
|
|
#import "core/object/class_db.h"
|
|
|
|
Pedometer *pedometer_singleton = nullptr;
|
|
|
|
void pedometer_init_module() {
|
|
ClassDB::register_class<Pedometer>();
|
|
pedometer_singleton = memnew(Pedometer);
|
|
Engine::get_singleton()->add_singleton(Engine::Singleton("Pedometer", pedometer_singleton));
|
|
}
|
|
|
|
void pedometer_deinit_module() {
|
|
if (pedometer_singleton) {
|
|
memdelete(pedometer_singleton);
|
|
pedometer_singleton = nullptr;
|
|
}
|
|
}
|