Created
January 28, 2013 12:38
-
-
Save gashtio/4655218 to your computer and use it in GitHub Desktop.
Adding the Coherent UI plugin IPlayerEventListener in the CryGame code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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