]> git.tdb.fi Git - libs/game.git/blob - examples/bassteroids/source/hittable.cpp
08355f1e39d27eaedf72e814520745a6c3d8228f
[libs/game.git] / examples / bassteroids / source / hittable.cpp
1 #include "hittable.h"
2
3 using namespace Msp;
4
5 Hittable::Hittable(Game::Handle<Game::Entity> p, const Setup &setup, const PhysicalSetup &ps, const Game::TransformValues &tv):
6         PhysicalEntity(p, ps, tv)
7 {
8         if(!setup.immortal)
9                 hits = Game::Owned<HitPoints>(*this, setup.hits);
10         if(setup.damaging)
11                 damage = Game::Owned<DamageSource>(*this, setup.damage);
12 }