当前位置: 首页>>代码示例>>C++>>正文


C++ IPlayerProfile::SetAttribute方法代码示例

本文整理汇总了C++中IPlayerProfile::SetAttribute方法的典型用法代码示例。如果您正苦于以下问题:C++ IPlayerProfile::SetAttribute方法的具体用法?C++ IPlayerProfile::SetAttribute怎么用?C++ IPlayerProfile::SetAttribute使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IPlayerProfile的用法示例。


在下文中一共展示了IPlayerProfile::SetAttribute方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SaveCVarToProfile

void COptionsManager::SaveCVarToProfile(const char* key, const string& value)
{
	if(!m_pPlayerProfileManager)
		return;
	IPlayerProfile *pProfile = m_pPlayerProfileManager->GetCurrentProfile(m_pPlayerProfileManager->GetCurrentUser());
	if(!pProfile)
		return;

	pProfile->SetAttribute(key, value);
	IPlayerProfileManager::EProfileOperationResult result;
	m_pPlayerProfileManager->SaveProfile(m_pPlayerProfileManager->GetCurrentUser(), result);
}
开发者ID:mrwonko,项目名称:CrysisVR,代码行数:12,代码来源:OptionsManager.cpp

示例2: SaveValueToProfile

void COptionsManager::SaveValueToProfile(const char* key, float value)
{
	if(!m_pPlayerProfileManager)
		return;

	IPlayerProfile *pProfile = m_pPlayerProfileManager->GetCurrentProfile(m_pPlayerProfileManager->GetCurrentUser());
	if(!pProfile)
		return;

	pProfile->SetAttribute(key, value);
	SaveProfile();
}
开发者ID:mrwonko,项目名称:CrysisVR,代码行数:12,代码来源:OptionsManager.cpp

示例3: ProcessEvent

	virtual void ProcessEvent( EFlowEvent event, SActivationInfo *pActInfo )
	{
		switch(event)
		{
		case eFE_Activate:
			{
				if (IsPortActive(pActInfo, eIP_Get))
				{
					IPlayerProfile* pProfile = NULL;
					if (IPlayerProfileManager *pProfileMan = gEnv->pGame->GetIGameFramework()->GetIPlayerProfileManager())
					{
						const char* user = pProfileMan->GetCurrentUser();
						pProfile = pProfileMan->GetCurrentProfile(user);
						TFlowInputData data;
						if (!pProfile || pProfile->GetAttribute(GetPortString(pActInfo, eIP_Name), data))
						{
							ActivateOutput(pActInfo, eOP_Value, data);
						}
						else
						{
							ActivateOutput(pActInfo, eOP_Error, 1);
						}
					}
				}

				if (IsPortActive(pActInfo, eIP_Set))
				{
					IPlayerProfile* pProfile = NULL;
					if (IPlayerProfileManager *pProfileMan = gEnv->pGame->GetIGameFramework()->GetIPlayerProfileManager())
					{
						const char *user = pProfileMan->GetCurrentUser();
						pProfile = pProfileMan->GetCurrentProfile( user );
						if(!pProfile || !pProfile->SetAttribute(GetPortString(pActInfo, eIP_Name), GetPortAny(pActInfo, eIP_Set)))
						{
							ActivateOutput(pActInfo, eOP_Error, 1);
						}
					}
				}
			}
			break;
		}
	}
开发者ID:aronarts,项目名称:FireNET,代码行数:42,代码来源:FlowOnlineStatsNodes.cpp

示例4: StartSingleplayerGame

void CFlashMenuObject::StartSingleplayerGame(const char *strDifficulty)
{
	int iDifficulty = 0;
	if(!strcmp(strDifficulty,"Easy"))
	{
		iDifficulty = 1;
	}
	else if(!strcmp(strDifficulty,"Normal"))
	{
		iDifficulty = 2;
	}
	else if(!strcmp(strDifficulty,"Realistic"))
	{
		iDifficulty = 3;
	}
	else if(!strcmp(strDifficulty,"Delta"))
	{
		iDifficulty = 4;
	}

	// load configuration from disk
	if (iDifficulty != 0)
		LoadDifficultyConfig(iDifficulty);

	if(m_pPlayerProfileManager)
	{
		IPlayerProfile *pProfile = m_pPlayerProfileManager->GetCurrentProfile(m_pPlayerProfileManager->GetCurrentUser());
		if(pProfile)
		{
			pProfile->SetAttribute("Singleplayer.LastSelectedDifficulty",(TFlowInputData)iDifficulty);
			IPlayerProfileManager::EProfileOperationResult result;
			m_pPlayerProfileManager->SaveProfile(m_pPlayerProfileManager->GetCurrentUser(), result);
		}
	}
	StopVideo();
	m_bDestroyStartMenuPending = true;
	m_stateEntryMovies = eEMS_GameStart;
	if(m_pMusicSystem)
		m_pMusicSystem->EndTheme(EThemeFade_StopAtOnce, 0, true);
	PlaySound(ESound_MenuAmbience,false);
}
开发者ID:RenEvo,项目名称:dead6,代码行数:41,代码来源:FlashMenuObjectSingleplayer.cpp


注:本文中的IPlayerProfile::SetAttribute方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。