2001-12-01 23:46:09 +00:00
|
|
|
#include "stdafx.h"
|
2002-02-28 19:40:40 +00:00
|
|
|
/*
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
Class: GrayArrow
|
|
|
|
|
|
2002-04-28 20:42:32 +00:00
|
|
|
Desc: A gray arrow that "receives" ColorNotes.
|
2002-02-28 19:40:40 +00:00
|
|
|
|
2002-05-19 01:59:48 +00:00
|
|
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
2002-02-28 19:40:40 +00:00
|
|
|
Ben Nordstrom
|
|
|
|
|
Chris Danford
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
*/
|
2001-12-01 23:46:09 +00:00
|
|
|
|
|
|
|
|
#include "GrayArrow.h"
|
2002-07-23 01:41:40 +00:00
|
|
|
#include "PrefsManager.h"
|
2002-07-28 20:28:37 +00:00
|
|
|
#include "GameState.h"
|
2001-12-01 23:46:09 +00:00
|
|
|
|
2002-07-28 20:28:37 +00:00
|
|
|
|
|
|
|
|
const float GRAY_ARROW_POP_UP_TIME = 0.15f;
|
2001-12-01 23:46:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
GrayArrow::GrayArrow()
|
|
|
|
|
{
|
|
|
|
|
StopAnimating();
|
|
|
|
|
}
|
|
|
|
|
|
2002-07-28 20:28:37 +00:00
|
|
|
void GrayArrow::Update( float fDeltaTime )
|
2001-12-01 23:46:09 +00:00
|
|
|
{
|
2002-07-28 20:28:37 +00:00
|
|
|
Sprite::Update( fDeltaTime );
|
|
|
|
|
|
2002-07-29 03:06:55 +00:00
|
|
|
float fPercentIntoBeat = fmodf(GAMESTATE->m_fSongBeat,1);
|
|
|
|
|
if( fPercentIntoBeat < 0 )
|
|
|
|
|
fPercentIntoBeat += 1;
|
|
|
|
|
int iNewState = fPercentIntoBeat<0.25f ? 0 : 1;
|
|
|
|
|
CLAMP( iNewState, 0, Sprite::GetNumStates() );
|
2002-04-16 17:31:00 +00:00
|
|
|
SetState( iNewState );
|
2001-12-01 23:46:09 +00:00
|
|
|
}
|
|
|
|
|
|
2002-02-24 01:43:11 +00:00
|
|
|
void GrayArrow::Step()
|
2001-12-01 23:46:09 +00:00
|
|
|
{
|
2002-07-11 19:02:26 +00:00
|
|
|
SetZoom( 0.75f );
|
2001-12-01 23:46:09 +00:00
|
|
|
BeginTweening( GRAY_ARROW_POP_UP_TIME );
|
|
|
|
|
SetTweenZoom( 1.0f );
|
|
|
|
|
}
|