remove OnCommand hacks
This commit is contained in:
@@ -12,7 +12,6 @@ void Transition::Load( RString sBGAniDir )
|
|||||||
this->RemoveAllChildren();
|
this->RemoveAllChildren();
|
||||||
|
|
||||||
m_sprTransition.Load( sBGAniDir );
|
m_sprTransition.Load( sBGAniDir );
|
||||||
m_sprTransition->PlayCommand( "On" );
|
|
||||||
this->AddChild( m_sprTransition );
|
this->AddChild( m_sprTransition );
|
||||||
|
|
||||||
m_State = waiting;
|
m_State = waiting;
|
||||||
@@ -41,10 +40,7 @@ void Transition::Reset()
|
|||||||
m_bFirstUpdate = true;
|
m_bFirstUpdate = true;
|
||||||
|
|
||||||
if( m_sprTransition.IsLoaded() )
|
if( m_sprTransition.IsLoaded() )
|
||||||
{
|
|
||||||
m_sprTransition->FinishTweening();
|
m_sprTransition->FinishTweening();
|
||||||
m_sprTransition->PlayCommand( "On" );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Transition::EarlyAbortDraw() const
|
bool Transition::EarlyAbortDraw() const
|
||||||
@@ -52,17 +48,6 @@ bool Transition::EarlyAbortDraw() const
|
|||||||
return m_State == waiting;
|
return m_State == waiting;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Our parent might send us OnCommand. We do that ourself, because
|
|
||||||
* we sometimes want to know GetLengthSeconds before StartTransitioning.
|
|
||||||
* Make sure we don't process OnCommand twice. */
|
|
||||||
void Transition::HandleMessage( const Message &msg )
|
|
||||||
{
|
|
||||||
if( msg.GetName() == "On" )
|
|
||||||
return;
|
|
||||||
|
|
||||||
ActorFrame::HandleMessage( msg );
|
|
||||||
}
|
|
||||||
|
|
||||||
void Transition::StartTransitioning( ScreenMessage send_when_done )
|
void Transition::StartTransitioning( ScreenMessage send_when_done )
|
||||||
{
|
{
|
||||||
if( m_State != waiting )
|
if( m_State != waiting )
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ public:
|
|||||||
void Load( RString sBGAniDir );
|
void Load( RString sBGAniDir );
|
||||||
|
|
||||||
virtual void UpdateInternal( float fDeltaTime );
|
virtual void UpdateInternal( float fDeltaTime );
|
||||||
virtual void HandleMessage( const Message &msg );
|
|
||||||
|
|
||||||
virtual void StartTransitioning( ScreenMessage send_when_done = SM_None );
|
virtual void StartTransitioning( ScreenMessage send_when_done = SM_None );
|
||||||
virtual bool EarlyAbortDraw() const;
|
virtual bool EarlyAbortDraw() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user