This commit is contained in:
parent
18302c41f4
commit
98eb8b94ce
2 changed files with 108 additions and 0 deletions
43
source/triggers/tspeech.cpp
Normal file
43
source/triggers/tspeech.cpp
Normal file
|
@ -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 */
|
65
source/triggers/tspeech.h
Normal file
65
source/triggers/tspeech.h
Normal file
|
@ -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 */
|
Loading…
Add table
Reference in a new issue