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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user