/**
 * Inserts a font into the entity. If that entity has another graphical object allocated, it will be replaced (but not freed) by the present font.
 * In the next call to IND_Entity2dManager::renderEntities2d() the font will be drawn.
 * In addition, all the parameters of the entity will be restarted.
 * Important: Fonts can't be sized and can't be rotated.
 * @param pFont					Pointer to an IND_Font object.
 */
void IND_Entity2d::setFont(IND_Font *pFont) {
    if(!pFont) {
        return;
    }

    initAttrib();
    _font = pFont;
}
/**
 * Inserts an animation in the entity. If that entity has another graphical object allocated it will be replaced (but not freed)by the present animation.
 * In the next call to IND_Entity2dManager::renderEntities2d() this animation will be drawn.
 * In addition, all the attributes of the entity will be restarted.
 * @param pNewAnimation				Pointer to an IND_Animation object.
 */
void IND_Entity2d::setAnimation(IND_Animation *pNewAnimation) {
    if(!pNewAnimation) {
        return;
    }

    initAttrib();
    _an = pNewAnimation;
}
/**
 * Inserts a surface in the entity. If that entity has another graphical object allocated it will be replaced (but not freed) by the present surface.
 * In the next call to IND_Entity2dManager::renderEntities2d() the surface will be drawn.
 * In addition, all the attributes of the entity will be restarted.
 * @param pNewSurface				Pointer to an IND_Surface object.
 */
void IND_Entity2d::setSurface(IND_Surface *pNewSurface) {
    if(!pNewSurface) {
        return;
    }

    initAttrib();
    _su = pNewSurface;

}
IND_Entity2d::IND_Entity2d() {
    initAttrib();
}
/**
 * Inserts a primitive in the entity. If that entity has another graphical object allocated it will be replaced (but not freed) by the present primitive.
 * In the next call to IND_Entity2dManager::renderEntities2d() this primitive will be drawn.
 * In addition, all the parameters of the entity will be restarted.
 * @param pPri2d				Pointer to an IND_Primitive2d object.
 */
void IND_Entity2d::setPrimitive2d(IND_Primitive2d pPri2d) {
    initAttrib();
    _pri2d = pPri2d;
}
Ejemplo n.º 6
0
IND_Entity2d::IND_Entity2d() : _text(NULL),  _listBoundingCollision(NULL) {
	initAttrib();
}