Question by
Jan-Eylander · Sep 26, 2018 at 03:45 PM ·
inheritancefunctionssafe
Get the Class which calls the public function
Currently my code is :
public void AddSkill(EAvailableSkills _skillToAdd) { m_AvailableSkills |= _skillToAdd; }But i also want to check if the class which is calling this function is the shop from my game. So like:
public void AddSkill(EAvailableSkills _skillToAdd) { if(/*class which calls the function*/ == Shop) { m_AvailableSkills |= _skillToAdd; } }
I want to check if the calling function is elegable to call this function so just adding it to the parameters is not enough.
Comment