simplify
This commit is contained in:
@@ -12,11 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "HoldGhostArrow.h"
|
#include "HoldGhostArrow.h"
|
||||||
#include "PrefsManager.h"
|
|
||||||
#include "RageException.h"
|
|
||||||
#include "RageTimer.h"
|
|
||||||
#include "NoteSkinManager.h"
|
#include "NoteSkinManager.h"
|
||||||
#include "GameState.h"
|
|
||||||
|
|
||||||
HoldGhostArrow::HoldGhostArrow()
|
HoldGhostArrow::HoldGhostArrow()
|
||||||
{
|
{
|
||||||
@@ -26,8 +22,7 @@ HoldGhostArrow::HoldGhostArrow()
|
|||||||
void HoldGhostArrow::Load( CString sNoteSkin, CString sButton, CString sElement )
|
void HoldGhostArrow::Load( CString sNoteSkin, CString sButton, CString sElement )
|
||||||
{
|
{
|
||||||
Sprite::Load( NOTESKIN->GetPathToFromNoteSkinAndButton(sNoteSkin, sButton, sElement) ); // not optional
|
Sprite::Load( NOTESKIN->GetPathToFromNoteSkinAndButton(sNoteSkin, sButton, sElement) ); // not optional
|
||||||
m_sOnCommand = NOTESKIN->GetMetric(sNoteSkin,"HoldGhostArrow","OnCommand");
|
this->Command( NOTESKIN->GetMetric(sNoteSkin,"HoldGhostArrow","OnCommand") );
|
||||||
this->Command( m_sOnCommand );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HoldGhostArrow::Update( float fDeltaTime )
|
void HoldGhostArrow::Update( float fDeltaTime )
|
||||||
@@ -36,11 +31,3 @@ void HoldGhostArrow::Update( float fDeltaTime )
|
|||||||
|
|
||||||
m_bHoldIsActive = false;
|
m_bHoldIsActive = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HoldGhostArrow::DrawPrimitives()
|
|
||||||
{
|
|
||||||
if( !m_bHoldIsActive )
|
|
||||||
return;
|
|
||||||
|
|
||||||
Sprite::DrawPrimitives();
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Sprite.h"
|
#include "Sprite.h"
|
||||||
#include "PlayerNumber.h"
|
|
||||||
|
|
||||||
class HoldGhostArrow : public Sprite
|
class HoldGhostArrow : public Sprite
|
||||||
{
|
{
|
||||||
@@ -23,12 +22,12 @@ public:
|
|||||||
virtual void Load( CString sNoteSkin, CString sButton, CString sElement );
|
virtual void Load( CString sNoteSkin, CString sButton, CString sElement );
|
||||||
|
|
||||||
virtual void Update( float fDeltaTime );
|
virtual void Update( float fDeltaTime );
|
||||||
virtual void DrawPrimitives();
|
virtual bool EarlyAbortDraw() { return !m_bHoldIsActive; }
|
||||||
|
|
||||||
void SetHoldIsActive( bool bHoldIsActive ) { m_bHoldIsActive = bHoldIsActive; }
|
void SetHoldIsActive( bool bHoldIsActive ) { m_bHoldIsActive = bHoldIsActive; }
|
||||||
|
|
||||||
|
private:
|
||||||
bool m_bHoldIsActive;
|
bool m_bHoldIsActive;
|
||||||
CString m_sOnCommand;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user