Colobot
Public Member Functions | List of all members
CDamageableObject Class Referenceabstract

Interface for objects that generate particles when hit. More...

#include <damageable_object.h>

Inheritance diagram for CDamageableObject:
Inheritance graph
[legend]

Public Member Functions

 CDamageableObject (ObjectInterfaceTypes &types)
 
virtual bool DamageObject (DamageType type, float force=std::numeric_limits< float >::infinity())=0
 Damage the object, with the given force. Returns true if the object has been fully destroyed (assuming the object is destroyable, of course). If force == infinity, destroy immediately (this is the default value) More...
 

Detailed Description

Interface for objects that generate particles when hit.

Member Function Documentation

virtual bool CDamageableObject::DamageObject ( DamageType  type,
float  force = std::numeric_limits< float >::infinity() 
)
pure virtual

Damage the object, with the given force. Returns true if the object has been fully destroyed (assuming the object is destroyable, of course). If force == infinity, destroy immediately (this is the default value)

NOTE: You should never assume that after this function exits, the object is destroyed, unless it returns true. Even if you specify force = infinity, if may still sometimes decide not to destroy the object.

Implemented in COldObject.


The documentation for this class was generated from the following file: