Changeset 7946 in orxonox.OLD for branches/cr/src/world_entities
- Timestamp:
- May 29, 2006, 1:04:39 AM (18 years ago)
- Location:
- branches/cr/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cr/src/world_entities/world_entity.cc
r7945 r7946 94 94 if (this->healthWidget != NULL) 95 95 delete this->healthWidget; 96 97 this->unsubscribeReaction(); 96 98 } 97 99 … … 263 265 264 266 /** 267 * unsubscribes a specific reaction from the worldentity 268 * @param type the reaction to unsubscribe 269 */ 270 void WorldEntity::unsubscribeReaction(CREngine::CRType type) 271 { 272 if( this->collisionHandles[type] == NULL) 273 return; 274 275 CREngine::getInstance()->unsubscribeReaction(this->collisionHandles[type]); 276 this->collisionHandles[type] = NULL; 277 } 278 279 280 /** 281 * unsubscribes all collision reactions 282 */ 283 void WorldEntity::unsubscribeReaction() 284 { 285 for( int i = 0; i < CREngine::CR_NUMBER; i++) 286 this->unsubscribeReaction((CREngine::CRType)i); 287 } 288 289 290 /** 265 291 * registers a new collision to this world entity 266 292 * @param collisionEvent the event -
branches/cr/src/world_entities/world_entity.h
r7945 r7946 71 71 /* --- Collision Reaction Block --- */ 72 72 void subscribeReaction(CREngine::CRType type, int nrOfTargets, long target, ...); 73 void unsubscribeReaction(CREngine::CRType type); 74 void unsubscribeReaction(); 73 75 bool registerCollision(WorldEntity* entityA, WorldEntity* entityB, BoundingVolume* bvA, BoundingVolume* bvB); 74 76
Note: See TracChangeset
for help on using the changeset viewer.