This commit is contained in:
parent
f3c69806b7
commit
87d561c4ab
19 changed files with 331 additions and 65 deletions
|
@ -131,6 +131,22 @@
|
|||
#include "triggers\tsrightemit.h"
|
||||
#endif
|
||||
|
||||
#ifndef __TRIGGERS_TWINDUP_H__
|
||||
#include "triggers\twindup.h"
|
||||
#endif
|
||||
|
||||
#ifndef __TRIGGERS_TWINDDOWN_H__
|
||||
#include "triggers\twinddown.h"
|
||||
#endif
|
||||
|
||||
#ifndef __TRIGGERS_TWINDLEFT_H__
|
||||
#include "triggers\twindleft.h"
|
||||
#endif
|
||||
|
||||
#ifndef __TRIGGERS_TWINDRIGHT_H__
|
||||
#include "triggers\twindright.h"
|
||||
#endif
|
||||
|
||||
#ifndef __GAME_GAME_H__
|
||||
#include "game\game.h"
|
||||
#endif
|
||||
|
@ -291,6 +307,26 @@ CTrigger *trigger;
|
|||
trigger=(CSteamSwitchEmitterTrigger*)new("SteamSwitchEmitterTrigger") CSteamSwitchEmitterTrigger();
|
||||
break;
|
||||
|
||||
// Wind up
|
||||
case TRIGGER_WIND_UP:
|
||||
trigger = (CWindUpTrigger*)new("WindUpTrigger") CWindUpTrigger();
|
||||
break;
|
||||
|
||||
// Wind down
|
||||
case TRIGGER_WIND_DOWN:
|
||||
trigger = (CWindDownTrigger*)new("WindDownTrigger") CWindDownTrigger();
|
||||
break;
|
||||
|
||||
// Wind up
|
||||
case TRIGGER_WIND_LEFT:
|
||||
trigger = (CWindLeftTrigger*)new("WindLeftTrigger") CWindLeftTrigger();
|
||||
break;
|
||||
|
||||
// Wind up
|
||||
case TRIGGER_WIND_RIGHT:
|
||||
trigger = (CWindRightTrigger*)new("WindRightTrigger") CWindRightTrigger();
|
||||
break;
|
||||
|
||||
default:
|
||||
trigger=NULL;
|
||||
}
|
||||
|
|
|
@ -51,6 +51,10 @@ enum TRIGGER_TYPE
|
|||
TRIGGER_STEAM_DOWN_EMITTER,
|
||||
TRIGGER_STEAM_LEFT_EMITTER,
|
||||
TRIGGER_STEAM_RIGHT_EMITTER,
|
||||
TRIGGER_WIND_UP,
|
||||
TRIGGER_WIND_DOWN,
|
||||
TRIGGER_WIND_LEFT,
|
||||
TRIGGER_WIND_RIGHT,
|
||||
|
||||
// Code based triggers
|
||||
TRIGGER_PLATFORM,
|
||||
|
|
|
@ -37,6 +37,8 @@ void CWindDownTrigger::collidedWith(CThing *_thisThing)
|
|||
move.vy = 4 * GameState::getFramesSinceLast();
|
||||
|
||||
player->shove( move );
|
||||
move.vx = player->getMoveVelocity()->vx;
|
||||
player->setMoveVelocity( &move );
|
||||
player->setFloating();
|
||||
|
||||
break;
|
||||
|
|
|
@ -37,6 +37,7 @@ void CWindLeftTrigger::collidedWith(CThing *_thisThing)
|
|||
move.vy = 0;
|
||||
|
||||
player->shove( move );
|
||||
player->setMoveVelocity( &move );
|
||||
player->setFloating();
|
||||
|
||||
break;
|
||||
|
|
|
@ -37,6 +37,7 @@ void CWindRightTrigger::collidedWith(CThing *_thisThing)
|
|||
move.vy = 0;
|
||||
|
||||
player->shove( move );
|
||||
player->setMoveVelocity( &move );
|
||||
player->setFloating();
|
||||
|
||||
break;
|
||||
|
|
|
@ -33,9 +33,12 @@ void CWindUpTrigger::collidedWith(CThing *_thisThing)
|
|||
CPlayer *player = (CPlayer *) _thisThing;
|
||||
|
||||
DVECTOR move;
|
||||
move.vx = 0;
|
||||
move.vy = -4 * GameState::getFramesSinceLast();
|
||||
|
||||
player->shove( move );
|
||||
move.vx = player->getMoveVelocity()->vx;
|
||||
player->setMoveVelocity( &move );
|
||||
player->setFloating();
|
||||
|
||||
break;
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
Includes
|
||||
-------- */
|
||||
|
||||
#ifndef __TRIGGERS_THAZARD_H__
|
||||
#include "triggers\thazard.h"
|
||||
#ifndef __TRIGGER_TRIGGER_HEADER__
|
||||
#include "triggers\trigger.h"
|
||||
#endif
|
||||
|
||||
/* Std Lib
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue