Files
itgmania212121/stepmania/src/GhostArrowBright.cpp
T

49 lines
1.3 KiB
C++
Raw Normal View History

2001-12-28 10:15:59 +00:00
#include "stdafx.h"
//
// GhostArrowBright.cpp: implementation of the GhostArrowBright class.
//
//////////////////////////////////////////////////////////////////////
#include "GhostArrowBright.h"
2002-01-16 10:01:32 +00:00
#include "ThemeManager.h"
2001-12-28 10:15:59 +00:00
const float GRAY_ARROW_TWEEN_TIME = 0.5f;
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
GhostArrowBright::GhostArrowBright()
{
2002-02-24 01:43:11 +00:00
Load( THEME->GetPathTo(GRAPHIC_BRIGHT_GHOST_ARROW) );
2001-12-28 10:15:59 +00:00
SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
TurnShadowOff();
}
void GhostArrowBright::SetBeat( const float fSongBeat )
{
2002-02-28 19:40:40 +00:00
//SetState( fmodf(fSongBeat,1)<0.25 ? 1 : 0 );
2001-12-28 10:15:59 +00:00
}
void GhostArrowBright::Step( TapNoteScore score )
2001-12-28 10:15:59 +00:00
{
switch( score )
{
case TNS_PERFECT: SetDiffuseColor( D3DXCOLOR(1.0f,1.0f,0.3f,1.0f) ); break; // yellow
case TNS_GREAT: SetDiffuseColor( D3DXCOLOR(0.0f,1.0f,0.4f,1.0f) ); break; // green
case TNS_GOOD: SetDiffuseColor( D3DXCOLOR(0.3f,0.8f,1.0f,1.0f) ); break;
case TNS_BOO: SetDiffuseColor( D3DXCOLOR(0.8f,0.0f,0.6f,1.0f) ); break;
case TNS_MISS: ASSERT( false ); break;
2001-12-28 10:15:59 +00:00
}
SetState( 0 );
SetZoom( 1.2f );
2002-02-24 01:43:11 +00:00
BeginTweening( 0.35f );
2001-12-28 10:15:59 +00:00
SetTweenZoom( 2.5f );
D3DXCOLOR colorTween = GetDiffuseColor();
colorTween.a = 0;
SetTweenDiffuseColor( colorTween );
}