예제 #1
0
std::shared_ptr<UsableScript> ScriptFactory::getSkillScript(lua_State* luaVM, const Skill& skill)
{
   std::ostringstream skillIdBuffer;
   skillIdBuffer << skill.getId();

   return std::make_shared<UsableScript>(luaVM, ScriptFactory::getPath(skillIdBuffer.str(), ScriptType::SKILL_SCRIPT), skill);
}
예제 #2
0
void Test_Skill::setId()
{
    Skill testSkill;

    int id = 5;
    testSkill.setId(id);

    QVERIFY(testSkill.getId() == id);
}