This commit is contained in:
parent
c429fd833a
commit
6867ac9812
4 changed files with 280 additions and 0 deletions
48
source/triggers/twindup.cpp
Normal file
48
source/triggers/twindup.cpp
Normal file
|
@ -0,0 +1,48 @@
|
|||
/*=========================================================================
|
||||
|
||||
twindup.cpp
|
||||
|
||||
Author: Charles Blair
|
||||
Created:
|
||||
Project: Spongebob
|
||||
Purpose:
|
||||
|
||||
Copyright (c) 2001 Climax Development Ltd
|
||||
|
||||
===========================================================================*/
|
||||
|
||||
#ifndef __TRIGGERS_TWINDUP_H__
|
||||
#include "triggers\twindup.h"
|
||||
#endif
|
||||
|
||||
#ifndef __PLAYER_PLAYER_H__
|
||||
#include "player\player.h"
|
||||
#endif
|
||||
|
||||
#ifndef __SYSTEM_GSTATE_H__
|
||||
#include "system\gstate.h"
|
||||
#endif
|
||||
|
||||
|
||||
void CWindUpTrigger::collidedWith(CThing *_thisThing)
|
||||
{
|
||||
switch( _thisThing->getThingType() )
|
||||
{
|
||||
case TYPE_PLAYER:
|
||||
{
|
||||
CPlayer *player = (CPlayer *) _thisThing;
|
||||
|
||||
DVECTOR move;
|
||||
move.vy = -4 * GameState::getFramesSinceLast();
|
||||
|
||||
player->shove( move );
|
||||
player->setFloating();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue