move Attack out of GameState

This commit is contained in:
Glenn Maynard
2003-10-25 22:00:58 +00:00
parent cefc7f6685
commit e550d16195
15 changed files with 118 additions and 79 deletions
+18
View File
@@ -0,0 +1,18 @@
#include "global.h"
#include "Attack.h"
#include "GameState.h"
#include "song.h"
void Attack::GetAttackBeats( const Song *song, PlayerNumber pn, float &fStartBeat, float &fEndBeat ) const
{
if( fStartSecond >= 0 )
{
fStartBeat = song->GetBeatFromElapsedTime( fStartSecond );
fEndBeat = song->GetBeatFromElapsedTime( fStartSecond+fSecsRemaining );
} else {
/* We're setting this effect on the fly. If it's an arrow-changing effect
* (transform or note skin), apply it in the future, past what's currently on
* screen, so new arrows will scroll on screen with this effect. */
GAMESTATE->GetUndisplayedBeats( pn, fSecsRemaining, fStartBeat, fEndBeat );
}
}