diff --git a/source/triggers/tspeech.cpp b/source/triggers/tspeech.cpp new file mode 100644 index 000000000..36b92ee5a --- /dev/null +++ b/source/triggers/tspeech.cpp @@ -0,0 +1,43 @@ +/*========================================================================= + + tspeech.h + + Author: CRB + Created: + Project: Spongebob + Purpose: + + Copyright (c) 2001 Climax Development Ltd + +===========================================================================*/ + +#ifndef __TRIGGERS_TSPEECH_H__ +#include "triggers\tspeech.h" +#endif + + + +/*---------------------------------------------------------------------- + Function: + Purpose: + Params: + Returns: + ---------------------------------------------------------------------- */ +void CSpeechTrigger::collidedWith(CThing *_thisThing) +{ + switch( _thisThing->getThingType() ) + { + case TYPE_PLAYER: + { + setToShutdown(); + + break; + } + + default: + break; + } +} + +/*=========================================================================== +end */ diff --git a/source/triggers/tspeech.h b/source/triggers/tspeech.h new file mode 100644 index 000000000..c2a1c192d --- /dev/null +++ b/source/triggers/tspeech.h @@ -0,0 +1,65 @@ +/*========================================================================= + + tspeech.h + + Author: CRB + Created: + Project: Spongebob + Purpose: + + Copyright (c) 2001 Climax Development Ltd + +===========================================================================*/ + +#ifndef __TRIGGERS_TSPEECH_H__ +#define __TRIGGERS_TSPEECH_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 CSpeechTrigger : public CTrigger +{ +public: + void setData(int newData) {m_data=newData;} +protected: + virtual void collidedWith(CThing *_thisThing); + + int m_data; +}; + +/*---------------------------------------------------------------------- + Globals + ------- */ + +/*---------------------------------------------------------------------- + Functions + --------- */ + +/*---------------------------------------------------------------------- */ + +#endif + +/*=========================================================================== + end */