Files
itgmania212121/stepmania/src/GhostArrow.cpp
T

52 lines
1.3 KiB
C++
Raw Normal View History

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