This commit is contained in:
parent
c65313ce30
commit
1282474508
2 changed files with 132 additions and 0 deletions
75
source/triggers/tbuttfly.cpp
Normal file
75
source/triggers/tbuttfly.cpp
Normal file
|
@ -0,0 +1,75 @@
|
|||
/*=========================================================================
|
||||
|
||||
tbuttfly.cpp
|
||||
|
||||
Author: CRB
|
||||
Created:
|
||||
Project: Spongebob
|
||||
Purpose:
|
||||
|
||||
Copyright (c) 2001 Climax Development Ltd
|
||||
|
||||
===========================================================================*/
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Includes
|
||||
-------- */
|
||||
|
||||
#include "triggers\trigger.h"
|
||||
|
||||
#include "triggers\tbuttfly.h"
|
||||
|
||||
#ifndef __PLAYER_PLAYER_H__
|
||||
#include "player\player.h"
|
||||
#endif
|
||||
|
||||
#ifndef __JELLFISH_JELLFISH_H__
|
||||
#include "jellfish\jellfish.h"
|
||||
#endif
|
||||
|
||||
/* Std Lib
|
||||
------- */
|
||||
|
||||
/* Data
|
||||
---- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Tyepdefs && Defines
|
||||
------------------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Structure defintions
|
||||
-------------------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function Prototypes
|
||||
------------------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Vars
|
||||
---- */
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CButterflyTrigger::collidedWith(CThing *_thisThing)
|
||||
{
|
||||
switch( _thisThing->getThingType() )
|
||||
{
|
||||
case TYPE_PLAYER:
|
||||
{
|
||||
CJellyfishGenerator::start();
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*===========================================================================
|
||||
end */
|
57
source/triggers/tbuttfly.h
Normal file
57
source/triggers/tbuttfly.h
Normal file
|
@ -0,0 +1,57 @@
|
|||
/*=========================================================================
|
||||
|
||||
tbuttfly.h
|
||||
|
||||
Author: CRB
|
||||
Created:
|
||||
Project: Spongebob
|
||||
Purpose:
|
||||
|
||||
Copyright (c) 2001 Climax Development Ltd
|
||||
|
||||
===========================================================================*/
|
||||
|
||||
#ifndef __TRIGGERS_TBUTTFLY_H__
|
||||
#define __TRIGGERS_TBUTTFLY_H__
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Includes
|
||||
-------- */
|
||||
|
||||
#ifndef __THING_THING_H__
|
||||
#include "thing/thing.h"
|
||||
#endif
|
||||
|
||||
|
||||
/* Std Lib
|
||||
------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Tyepdefs && Defines
|
||||
------------------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Structure defintions
|
||||
-------------------- */
|
||||
|
||||
class CButterflyTrigger : public CTrigger
|
||||
{
|
||||
protected:
|
||||
virtual void collidedWith(CThing *_thisThing);
|
||||
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Globals
|
||||
------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Functions
|
||||
--------- */
|
||||
|
||||
/*---------------------------------------------------------------------- */
|
||||
|
||||
#endif /* __TRIGGERS_TBUTTFLY_H__ */
|
||||
|
||||
/*===========================================================================
|
||||
end */
|
Loading…
Add table
Add a link
Reference in a new issue