Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

Event.cpp

Go to the documentation of this file.
00001 #include "event.h"
00002 #include <stdio.h>
00003 
00004 //GE functions
00005 int GE::getType(){
00006         return(this->type);
00007 }
00008 
00009 int GE::getId(){
00010         return(this->id);
00011 }
00012 
00013 //GE_Attack functions
00014 GE_Attack::GE_Attack(int playerid, int attacktype, float x, float y, float z, float dx, float dy, float dz){
00015         this->type = E_ATTACK;
00016         this->attacktype = attacktype;
00017         this->id = playerid;
00018         this->playerid = playerid;
00019         this->x = x;
00020         this->y = y;
00021         this->z = z;
00022         this->dx = dx;
00023         this->dy = dy;
00024         this->dz = dz;
00025 }
00026 
00027 int GE_Attack::getAttackType(){
00028         return(this->attacktype);
00029 }
00030 
00031 
00032 Vec3 GE_Attack::getPos() {
00033         return(Vec3(x, y, z));
00034 }
00035 
00036 Vec3 GE_Attack::getDir(){
00037         return(Vec3(dx, dy, dz));
00038 }
00039 
00040 
00041 //GE_PlayerJoined Functions
00042 GE_PlayerJoined::GE_PlayerJoined(int playerid){
00043         this->type = E_PLAYER_JOINED;
00044         this->id = playerid;
00045 }
00046 
00047 
00048 //GE_PlayerDisconnected
00049 GE_PlayerDisconnected::GE_PlayerDisconnected(int playerid){
00050         this->type = E_PLAYER_DISCONNECTED;
00051         this->id = playerid;
00052 }
00053 
00054 
00055 //GE_newPlayerPos
00056 GE_PlayerPos::GE_PlayerPos(int playerid, int rotation, int move, float x, float y, float angle){
00057         this->id = playerid;
00058         this->type = E_PLAYER_POS;
00059         this->x = x;
00060         this->y = y;
00061         this->angle = angle;
00062         this->rotation = rotation;
00063         this->move = move;
00064 }
00065 
00066 
00067 float GE_PlayerPos::getX(){
00068         return(this->x);
00069 }
00070 
00071 
00072 float GE_PlayerPos::getY(){
00073         return(this->y);
00074 }
00075 
00076 
00077 float GE_PlayerPos::getAngle(){
00078         return(this->angle);
00079 }
00080 
00081 int GE_PlayerPos::getRotation(){
00082         return(this->rotation);
00083 }
00084 
00085 
00086 int GE_PlayerPos::getMove(){
00087         return(this->move);
00088 }
00089 
00090 
00091 //GE_State
00092 GE_State::GE_State(int playerid, int state){
00093         this->id = playerid;
00094         this->state = state;
00095         this->type = E_PLAYER_STATE;
00096 }
00097 
00098 
00099 int GE_State::getState(){
00100         return(this->state);
00101 }
00102 
00103 
00104 //GE_PlayerScore
00105 GE_PlayerScore::GE_PlayerScore(int playerid, int frags, int kills, int deaths){
00106         this->id = playerid;
00107         this->frags = frags;
00108         this->kills = kills;
00109         this->deaths = deaths;
00110         this->type = E_PLAYER_SCORE;
00111 }
00112 
00113 
00114 int GE_PlayerScore::getDeaths(){
00115         return(this->deaths);
00116 }
00117 
00118 
00119 int GE_PlayerScore::getFrags(){
00120         return(this->frags);
00121 }
00122 
00123 
00124 int GE_PlayerScore::getKills(){
00125         return(this->kills);
00126 }
00127 
00128 
00129 
00130 //GE_PlayerAction
00131 GE_PlayerAction::GE_PlayerAction(int playerid, int action){
00132         this->id = playerid;
00133         this->action = action;
00134         this->type = E_PLAYER_ACTION;
00135 
00136 }
00137 
00138 int GE_PlayerAction::getAction(){
00139         return(this->action);
00140 }
00141 
00142 
00143 //GE_PlayerDeath
00144 GE_PlayerDeath::GE_PlayerDeath(int playerid, int killerid){
00145         this->id = playerid;
00146         this->killerid = killerid;
00147         this->type = E_PLAYER_DEATH;
00148 }
00149 
00150 
00151 int GE_PlayerDeath::getKillerID(){
00152         return(this->killerid);
00153 }
00154 
00155 
00156 
00157 //GE_PlayerExtras
00158 GE_PlayerExtras::GE_PlayerExtras(int playerid, int extras, int value){
00159         this->id = playerid;
00160         this->type = E_PLAYER_EXTRAS;
00161         this->extras = extras;
00162         this->value = value;
00163 }
00164 
00165 
00166 int GE_PlayerExtras::getExtras(){
00167         return(this->extras);
00168 }
00169 
00170 
00171 int GE_PlayerExtras::getValue(){
00172         return(this->value);
00173 }
00174 
00175 
00176 //GE_DealExtras
00177 GE_DealExtras::GE_DealExtras(int detype, float x, float y, int flag){
00178         this->detype = detype;
00179         this->x = x;
00180         this->y = y;
00181         this->flag = flag;
00182         this->type = E_DEAL_EXTRAS;
00183 }
00184 
00185 
00186 int GE_DealExtras::getDEType(){
00187         return(this->detype);
00188 }
00189 
00190 
00191 float GE_DealExtras::getX(){
00192         return(this->x);
00193 }
00194 
00195 
00196 float GE_DealExtras::getY(){
00197         return(this->y);
00198 }
00199 
00200 
00201 int GE_DealExtras::getFlag(){
00202         return(this->flag);
00203 }
00204 
00205 
00206 //GE_SetName
00207 GE_SetName::GE_SetName(int playerid, const char *name, int flag){
00208         this->id = playerid;
00209         this->flag = flag;
00210         this->type = E_SET_NAME;
00211         strcpy(this->name, name);
00212 }
00213 
00214 
00215 char *GE_SetName::getName(){
00216         return(this->name);
00217 }
00218 
00219 
00220 int GE_SetName::getFlag(){
00221         return(this->flag);
00222 }
00223 
00224 
00225 //GE_Info
00226 GE_Info::GE_Info(int playerid, int valA, int valB, int valC){
00227         this->valA = valA;
00228         this->valB = valB;
00229         this->valC = valC;
00230         this->id = playerid;
00231         this->type = E_INFO;
00232 }
00233 
00234 
00235 int GE_Info::getValA(){
00236         return(this->valA);
00237 }
00238 
00239 
00240 int GE_Info::getValB(){
00241         return(this->valB);
00242 }
00243 
00244 
00245 int GE_Info::getValC(){
00246         return(this->valC);
00247 }

Generated on Sun Jun 5 15:47:03 2005 for Defacto by  doxygen 1.4.3