We want to update the children manually, so we need to be overriding UpdateInternal(), not Update(). Overriding Update() was causing Update() to be called on each of our children twice.

This commit is contained in:
Steve Checkoway
2008-01-05 15:14:23 +00:00
parent 036f468da5
commit 3b1a156ca6
2 changed files with 5 additions and 6 deletions
+4 -5
View File
@@ -40,11 +40,11 @@ void FadingBanner::ScaleToClipped( float fWidth, float fHeight )
m_Banner[i].ScaleToClipped( fWidth, fHeight );
}
void FadingBanner::Update( float fDeltaTime )
void FadingBanner::UpdateInternal( float fDeltaTime )
{
// update children manually
// ActorFrame::Update( fDeltaTime );
Actor::Update( fDeltaTime );
// ActorFrame::UpdateInternal( fDeltaTime );
Actor::UpdateInternal( fDeltaTime );
if( !m_bSkipNextBannerUpdate )
{
@@ -144,8 +144,7 @@ bool FadingBanner::LoadFromCachedBanner( const RString &path )
return false;
}
BeforeChange();
m_Banner[m_iIndexLatest].Load( ID );
Load( ID );
return bLowRes;
}
+1 -1
View File
@@ -33,7 +33,7 @@ public:
bool LoadFromCachedBanner( const RString &path );
void SetMovingFast( bool fast ) { m_bMovingFast=fast; }
virtual void Update( float fDeltaTime );
virtual void UpdateInternal( float fDeltaTime );
virtual void DrawPrimitives();
// Lua