Danbias/Code/Game/GameLogic/PickupSystem/PickupHealth.cpp

18 lines
464 B
C++
Raw Normal View History

2014-02-25 14:36:54 +01:00
#include "PickupHealth.h"
using namespace GameLogic;
PickupHealth::PickupHealth(Oyster::Physics::ICustomBody *rigidBody, ObjectSpecialType type, int objectID, Oyster::Math::Float spawnTime, Oyster::Math::Float healthValue)
: Pickup(rigidBody, Pickup::PickupCollision, type, objectID, spawnTime)
{
this->hpValue = healthValue;
}
PickupHealth::~PickupHealth()
{}
void PickupHealth::OnCollision(Player *player)
{
timer.reset();
player->DamageLife(-hpValue);
}