SBSPSS/source/triggers/tgbowl.cpp
Charles fa875178a9
2001-06-07 20:06:31 +00:00

88 lines
1.8 KiB
C++

/*=========================================================================
tgbowl.cpp
Author: CRB
Created:
Project: Spongebob
Purpose:
Copyright (c) 2001 Climax Development Ltd
===========================================================================*/
/*----------------------------------------------------------------------
Includes
-------- */
#include "triggers\trigger.h"
#include "triggers\tgbowl.h"
#ifndef __GAME_GAME_H__
#include "game\game.h"
#endif
/* Std Lib
------- */
/* Data
---- */
/*----------------------------------------------------------------------
Tyepdefs && Defines
------------------- */
/*----------------------------------------------------------------------
Structure defintions
-------------------- */
/*----------------------------------------------------------------------
Function Prototypes
------------------- */
/*----------------------------------------------------------------------
Vars
---- */
/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CGaryBowlTrigger::collidedWith(CThing *_thisThing)
{
switch( _thisThing->getThingType() )
{
case TYPE_NPC:
{
CGameScene::levelFinished();
break;
}
default:
break;
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CRECT *CGaryBowlTrigger::getThinkBBox()
{
CRECT objThinkBox = getCollisionArea();
sBBox &thinkBBox = CThingManager::getThinkBBox();
objThinkBox.x1 = thinkBBox.XMin;
objThinkBox.x2 = thinkBBox.XMax;
objThinkBox.y1 = thinkBBox.YMin;
objThinkBox.y2 = thinkBBox.YMax;
return &objThinkBox;
}
/*===========================================================================
end */