mirror of
https://github.com/celisej567/source-engine.git
synced 2026-09-27 16:15:14 +03:00
upload "kind" alien swarm
This commit is contained in:
43
game/client/swarm/c_asw_objective_countdown.cpp
Normal file
43
game/client/swarm/c_asw_objective_countdown.cpp
Normal file
@@ -0,0 +1,43 @@
|
||||
#include "cbase.h"
|
||||
#include "c_asw_objective_countdown.h"
|
||||
#include "asw_vgui_countdown.h"
|
||||
#include "iclientmode.h"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
IMPLEMENT_CLIENTCLASS_DT(C_ASW_Objective_Countdown, DT_ASW_Objective_Countdown, CASW_Objective_Countdown)
|
||||
RecvPropFloat ( RECVINFO( m_fCountdownFinishTime ) ),
|
||||
END_RECV_TABLE()
|
||||
|
||||
|
||||
C_ASW_Objective_Countdown::C_ASW_Objective_Countdown()
|
||||
{
|
||||
m_bLaunchedPanel = false;
|
||||
}
|
||||
|
||||
C_ASW_Objective_Countdown::~C_ASW_Objective_Countdown()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void C_ASW_Objective_Countdown::OnDataChanged( DataUpdateType_t updateType )
|
||||
{
|
||||
BaseClass::OnDataChanged(updateType);
|
||||
|
||||
if (m_fCountdownFinishTime != 0 && !m_bLaunchedPanel)
|
||||
{
|
||||
// create panel to show countdown timer
|
||||
m_bLaunchedPanel = true;
|
||||
|
||||
FOR_EACH_VALID_SPLITSCREEN_PLAYER( hh )
|
||||
{
|
||||
ACTIVE_SPLITSCREEN_PLAYER_GUARD( hh );
|
||||
|
||||
CASW_VGUI_Countdown_Panel *pCountdownPanel = new CASW_VGUI_Countdown_Panel( GetClientMode()->GetViewport(), "CountdownPanel", this );
|
||||
vgui::HScheme scheme = vgui::scheme()->LoadSchemeFromFile("resource/SwarmSchemeNew.res", "SwarmSchemeNew");
|
||||
pCountdownPanel->SetScheme(scheme);
|
||||
pCountdownPanel->SetVisible(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user