From 98eb8b94ce63e96ad32a1a5989fc2845fedca237 Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 13 Jul 2001 18:27:16 +0000 Subject: [PATCH] --- source/triggers/tspeech.cpp | 43 ++++++++++++++++++++++++ source/triggers/tspeech.h | 65 +++++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 source/triggers/tspeech.cpp create mode 100644 source/triggers/tspeech.h 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 */