SBSPSS/source/triggers/tlevexit.cpp
2001-03-05 19:29:48 +00:00

76 lines
1.7 KiB
C++

/*=========================================================================
tlevexit.cpp
Author: PKG
Created:
Project: Spongebob
Purpose:
Copyright (c) 2001 Climax Development Ltd
===========================================================================*/
/*----------------------------------------------------------------------
Includes
-------- */
#include "triggers\tlevexit.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 CLevelExitTrigger::setExitPosition(int _x,int _y,int _w,int _h)
{
Pos.vx=_x+(_w/2);
Pos.vy=_y+(_h/2);
setCollisionSize(_w,_h);
}
/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CLevelExitTrigger::collidedWith(CThing *_thisThing)
{
ASSERT(_thisThing->getThingType()==TYPE_PLAYER);
CGameScene::levelFinished();
}
/*===========================================================================
end */