00001
00002
00003
00004
00005
00006
00007
00008 #ifndef ENTITYMGR_H_
00009 #define ENTITYMGR_H_
00010
00011 #include<iostream>
00012 #include<list>
00013
00014 #include "const.h"
00015 #include "enums.h"
00016 #include "options.h"
00017
00018 #include "mgr.h"
00019 #include "ent.h"
00020
00021
00022
00023 namespace FastEcslent {
00024
00025 class Engine;
00026
00027 class EntityMgr : public Mgr {
00028
00029 private:
00030 void reset(){
00031 nEnts = 0;
00032
00033 Meshes[0] = "cigarette.mesh";
00034 Meshes[1] = "boat.mesh";
00035 Meshes[2] = "ddg51.mesh";
00036 Meshes[3] = "cvn68.mesh";
00037 Meshes[4] = "sleek.mesh";
00038 Meshes[5] = "alienship.mesh";
00039 }
00040
00041 Entity* createEntity(EntityType etype, Ogre::Vector3 pos = Ogre::Vector3(0,0,0), float heading = 0.0f);
00042
00043
00044 public:
00045 Entity *ents[MaxEnts];
00046 std::string Meshes[6];
00047 Options options;
00048 int nEnts;
00049
00050 EntityMgr(Engine *eng, Options opts);
00051 EntityMgr();
00052 void init();
00053 void tick(double dtime);
00054
00055
00056 void dumpOne(int i);
00057 void dumpAll();
00058
00059 int addEntityToGame(Entity* ent);
00060 Entity* createEntityForPlayerAndSide(EntityType etype, Ogre::Vector3 pos = Ogre::Vector3(0,0,0), float heading = 0.0f, Side side = BATTLEMASTER, Player player = ONE);
00061 Entity* createEntityAfterTime(EntityType etype, Ogre::Vector3 pos = Ogre::Vector3(0,0,0), float heading = 0.0f);
00062 Entity* createEntityNow(EntityType etype, Ogre::Vector3 pos = Ogre::Vector3(0,0,0), float heading = 0.0f);
00063 bool cancelGestatingEntity(Entity *ent);
00064
00065 bool preReqExists(EntityType etype);
00066 bool notExceedPopCap(Identity entId);
00067
00068
00069 };
00070
00071
00072 }
00073
00074
00075
00076 #endif