Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6436 in orxonox.OLD for trunk/src/world_entities/playable.cc


Ignore:
Timestamp:
Jan 8, 2006, 2:27:29 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: collides with function now takes away the Energy of our beloved Entity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/playable.cc

    r6241 r6436  
    5252  // the reference to the Current Player is NULL, because we dont have one at the beginning.
    5353  this->currentPlayer = NULL;
     54}
     55
     56/**
     57 * @brief helps us colliding Playables
     58 */
     59void Playable::collidesWith(WorldEntity* entity, const Vector& location)
     60{
     61  if (entity->isA(CL_PROJECTILE))
     62    this->removeEnergy(entity->getEnergy());
     63
     64  // EXTREME HACK
     65  if (this->getEnergy() == 0.0f)
     66    this->deactivateNode();
    5467}
    5568
Note: See TracChangeset for help on using the changeset viewer.