Godot Version
4.2.1
Question
Using c++ , i like to be able connect Timer timeout signal to my class method
Can’t find any documentation on how to do that .
In the Doc
At the the signal example uses GD script , i like to be able to call c++ function instated .
i did try like this :
void HealthManager::_ready()
{
pTimer = get_node<godot::Timer>("Timer");
//pTimer->connect("timeout", godot::Callable(this,"test"));
pTimer->connect("timeout", callable_mp(this, &HealthManager::test));
}
void HealthManager::test()
{
godot::UtilityFunctions::print("Test1");
}
And the :test() never called
Thanks