diff --git a/RJSelector.h b/RJSelector.h index 454fa3a..d4e39f4 100644 --- a/RJSelector.h +++ b/RJSelector.h @@ -14,7 +14,7 @@ class RJSelector : public Resource protected: static void _bind_methods(); - GDVIRTUAL1R(bool, select, Ref) + GDVIRTUAL1R( bool, select, Ref) public: diff --git a/RJSensor.cpp b/RJSensor.cpp new file mode 100644 index 0000000..271cbbe --- /dev/null +++ b/RJSensor.cpp @@ -0,0 +1,23 @@ +/* RJSensor.cpp */ + +#include "RJSensor.h" + + +void RJSensor::_bind_methods() +{ + GDVIRTUAL_BIND( getValue ); + GDVIRTUAL_BIND( isActive ); + GDVIRTUAL_BIND( wasActive ); + GDVIRTUAL_BIND( updateValue ); + +} + +RJSensor::RJSensor() +{ + +} + +RJSensor::~RJSensor() +{ + +} diff --git a/RJSensor.h b/RJSensor.h new file mode 100644 index 0000000..8364e11 --- /dev/null +++ b/RJSensor.h @@ -0,0 +1,28 @@ +/* RJSensor.h */ + +#ifndef ROKOJORI_CORE__SENSOR_H +#define ROKOJORI_CORE__SENSOR_H + +#include "scene/main/node.h" + + +class RJSensor : public Node +{ + GDCLASS(RJSensor, Node); + +protected: + static void _bind_methods(); + +public: + + GDVIRTUAL0R( float, getValue ); + GDVIRTUAL0R( bool, isActive ); + GDVIRTUAL0R( bool, wasActive ); + GDVIRTUAL1( updateValue, float ); + + RJSensor(); + ~RJSensor(); +}; + + +#endif // ROKOJORI_CORE__SENSOR_H \ No newline at end of file diff --git a/register_types.cpp b/register_types.cpp index af0ea32..5e48396 100644 --- a/register_types.cpp +++ b/register_types.cpp @@ -7,6 +7,7 @@ #include "./RJNetworkNode.h" #include "./RJAction.h" #include "./RJSelector.h" +#include "./RJSensor.h" void initialize_rokojori_action_library_module( ModuleInitializationLevel p_level ) { @@ -18,6 +19,7 @@ void initialize_rokojori_action_library_module( ModuleInitializationLevel p_leve ClassDB::register_class(); ClassDB::register_class(); ClassDB::register_class(); + ClassDB::register_class(); } void uninitialize_rokojori_action_library_module( ModuleInitializationLevel p_level )