So I have a Character class that has a private variable int health in my Projectile class I have this:
if (resultNode->HasComponent<Character>())
{
    _Node = resultNode->GetComponent<Character>();
    _Node->setHealth(_Node->getHealth() - damage);
}
It works fine I just feel like my code is not efficient.
 
         
         
        