www.pudn.com > MyGame.rar > GameObjTimed.cpp


// GameObjTimed.cpp: implementation of the CGameObjTimed class. 
// 
////////////////////////////////////////////////////////////////////// 
 
#include "stdafx.h" 
#include "MyGame.h" 
#include "GameObjTimed.h" 
 
#ifdef _DEBUG 
#undef THIS_FILE 
static char THIS_FILE[]=__FILE__; 
#define new DEBUG_NEW 
#endif 
 
////////////////////////////////////////////////////////////////////// 
// Construction/Destruction 
////////////////////////////////////////////////////////////////////// 
CGameObjTimed::~CGameObjTimed() 
{ 
 
} 
 
void CGameObjTimed::Update(int t) 
{ 
	ttl-=t; 
	if(ttl<0) active=false; 
	CGameObj::Update(t); 
}