int NFCPropertyTrailModule::OnObjectPropertyEvent(const NFGUID& self, const std::string& strPropertyName, const NFIDataList::TData& oldVar, const NFIDataList::TData& newVar)
{
    std::ostringstream stream;

    stream << " Trailing ";
    stream << " [Old] ";
    stream << oldVar.GetString();
    stream << " [New] ";
    stream << newVar.GetString();

    m_pLogModule->LogProperty(NFILogModule::NF_LOG_LEVEL::NLL_INFO_NORMAL, self, strPropertyName, stream.str(),  __FUNCTION__, __LINE__);

    return 0;
}
Beispiel #2
0
int NFCGameScene::OnObjectPropertyEvent(const NFGUID& self, const std::string& strPropertyName, const NFIDataList::TData& oldVar, const NFIDataList::TData& newVar)
{
	Sprite *pPlayer = m_Players.GetElement(self);
	auto pName = ui::Text::create(newVar.GetString(), "", 16);
	pName->setAnchorPoint(Vec2(0.5, 0));
	pName->setPosition(Vec2(pPlayer->getAnchorPointInPoints().x, pPlayer->getContentSize().height));
	pPlayer->addChild(pName);
	return 0;
}