#include "Effect.h" Effect::Effect( Spieler *zSpieler, float maxTime ) { this->zSpieler = zSpieler; timeLeft = maxTime; ref = 1; } Effect::~Effect() {} bool Effect::tick( double time, Spiel *zSpiel ) { timeLeft -= (float)time; return timeLeft <= 0; } bool Effect::istSpielerBeweglich( Richtung r ) { return 1; } bool Effect::istSpielerVerwundbar( Richtung r ) { return 1; } bool Effect::istSpielerSichtbar( Team *zTeam ) { return 1; } void Effect::move( double time ) {} bool Effect::istGegenstandErlaubt( GegenstandTyp typ ) { return 1; } Effect *Effect::getThis() { ref++; return this; } Effect *Effect::release() { if( !--ref ) delete this; return 0; }