This commit is contained in:
parent
5174e489fe
commit
7c1e7b2ab7
2 changed files with 141 additions and 0 deletions
77
source/triggers/twater.cpp
Normal file
77
source/triggers/twater.cpp
Normal file
|
@ -0,0 +1,77 @@
|
|||
/*=========================================================================
|
||||
|
||||
twater.cpp
|
||||
|
||||
Author: PKG
|
||||
Created:
|
||||
Project: Spongebob
|
||||
Purpose:
|
||||
|
||||
Copyright (c) 2001 Climax Development Ltd
|
||||
|
||||
===========================================================================*/
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Includes
|
||||
-------- */
|
||||
|
||||
#include "triggers\twater.h"
|
||||
|
||||
#ifndef __PLAYER_PLAYER_H__
|
||||
#include "player\player.h"
|
||||
#endif
|
||||
|
||||
|
||||
/* Std Lib
|
||||
------- */
|
||||
|
||||
/* Data
|
||||
---- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Tyepdefs && Defines
|
||||
------------------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Structure defintions
|
||||
-------------------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function Prototypes
|
||||
------------------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Vars
|
||||
---- */
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CInWaterTrigger::collidedWith(CThing *_thisThing)
|
||||
{
|
||||
if(_thisThing->getThingType()==TYPE_PLAYER)
|
||||
{
|
||||
// ((CPlayer*)_thisThing)->setCameraBox(camBox);
|
||||
}
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void COutOfWaterTrigger::collidedWith(CThing *_thisThing)
|
||||
{
|
||||
if(_thisThing->getThingType()==TYPE_PLAYER)
|
||||
{
|
||||
// ((CPlayer*)_thisThing)->setCameraBox(camBox);
|
||||
}
|
||||
}
|
||||
|
||||
/*===========================================================================
|
||||
end */
|
64
source/triggers/twater.h
Normal file
64
source/triggers/twater.h
Normal file
|
@ -0,0 +1,64 @@
|
|||
/*=========================================================================
|
||||
|
||||
twater.h
|
||||
|
||||
Author: PKG
|
||||
Created:
|
||||
Project: Spongebob
|
||||
Purpose:
|
||||
|
||||
Copyright (c) 2001 Climax Development Ltd
|
||||
|
||||
===========================================================================*/
|
||||
|
||||
#ifndef __TRIGGERS_TWATER_H__
|
||||
#define __TRIGGERS_TWATER_H__
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Includes
|
||||
-------- */
|
||||
|
||||
#ifndef __THING_THING_H__
|
||||
#include "thing/thing.h"
|
||||
#endif
|
||||
|
||||
|
||||
/* Std Lib
|
||||
------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Tyepdefs && Defines
|
||||
------------------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Structure defintions
|
||||
-------------------- */
|
||||
|
||||
class CInWaterTrigger : public CTriggerThing
|
||||
{
|
||||
protected:
|
||||
virtual void collidedWith(CThing *_thisThing);
|
||||
|
||||
};
|
||||
|
||||
class COutOfWaterTrigger : public CTriggerThing
|
||||
{
|
||||
protected:
|
||||
virtual void collidedWith(CThing *_thisThing);
|
||||
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Globals
|
||||
------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Functions
|
||||
--------- */
|
||||
|
||||
/*---------------------------------------------------------------------- */
|
||||
|
||||
#endif /* __TRIGGERS_TWATER_H__ */
|
||||
|
||||
/*===========================================================================
|
||||
end */
|
Loading…
Add table
Add a link
Reference in a new issue