Skip to content

Instantly share code, notes, and snippets.

@gashtio
Created January 28, 2013 12:38
Show Gist options
  • Save gashtio/4655218 to your computer and use it in GitHub Desktop.
Save gashtio/4655218 to your computer and use it in GitHub Desktop.
Adding the Coherent UI plugin IPlayerEventListener in the CryGame code
void CGame::OnActionEvent(const SActionEvent& event)
{
switch(event.m_event)
{
...
case eAE_inGame:
if (m_pCoherentUIPlugin)
{
IPlayerEventListener* pPlayerEventListner = m_pCoherentUIPlugin->GetPlayerEventListener();
CPlayer* pPlayer = static_cast<CPlayer*>(gEnv->pGameFramework->GetClientActor());
CRY_ASSERT(pPlayer != NULL);
pPlayer->RegisterPlayerEventListener(pPlayerEventListner);
}
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment