rj-action-library-cpp/RJInteractable.cpp

34 lines
853 B
C++
Raw Normal View History

2024-08-05 07:12:40 +00:00
/* RJInteractable.cpp */
#include "RJInteractable.h"
// Registers fields, signals and methods for Godot
void RJInteractable::_bind_methods()
{
// onInteraction: RJAction*
ClassDB::bind_method( D_METHOD( "set_onInteraction", "onInteraction" ), &RJInteractable::set_onInteraction );
ClassDB::bind_method( D_METHOD( "get_onInteraction"), &RJInteractable::get_onInteraction);
ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "onInteraction", PROPERTY_HINT_NODE_TYPE ), "set_onInteraction", "get_onInteraction" );
}
// Constructor
RJInteractable::RJInteractable()
{
}
// Destructor
RJInteractable::~RJInteractable()
{
}
// onInteraction: RJAction*
RJAction* RJInteractable::get_onInteraction() const { return onInteraction; }
void RJInteractable::set_onInteraction( RJAction* p_onInteraction ) { onInteraction = p_onInteraction; }