Make ILyShine an AZ::Interface (#6923)
* Move ILyShine instance out of legacy code Signed-off-by: abrmich <abrmich@amazon.com> * Remove last remaining reference of gEnv->pLyShine Signed-off-by: abrmich <abrmich@amazon.com> * Make m_lyShine a unique pointer Signed-off-by: abrmich <abrmich@amazon.com>
This commit is contained in:
@@ -284,7 +284,7 @@ namespace LyShineExamples
|
||||
// If this is called from RC.exe for example these pointers will not be set. In that case
|
||||
// we only need to be able to load, init and save the component. It will never be
|
||||
// activated.
|
||||
if (!(gEnv && gEnv->pLyShine))
|
||||
if (!AZ::Interface<ILyShine>::Get())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -294,7 +294,7 @@ namespace LyShineExamples
|
||||
{
|
||||
if (!m_spritePathname.GetAssetPath().empty())
|
||||
{
|
||||
m_sprite = gEnv->pLyShine->LoadSprite(m_spritePathname.GetAssetPath().c_str());
|
||||
m_sprite = AZ::Interface<ILyShine>::Get()->LoadSprite(m_spritePathname.GetAssetPath().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -399,7 +399,7 @@ namespace LyShineExamples
|
||||
if (!m_spritePathname.GetAssetPath().empty())
|
||||
{
|
||||
// Load the new texture.
|
||||
newSprite = gEnv->pLyShine->LoadSprite(m_spritePathname.GetAssetPath().c_str());
|
||||
newSprite = AZ::Interface<ILyShine>::Get()->LoadSprite(m_spritePathname.GetAssetPath().c_str());
|
||||
}
|
||||
|
||||
SAFE_RELEASE(m_sprite);
|
||||
|
||||
Reference in New Issue
Block a user