You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
95 lines
2.2 KiB
95 lines
2.2 KiB
//========= Copyright Valve Corporation, All rights reserved. ============// |
|
// |
|
// Purpose: |
|
// |
|
// $NoKeywords: $ |
|
//=============================================================================// |
|
|
|
#ifndef C_OBJ_DISPENSER_H |
|
#define C_OBJ_DISPENSER_H |
|
#ifdef _WIN32 |
|
#pragma once |
|
#endif |
|
|
|
#include "c_baseobject.h" |
|
#include "ObjectControlPanel.h" |
|
#include "vgui_controls/RotatingProgressBar.h" |
|
|
|
class C_ObjectDispenser : public C_BaseObject |
|
{ |
|
DECLARE_CLASS( C_ObjectDispenser, C_BaseObject ); |
|
public: |
|
DECLARE_CLIENTCLASS(); |
|
|
|
C_ObjectDispenser(); |
|
~C_ObjectDispenser(); |
|
|
|
int GetMetalAmmoCount() { return m_iAmmoMetal; } |
|
|
|
CUtlVector< CHandle<C_TFPlayer> > m_hHealingTargets; |
|
|
|
virtual void OnDataChanged( DataUpdateType_t updateType ); |
|
virtual void ClientThink() OVERRIDE; |
|
|
|
virtual void SetInvisibilityLevel( float flValue ); |
|
void UpdateEffects( void ); |
|
void StopEffects( bool bRemoveAll = false ); |
|
|
|
virtual void UpdateDamageEffects( BuildingDamageLevel_t damageLevel ); |
|
|
|
virtual int GetMaxMetal( void ); |
|
|
|
bool m_bUpdateHealingTargets; |
|
|
|
private: |
|
|
|
|
|
int m_iState; |
|
int m_iAmmoMetal; |
|
int m_iMiniBombCounter; |
|
|
|
bool m_bPlayingSound; |
|
|
|
struct healingtargeteffects_t |
|
{ |
|
C_BaseEntity *pTarget; |
|
CNewParticleEffect *pEffect; |
|
}; |
|
CUtlVector<healingtargeteffects_t> m_hHealingTargetEffects; |
|
|
|
C_ObjectDispenser( const C_ObjectDispenser & ); // not defined, not accessible |
|
}; |
|
|
|
|
|
class CDispenserControlPanel : public CObjectControlPanel |
|
{ |
|
DECLARE_CLASS( CDispenserControlPanel, CObjectControlPanel ); |
|
|
|
public: |
|
CDispenserControlPanel( vgui::Panel *parent, const char *panelName ); |
|
|
|
protected: |
|
virtual void OnTickActive( C_BaseObject *pObj, C_TFPlayer *pLocalPlayer ); |
|
virtual bool IsVisible() OVERRIDE; |
|
|
|
private: |
|
vgui::RotatingProgressBar *m_pAmmoProgress; |
|
CHandle< C_ObjectDispenser > m_hDispenser; |
|
}; |
|
|
|
class CDispenserControlPanel_Red : public CDispenserControlPanel |
|
{ |
|
DECLARE_CLASS( CDispenserControlPanel_Red, CDispenserControlPanel ); |
|
|
|
public: |
|
CDispenserControlPanel_Red( vgui::Panel *parent, const char *panelName ) : CDispenserControlPanel( parent, panelName ) {} |
|
}; |
|
|
|
|
|
class C_ObjectCartDispenser : public C_ObjectDispenser |
|
{ |
|
DECLARE_CLASS( C_ObjectCartDispenser, C_ObjectDispenser ); |
|
public: |
|
DECLARE_CLIENTCLASS(); |
|
}; |
|
#endif //C_OBJ_DISPENSER_H
|