pass "playcommand" on to children

This commit is contained in:
Chris Danford
2004-01-20 03:31:08 +00:00
parent eee2b3f82a
commit 54545e2349
2 changed files with 14 additions and 0 deletions
+13
View File
@@ -136,3 +136,16 @@ void ActorFrame::DeleteAllChildren()
m_SubActors.clear();
}
void ActorFrame::HandleCommand( const ParsedCommand &command )
{
// pass "PlayCommand" on to children
if( command.vTokens[0].s=="playcommand" )
{
for( unsigned i=0; i<m_SubActors.size(); i++ )
m_SubActors[i]->HandleCommand( command );
return; // handled
}
// base class handles the rest...
Actor::HandleCommand( command );
}
+1
View File
@@ -26,6 +26,7 @@ public:
void DeleteAllChildren();
virtual void RunCommandOnChildren( const CString &cmd ); /* but not on self */
virtual void HandleCommand( const ParsedCommand &command ); // derivable
virtual void Update( float fDeltaTime );
virtual void DrawPrimitives();