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
|
|
|
}
|
|
|
|
|
|
2002-03-19 07:09:49 +00:00
|
|
|
void GhostArrow::Step( TapNoteScore score )
|
2001-12-01 23:46:09 +00:00
|
|
|
{
|
|
|
|
|
switch( score )
|
|
|
|
|
{
|
2002-03-19 07:09:49 +00:00
|
|
|
case TNS_PERFECT: SetDiffuseColor( D3DXCOLOR(1.0f,1.0f,0.3f,0.6f) ); break; // yellow
|
|
|
|
|
case TNS_GREAT: SetDiffuseColor( D3DXCOLOR(0.0f,1.0f,0.4f,0.6f) ); break; // green
|
|
|
|
|
case TNS_GOOD: SetDiffuseColor( D3DXCOLOR(0.3f,0.8f,1.0f,0.6f) ); break;
|
|
|
|
|
case TNS_BOO: SetDiffuseColor( D3DXCOLOR(0.8f,0.0f,0.6f,0.6f) ); break;
|
|
|
|
|
case TNS_MISS: ASSERT( false ); break;
|
2001-12-01 23:46:09 +00:00
|
|
|
}
|
2002-05-19 01:59:48 +00:00
|
|
|
SetZoom( 1.1f );
|
|
|
|
|
BeginTweening( 0.30f );
|
|
|
|
|
SetTweenZoom( 1.7f );
|
2001-12-01 23:46:09 +00:00
|
|
|
D3DXCOLOR colorTween = GetDiffuseColor();
|
|
|
|
|
colorTween.a = 0;
|
|
|
|
|
SetTweenDiffuseColor( colorTween );
|
|
|
|
|
|
|
|
|
|
}
|