This commit is contained in:
parent
6f467a179e
commit
6deb46042f
13 changed files with 309 additions and 36 deletions
53
source/triggers/tfemit.cpp
Normal file
53
source/triggers/tfemit.cpp
Normal file
|
@ -0,0 +1,53 @@
|
|||
/*=========================================================================
|
||||
|
||||
tfemit.h
|
||||
|
||||
Author: PKG
|
||||
Created:
|
||||
Project: Spongebob
|
||||
Purpose:
|
||||
|
||||
Copyright (c) 2001 Climax Development Ltd
|
||||
|
||||
===========================================================================*/
|
||||
|
||||
#ifndef __TRIGGERS_TFEMIT_H__
|
||||
#include "triggers\tfemit.h"
|
||||
#endif
|
||||
|
||||
#ifndef __PLAYER_PLAYER_H__
|
||||
#include "player\player.h"
|
||||
#endif
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CFlameEmitterTrigger::setPositionAndSize(int _x,int _y,int _w,int _h)
|
||||
{
|
||||
CTrigger::setPositionAndSize( _x, _y, _w, _h );
|
||||
|
||||
m_effect = CFX::Create( CFX::FX_TYPE_FLAMES, Pos );
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CFlameEmitterTrigger::collidedWith(CThing *_thisThing)
|
||||
{
|
||||
switch(_thisThing->getThingType())
|
||||
{
|
||||
case TYPE_PLAYER:
|
||||
{
|
||||
CPlayer *player = (CPlayer *) _thisThing;
|
||||
|
||||
if ( !player->isRecoveringFromHit() )
|
||||
{
|
||||
player->takeDamage( DAMAGE__BURN_ENEMY );
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue