34 lines
853 B
C++
34 lines
853 B
C++
|
|
||
|
/* 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; }
|
||
|
|
||
|
|
||
|
|