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

Event.h

Go to the documentation of this file.
00001 #ifndef _GNE_EVENT_H_
00002 #define _GNE_EVENT_H_
00003 
00004 #include "../Math/Vector.h"
00005 #include <String.h>
00006 
00007 #define E_ATTACK 1
00008 #define E_PLAYER_JOINED 2
00009 #define E_PLAYER_DISCONNECTED 3
00010 #define E_PLAYER_POS 4
00011 #define E_PLAYER_STATE 5
00012 #define E_PLAYER_SCORE 6
00013 #define E_PLAYER_ACTION 7
00014 #define E_PLAYER_DEATH 8
00015 #define E_PLAYER_EXTRAS 9
00016 #define E_DEAL_EXTRAS 10
00017 #define E_SET_NAME 11
00018 #define E_INFO 12
00019 
00020 class GE{
00021 protected:
00022         int type;
00023         int id;
00024 public:
00025         int getType(); 
00026         int getId();
00027 };
00028 
00029 
00030 class GE_Attack:public GE{
00031 private:
00032         int attacktype;
00033         int playerid;
00034         float x;
00035         float y;
00036         float z;
00037         float dx;
00038         float dy;
00039         float dz;
00040 public:
00041         GE_Attack(int playerid, int attacktype, float x, float y, float z, float dx, float dy, float dz);
00042         int getAttackType();
00043         Vec3 getPos();
00044         Vec3 getDir();
00045 };
00046 
00047 
00048 class GE_PlayerJoined:public GE{
00049 public:
00050         GE_PlayerJoined(int playerid);
00051 };
00052 
00053 
00054 class GE_PlayerDisconnected:public GE{
00055 public:
00056         GE_PlayerDisconnected(int playerid);
00057 };
00058 
00059 
00060 class GE_PlayerPos:public GE{
00061 private:
00062         float x;
00063         float y;
00064         float angle;
00065         int rotation;
00066         int move;
00067 public:
00068         GE_PlayerPos(int playerid, int rotation, int move, float x, float y, float angle);
00069         float getX();
00070         float getY();
00071         float getAngle();
00072         int getRotation();
00073         int getMove();
00074 };
00075 
00076 
00077 class GE_State:public GE{
00078 private:
00079         int state;
00080 public:
00081         GE_State(int playerid, int state);
00082         getState();
00083 };
00084 
00085 
00086 class GE_PlayerScore:public GE{
00087 private:
00088         int frags;
00089         int kills;
00090         int deaths;
00091 public:
00092         GE_PlayerScore(int playerid, int frags, int kills, int deaths);
00093         int getFrags();
00094         int getKills();
00095         int getDeaths();
00096 };
00097 
00098 
00099 class GE_PlayerAction:public GE{
00100 private:
00101         int action;
00102 public:
00103         GE_PlayerAction(int playerid, int action);
00104         int getAction();
00105 };
00106 
00107 
00108 class GE_PlayerDeath:public GE{
00109 private:
00110         int killerid;
00111 public:
00112         GE_PlayerDeath(int playerid, int killerid);
00113         int getKillerID();
00114 };
00115 
00116 
00117 class GE_PlayerExtras:public GE{
00118 private:
00119         int extras;
00120         int value;
00121 public:
00122         GE_PlayerExtras(int playerid, int extras, int value);
00123         int getExtras();
00124         int getValue();
00125 };
00126 
00127 
00128 class GE_DealExtras:public GE{
00129 private:
00130         int detype;
00131         float x;
00132         float y;
00133         int flag;
00134 public:
00135         GE_DealExtras(int detype, float x, float y, int flag);
00136         int getDEType();
00137         float getX();
00138         float getY();
00139         int getFlag();
00140 };
00141 
00142 
00143 class GE_SetName:public GE{
00144 private:
00145         char name[25];
00146         int flag;
00147 public:
00148         GE_SetName(int playerid, const char *name, int flag);
00149         char *getName();
00150         int getFlag();
00151 };
00152 
00153 
00154 class GE_Info:public GE{
00155 private:
00156         int valA, valB, valC;
00157 public:
00158         GE_Info(int playerid, int valA, int valB, int valC);
00159         int getValA();
00160         int getValB();
00161         int getValC();
00162 };
00163 
00164 #endif

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