SBSPSS/source/triggers/twdripemit.cpp

49 lines
1.0 KiB
C++
Raw Normal View History

2001-06-07 18:31:54 +02:00
/*=========================================================================
twdripemit.cpp
Author: CRB
Created:
Project: Spongebob
Purpose:
Copyright (c) 2001 Climax Development Ltd
===========================================================================*/
#ifndef __TRIGGERS_TWDRIPEMIT_H__
#include "triggers\twdripemit.h"
#endif
#ifndef __GAME_GAME_H__
#include "game\game.h"
#endif
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CWaterDripEmitterTrigger::think(int _frames)
{
CTrigger::think( _frames );
if ( m_timer <= 0 )
{
CFX::Create( CFX::FX_TYPE_DROP_WATER, Pos );
2001-07-19 18:24:25 +02:00
m_timer = GameState::getOneSecondInFrames();
2001-06-07 18:31:54 +02:00
}
else
{
m_timer -= _frames;
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CWaterDripEmitterTrigger::setPositionAndSize(int _x,int _y,int _w,int _h)
{
CTrigger::setPositionAndSize( _x, _y, _w, _h );
m_timer = 0;
}