SBSPSS/source/triggers/twinddown.cpp
Charles 64c91504d6
2001-06-15 21:09:25 +00:00

50 lines
831 B
C++

/*=========================================================================
twinddown.cpp
Author: Charles Blair
Created:
Project: Spongebob
Purpose:
Copyright (c) 2001 Climax Development Ltd
===========================================================================*/
#ifndef __TRIGGERS_TWINDDOWN_H__
#include "triggers\twinddown.h"
#endif
#ifndef __PLAYER_PLAYER_H__
#include "player\player.h"
#endif
#ifndef __SYSTEM_GSTATE_H__
#include "system\gstate.h"
#endif
void CWindDownTrigger::collidedWith(CThing *_thisThing)
{
switch( _thisThing->getThingType() )
{
case TYPE_PLAYER:
{
CPlayer *player = (CPlayer *) _thisThing;
DVECTOR move;
move.vx = 0;
move.vy = 4 * GameState::getFramesSinceLast();
player->shove( move );
player->setFloating();
break;
}
default:
break;
}
}