AutoActor::LoadFromNode
This commit is contained in:
@@ -16,6 +16,13 @@ void AutoActor::Load( const CString &sPath )
|
|||||||
m_pActor = ActorUtil::MakeActor( sPath );
|
m_pActor = ActorUtil::MakeActor( sPath );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AutoActor::LoadFromNode( const CString &sDir, const XNode* pNode )
|
||||||
|
{
|
||||||
|
Unload();
|
||||||
|
|
||||||
|
m_pActor = ActorUtil::LoadFromActorFile( sDir, pNode );
|
||||||
|
}
|
||||||
|
|
||||||
void AutoActor::LoadAndSetName( const CString &sScreenName, const CString &sActorName )
|
void AutoActor::LoadAndSetName( const CString &sScreenName, const CString &sActorName )
|
||||||
{
|
{
|
||||||
Load( THEME->GetPathG(sScreenName,sActorName) );
|
Load( THEME->GetPathG(sScreenName,sActorName) );
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#define AutoActor_H
|
#define AutoActor_H
|
||||||
|
|
||||||
class Actor;
|
class Actor;
|
||||||
|
struct XNode;
|
||||||
|
|
||||||
// creates the appropriate Actor derivitive on load and
|
// creates the appropriate Actor derivitive on load and
|
||||||
// automatically deletes Actor on deconstruction.
|
// automatically deletes Actor on deconstruction.
|
||||||
@@ -19,6 +20,7 @@ public:
|
|||||||
void Unload();
|
void Unload();
|
||||||
bool IsLoaded() const { return m_pActor != NULL; }
|
bool IsLoaded() const { return m_pActor != NULL; }
|
||||||
void Load( const CString &sPath );
|
void Load( const CString &sPath );
|
||||||
|
void LoadFromNode( const CString &sDir, const XNode* pNode );
|
||||||
void LoadAndSetName( const CString &sScreenName, const CString &sActorName );
|
void LoadAndSetName( const CString &sScreenName, const CString &sActorName );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
Reference in New Issue
Block a user