rj-action-library-cpp/RJTimeLine.cpp

74 lines
2.5 KiB
C++

/* RJTimeLine.cpp */
#include "RJTimeLine.h"
// Registers fields, signals and methods for Godot
void RJTimeLine::_bind_methods()
{
// isLooping: bool
ClassDB::bind_method( D_METHOD( "set_isLooping", "isLooping" ), &RJTimeLine::set_isLooping );
ClassDB::bind_method( D_METHOD( "get_isLooping"), &RJTimeLine::get_isLooping);
ADD_PROPERTY(PropertyInfo( Variant::BOOL, "isLooping" ), "set_isLooping", "get_isLooping" );
// loopStart: float
ClassDB::bind_method( D_METHOD( "set_loopStart", "loopStart" ), &RJTimeLine::set_loopStart );
ClassDB::bind_method( D_METHOD( "get_loopStart"), &RJTimeLine::get_loopStart);
ADD_PROPERTY(PropertyInfo( Variant::FLOAT, "loopStart" ), "set_loopStart", "get_loopStart" );
// loopEnd: float
ClassDB::bind_method( D_METHOD( "set_loopEnd", "loopEnd" ), &RJTimeLine::set_loopEnd );
ClassDB::bind_method( D_METHOD( "get_loopEnd"), &RJTimeLine::get_loopEnd);
ADD_PROPERTY(PropertyInfo( Variant::FLOAT, "loopEnd" ), "set_loopEnd", "get_loopEnd" );
// startSpeed: float
ClassDB::bind_method( D_METHOD( "set_startSpeed", "startSpeed" ), &RJTimeLine::set_startSpeed );
ClassDB::bind_method( D_METHOD( "get_startSpeed"), &RJTimeLine::get_startSpeed);
ADD_PROPERTY(PropertyInfo( Variant::FLOAT, "startSpeed" ), "set_startSpeed", "get_startSpeed" );
// autoStart: bool
ClassDB::bind_method( D_METHOD( "set_autoStart", "autoStart" ), &RJTimeLine::set_autoStart );
ClassDB::bind_method( D_METHOD( "get_autoStart"), &RJTimeLine::get_autoStart);
ADD_PROPERTY(PropertyInfo( Variant::BOOL, "autoStart" ), "set_autoStart", "get_autoStart" );
}
// Constructor
RJTimeLine::RJTimeLine()
{
isLooping = false;
loopStart = 0;
loopEnd = 16;
startSpeed = 1;
autoStart = false;
}
// Destructor
RJTimeLine::~RJTimeLine()
{
}
// isLooping: bool
bool RJTimeLine::get_isLooping() { return isLooping; }
void RJTimeLine::set_isLooping( bool p_isLooping ) { isLooping = p_isLooping; }
// loopStart: float
float RJTimeLine::get_loopStart() { return loopStart; }
void RJTimeLine::set_loopStart( float p_loopStart ) { loopStart = p_loopStart; }
// loopEnd: float
float RJTimeLine::get_loopEnd() { return loopEnd; }
void RJTimeLine::set_loopEnd( float p_loopEnd ) { loopEnd = p_loopEnd; }
// startSpeed: float
float RJTimeLine::get_startSpeed() { return startSpeed; }
void RJTimeLine::set_startSpeed( float p_startSpeed ) { startSpeed = p_startSpeed; }
// autoStart: bool
bool RJTimeLine::get_autoStart() { return autoStart; }
void RJTimeLine::set_autoStart( bool p_autoStart ) { autoStart = p_autoStart; }