rj-action-library-cpp/RJCaster.cpp

66 lines
2.7 KiB
C++
Raw Permalink Normal View History

2024-08-02 06:21:30 +00:00
/* RJCaster.cpp */
#include "RJCaster.h"
// Registers fields, signals and methods for Godot
void RJCaster::_bind_methods()
{
// beforeProcess: RJAction*
ClassDB::bind_method( D_METHOD( "set_beforeProcess", "beforeProcess" ), &RJCaster::set_beforeProcess );
ClassDB::bind_method( D_METHOD( "get_beforeProcess"), &RJCaster::get_beforeProcess);
ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "beforeProcess", PROPERTY_HINT_NODE_TYPE ), "set_beforeProcess", "get_beforeProcess" );
// afterProcess: RJAction*
ClassDB::bind_method( D_METHOD( "set_afterProcess", "afterProcess" ), &RJCaster::set_afterProcess );
ClassDB::bind_method( D_METHOD( "get_afterProcess"), &RJCaster::get_afterProcess);
ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "afterProcess", PROPERTY_HINT_NODE_TYPE ), "set_afterProcess", "get_afterProcess" );
// includeSelector: Ref<RJSelector>
ClassDB::bind_method( D_METHOD( "set_includeSelector", "includeSelector" ), &RJCaster::set_includeSelector );
ClassDB::bind_method( D_METHOD( "get_includeSelector"), &RJCaster::get_includeSelector);
ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "includeSelector", PROPERTY_HINT_RESOURCE_TYPE ), "set_includeSelector", "get_includeSelector" );
// excludeSelector: Ref<RJSelector>
ClassDB::bind_method( D_METHOD( "set_excludeSelector", "excludeSelector" ), &RJCaster::set_excludeSelector );
ClassDB::bind_method( D_METHOD( "get_excludeSelector"), &RJCaster::get_excludeSelector);
ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "excludeSelector", PROPERTY_HINT_RESOURCE_TYPE ), "set_excludeSelector", "get_excludeSelector" );
GDVIRTUAL_BIND( numColliders );
GDVIRTUAL_BIND( getCollider, "index" );
GDVIRTUAL_BIND( getCollisionPosition, "index" );
GDVIRTUAL_BIND( getCollisionNormal, "index" );
GDVIRTUAL_BIND( getCollisionShape, "index" );
}
// Constructor
RJCaster::RJCaster()
{
}
// Destructor
RJCaster::~RJCaster()
{
}
// beforeProcess: RJAction*
RJAction* RJCaster::get_beforeProcess() const { return beforeProcess; }
void RJCaster::set_beforeProcess( RJAction* p_beforeProcess ) { beforeProcess = p_beforeProcess; }
// afterProcess: RJAction*
RJAction* RJCaster::get_afterProcess() const { return afterProcess; }
void RJCaster::set_afterProcess( RJAction* p_afterProcess ) { afterProcess = p_afterProcess; }
// includeSelector: Ref<RJSelector>
Ref<RJSelector> RJCaster::get_includeSelector() const { return includeSelector; }
void RJCaster::set_includeSelector( const Ref<RJSelector> &p_includeSelector ) { includeSelector = p_includeSelector; }
// excludeSelector: Ref<RJSelector>
Ref<RJSelector> RJCaster::get_excludeSelector() const { return excludeSelector; }
void RJCaster::set_excludeSelector( const Ref<RJSelector> &p_excludeSelector ) { excludeSelector = p_excludeSelector; }