#include <zEffector.h>
Public Member Functions | |
zEffector () | |
zEffector (zEffector const &other) | |
void | operator= (zEffector const &other) |
virtual zEffector * | copy (void) const |
overloaded assignment operator | |
virtual | ~zEffector () |
void | apply (gVectorExtra< ePlayerNetID * > &d_calculatedTargets) |
virtual void | effect (gVectorExtra< ePlayerNetID * > &d_calculatedTargets) |
void | setCount (int _count) |
void | setMessage (tString unformated) |
Static Public Member Functions | |
static zEffector * | create () |
Protected Member Functions | |
template<typename T> | |
T | pickOne (std::vector< T > const &sources) |
Protected Attributes | |
int | count |
tOutput | message |
Definition at line 41 of file zEffector.h.
zEffector::zEffector | ( | ) | [inline] |
zEffector::zEffector | ( | zEffector const & | other | ) | [inline] |
virtual zEffector::~zEffector | ( | ) | [inline, virtual] |
static zEffector* zEffector::create | ( | ) | [inline, static] |
Reimplemented in zEffectorWin, zEffectorDeath, zEffectorPoint, zEffectorCycleRubber, zEffectorCycleBrake, zEffectorCycleAcceleration, zEffectorSpawnPlayer, and zEffectorSetting.
Definition at line 44 of file zEffector.h.
References zEffector().
00044 { return new zEffector(); };
void zEffector::operator= | ( | zEffector const & | other | ) | [inline] |
Definition at line 47 of file zEffector.h.
Referenced by zEffectorSetting::operator=(), zEffectorSpawnPlayer::operator=(), zEffectorCycleBrake::operator=(), zEffectorCycleRubber::operator=(), zEffectorPoint::operator=(), zEffectorDeath::operator=(), and zEffectorWin::operator=().
00047 { this->zEffector::operator=(other); };
virtual zEffector* zEffector::copy | ( | void | ) | const [inline, virtual] |
overloaded assignment operator
Reimplemented in zEffectorWin, zEffectorDeath, zEffectorPoint, zEffectorCycleRubber, zEffectorCycleBrake, zEffectorCycleAcceleration, zEffectorSpawnPlayer, and zEffectorSetting.
Definition at line 48 of file zEffector.h.
References zEffector().
00048 { return new zEffector(*this); };
void zEffector::apply | ( | gVectorExtra< ePlayerNetID * > & | d_calculatedTargets | ) |
Definition at line 33 of file zEffector.cpp.
References count, and effect().
00034 { 00035 if (count == -1 || count > 0) { 00036 effect(d_calculatedTargets); 00037 /* 00038 tOutput asdf; 00039 asdf.SetTemplateParameter(1, tString("33")); 00040 asdf.SetTemplateParameter(2, tString("bibibi")); 00041 asdf.Append(message); 00042 sn_ConsoleOut(asdf); 00043 */ 00044 if (count > 0) 00045 count --; 00046 } 00047 }
virtual void zEffector::effect | ( | gVectorExtra< ePlayerNetID * > & | d_calculatedTargets | ) | [inline, virtual] |
Reimplemented in zEffectorWin, zEffectorDeath, zEffectorPoint, zEffectorCycleRubber, zEffectorCycleBrake, zEffectorCycleAcceleration, zEffectorSpawnPlayer, and zEffectorSetting.
Definition at line 52 of file zEffector.h.
Referenced by apply().
void zEffector::setCount | ( | int | _count | ) | [inline] |
void zEffector::setMessage | ( | tString | unformated | ) |
Definition at line 50 of file zEffector.cpp.
References message.
00051 {/* 00052 tString res; 00053 for (size_t i=0; i< unformated.Size(); i++) 00054 { 00055 char c = unformated(i); 00056 if (c != '\\') 00057 res += c; 00058 else if (i < unformated.Size()) 00059 { 00060 switch (unformated(i+1)) 00061 { 00062 case 'n': 00063 res += '\n'; 00064 i++; 00065 break; 00066 case '1': 00067 res += '\1'; 00068 i++; 00069 break; 00070 default: 00071 res += '\\'; 00072 break; 00073 } 00074 } 00075 } 00076 00077 message = res; 00078 */ 00079 message << unformated; 00080 /* 00081 message.Append( unformated ); 00082 message << unformated.c_str(); 00083 message.Append( unformated.c_str()); 00084 */ 00085 }
T zEffector::pickOne | ( | std::vector< T > const & | sources | ) | [inline, protected] |
int zEffector::count [protected] |
tOutput zEffector::message [protected] |
Definition at line 62 of file zEffector.h.
Referenced by zEffectorPoint::effect(), zEffectorWin::effect(), and setMessage().