This commit is contained in:
parent
abd972b38a
commit
f1fd2a9089
2 changed files with 112 additions and 0 deletions
48
source/triggers/toilgeyser.cpp
Normal file
48
source/triggers/toilgeyser.cpp
Normal file
|
@ -0,0 +1,48 @@
|
|||
/*=========================================================================
|
||||
|
||||
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 );
|
||||
|
||||
m_timer = GameState::getOneSecondInFrames() >> 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_timer -= _frames;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CWaterDripEmitterTrigger::setPositionAndSize(int _x,int _y,int _w,int _h)
|
||||
{
|
||||
CTrigger::setPositionAndSize( _x, _y, _w, _h );
|
||||
|
||||
m_timer = 0;
|
||||
}
|
64
source/triggers/toilgeyser.h
Normal file
64
source/triggers/toilgeyser.h
Normal file
|
@ -0,0 +1,64 @@
|
|||
/*=========================================================================
|
||||
|
||||
twdripemit.h
|
||||
|
||||
Author: CRB
|
||||
Created:
|
||||
Project: Spongebob
|
||||
Purpose:
|
||||
|
||||
Copyright (c) 2001 Climax Development Ltd
|
||||
|
||||
===========================================================================*/
|
||||
|
||||
#ifndef __TRIGGERS_TWDRIPEMIT_H__
|
||||
#define __TRIGGERS_TWDRIPEMIT_H__
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Includes
|
||||
-------- */
|
||||
|
||||
#ifndef __THING_THING_H__
|
||||
#include "thing/thing.h"
|
||||
#endif
|
||||
|
||||
#ifndef __TRIGGER_TRIGGER_HEADER__
|
||||
#include "triggers\trigger.h"
|
||||
#endif
|
||||
|
||||
#include "fx\fx.h"
|
||||
|
||||
/* Std Lib
|
||||
------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Tyepdefs && Defines
|
||||
------------------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Structure defintions
|
||||
-------------------- */
|
||||
|
||||
class CWaterDripEmitterTrigger : public CTrigger
|
||||
{
|
||||
public:
|
||||
virtual void think(int _frames);
|
||||
virtual void setPositionAndSize(int _x,int _y,int _w,int _h);
|
||||
protected:
|
||||
s32 m_timer;
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Globals
|
||||
------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Functions
|
||||
--------- */
|
||||
|
||||
/*---------------------------------------------------------------------- */
|
||||
|
||||
#endif
|
||||
|
||||
/*===========================================================================
|
||||
end */
|
Loading…
Add table
Reference in a new issue