2001-06-19 23:20:25 +02:00
|
|
|
/*=========================================================================
|
|
|
|
|
2001-06-19 23:35:02 +02:00
|
|
|
toilgeysor
|
2001-06-19 23:20:25 +02:00
|
|
|
|
2001-06-19 23:35:02 +02:00
|
|
|
Author: Dave - based on the original story by CB
|
2001-06-19 23:20:25 +02:00
|
|
|
Created:
|
|
|
|
Project: Spongebob
|
|
|
|
Purpose:
|
|
|
|
|
|
|
|
Copyright (c) 2001 Climax Development Ltd
|
|
|
|
|
|
|
|
===========================================================================*/
|
|
|
|
|
2001-06-19 23:35:02 +02:00
|
|
|
#ifndef __TRIGGERS_TOILGEYSER_H__
|
|
|
|
#include "triggers\toilgeyser.h"
|
2001-06-19 23:20:25 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __GAME_GAME_H__
|
|
|
|
#include "game\game.h"
|
|
|
|
#endif
|
|
|
|
|
2001-06-19 23:35:02 +02:00
|
|
|
#include "fx/fxgeyser.h"
|
2001-06-19 23:20:25 +02:00
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2001-06-19 23:35:02 +02:00
|
|
|
void COilGeyserTrigger::think(int _frames)
|
2001-06-19 23:20:25 +02:00
|
|
|
{
|
|
|
|
CTrigger::think( _frames );
|
|
|
|
|
|
|
|
if ( m_timer <= 0 )
|
|
|
|
{
|
2001-06-19 23:35:02 +02:00
|
|
|
m_FX->setHeight(m_Height);
|
|
|
|
m_timer = GameState::getOneSecondInFrames() *5;
|
|
|
|
m_Height^=128;
|
2001-06-19 23:20:25 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_timer -= _frames;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2001-06-19 23:35:02 +02:00
|
|
|
void COilGeyserTrigger::setPositionAndSize(int _x,int _y,int _w,int _h)
|
2001-06-19 23:20:25 +02:00
|
|
|
{
|
|
|
|
CTrigger::setPositionAndSize( _x, _y, _w, _h );
|
2001-06-19 23:35:02 +02:00
|
|
|
m_FX=(CFXGeyser*)CFX::Create( CFX::FX_TYPE_GEYSER_OIL, Pos );
|
|
|
|
m_FX->setHeight(0);
|
2001-06-19 23:20:25 +02:00
|
|
|
m_timer = 0;
|
2001-06-19 23:35:02 +02:00
|
|
|
m_Height=128;
|
2001-06-19 23:20:25 +02:00
|
|
|
}
|