AutoActor
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "XmlFile.h"
|
||||
#include "BackgroundUtil.h"
|
||||
#include "song.h"
|
||||
#include "AutoActor.h"
|
||||
|
||||
ThemeMetric<float> LEFT_EDGE ("Background","LeftEdge");
|
||||
ThemeMetric<float> TOP_EDGE ("Background","TopEdge");
|
||||
@@ -118,7 +119,7 @@ protected:
|
||||
BGAnimation m_DangerPlayer[NUM_PLAYERS];
|
||||
BGAnimation m_DangerAll;
|
||||
|
||||
BGAnimation m_DeadPlayer[NUM_PLAYERS];
|
||||
AutoActor m_DeadPlayer[NUM_PLAYERS];
|
||||
|
||||
// cover up the edge of animations that might hang outside of the background rectangle
|
||||
Quad m_quadBorderLeft, m_quadBorderTop, m_quadBorderRight, m_quadBorderBottom;
|
||||
@@ -199,7 +200,7 @@ void BackgroundImpl::Init()
|
||||
FOREACH_PlayerNumber( p )
|
||||
m_DangerPlayer[p].LoadFromAniDir( THEME->GetPathB("ScreenGameplay",ssprintf("danger p%d",p+1)) );
|
||||
FOREACH_PlayerNumber( p )
|
||||
m_DeadPlayer[p].LoadFromAniDir( THEME->GetPathB("ScreenGameplay",ssprintf("dead p%d",p+1)) );
|
||||
m_DeadPlayer[p].Load( THEME->GetPathB("ScreenGameplay",ssprintf("dead p%d",p+1)) );
|
||||
|
||||
bool bOneOrMoreChars = false;
|
||||
bool bShowingBeginnerHelper = false;
|
||||
@@ -687,11 +688,11 @@ void BackgroundImpl::LoadFromSong( const Song* pSong )
|
||||
m_DangerPlayer[p].FinishTweening();
|
||||
m_DangerPlayer[p].PlayCommand( "On" );
|
||||
|
||||
m_DeadPlayer[p].SetXY( (float)LEFT_EDGE, (float)TOP_EDGE );
|
||||
m_DeadPlayer[p].SetZoomX( fXZoom );
|
||||
m_DeadPlayer[p].SetZoomY( fYZoom );
|
||||
m_DeadPlayer[p].FinishTweening();
|
||||
m_DeadPlayer[p].PlayCommand( "On" );
|
||||
m_DeadPlayer[p]->SetXY( (float)LEFT_EDGE, (float)TOP_EDGE );
|
||||
m_DeadPlayer[p]->SetZoomX( fXZoom );
|
||||
m_DeadPlayer[p]->SetZoomY( fYZoom );
|
||||
m_DeadPlayer[p]->FinishTweening();
|
||||
m_DeadPlayer[p]->PlayCommand( "On" );
|
||||
}
|
||||
|
||||
TEXTUREMAN->EnableOddDimensionWarning();
|
||||
@@ -860,7 +861,7 @@ void BackgroundImpl::Update( float fDeltaTime )
|
||||
m_DangerPlayer[p].Update( fDeltaTime );
|
||||
|
||||
if( GAMESTATE->IsPlayerDead(GAMESTATE->m_pPlayerState[p]) )
|
||||
m_DeadPlayer[p].Update( fDeltaTime );
|
||||
m_DeadPlayer[p]->Update( fDeltaTime );
|
||||
}
|
||||
|
||||
if( m_pDancingCharacters )
|
||||
@@ -910,7 +911,7 @@ void BackgroundImpl::DrawPrimitives()
|
||||
if( GAMESTATE->IsPlayerInDanger(GAMESTATE->m_pPlayerState[p]) )
|
||||
m_DangerPlayer[p].Draw();
|
||||
if( GAMESTATE->IsPlayerDead(GAMESTATE->m_pPlayerState[p]) )
|
||||
m_DeadPlayer[p].Draw();
|
||||
m_DeadPlayer[p]->Draw();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user