VSLib
Simple, powerful VScript Library for L4D2
 All Classes Namespaces Files Functions Pages
VSLib.HUD.Countdown Class Reference

Countdown HUD item. This is a HUD item that acts as a countdown. When the countdown is over, it fires a function of your choice. More...

Inheritance diagram for VSLib.HUD.Countdown:
VSLib.HUD.Item

Private Member Functions

 Countdown (string formatStr="{hrs}:{min}:{sec}", bool minutesOnly=false)
 
void Start (function func, int hours=0, int minutes=0, int seconds=0)
 
void Detach ()
 
void Stop ()
 
 void (int hours=0, int minutes=0, int seconds=0)
 
void Tick ()
 
string GetString ()
 
string GetTickString (string strFormated)
 

Detailed Description

Countdown HUD item. This is a HUD item that acts as a countdown. When the countdown is over, it fires a function of your choice.

Constructor & Destructor Documentation

VSLib.HUD.Countdown.Countdown ( string  formatStr = "{hrs}:{min}:{sec}",
bool  minutesOnly = false 
)
private

Creates the HUD item with a format string.

Parameters
formatStrThe format string; default will display as "00:14:23" for example
minutesOnlyIf true, hours will add to the minutes; e.g. 01:05:10 will display as 00:65:10

Member Function Documentation

void VSLib.HUD.Countdown.Detach ( )
private

Stops and detaches the HUD object.

string VSLib.HUD.Countdown.GetString ( )
private

Returns the full formatted string

string VSLib.HUD.Countdown.GetTickString ( string  strFormated)
private

Returns the current formatted time as a string

void VSLib.HUD.Countdown.Start ( function  func,
int  hours = 0,
int  minutes = 0,
int  seconds = 0 
)
private

Starts the countdown from the specified time

void VSLib.HUD.Countdown.Stop ( )
private

Stops the countdown

void VSLib.HUD.Countdown.Tick ( )
private

Calculates time-based mechanisms such as blinking and function calling

VSLib.HUD.Countdown.void ( int  hours = 0,
int  minutes = 0,
int  seconds = 0 
)
private

Sets a time to begin blinking


The documentation for this class was generated from the following file: