aspect.h

Go to the documentation of this file.
00001 /*
00002  * aspect.h
00003  *
00004  *  Created on: Nov 21, 2011
00005  *      Author: sushil
00006  */
00007 
00008 #ifndef ASPECT_H_
00009 #define ASPECT_H_
00010 
00011 //#include <ent.h>
00012 //#include <group.h>
00013 #include <enums.h>
00014 
00015 namespace FastEcslent {
00016 
00017         class Entity;
00018         class Group;
00019 
00020         class Aspect {
00021         public:
00022                 Aspect(){};
00023                 virtual void init() = 0;
00024                 virtual void tick(double dt) = 0; // {std::cout << "Aspect tick: " << dt << std::endl;          }
00025 
00026         };
00027 }
00028 
00029 namespace FastEcslent {
00030 
00031         //-------UnitAspect
00032         class UnitAspect : public Aspect {
00033         public:
00034                 Entity *entity;
00035                 UnitAspectType aspectType;
00036                 UnitAspect(Entity *ent, UnitAspectType at): Aspect() {
00037                         entity = ent;
00038                         aspectType = at;
00039                 };
00040                 virtual void init(){};
00041                 virtual void tick(double dt){};
00042 
00043         };
00044 
00045         class GroupAspect: public Aspect {
00046         public:
00047                 Group *group;
00048                 GroupAspectType aspectType;
00049                 GroupAspect(Group* grp, GroupAspectType gat): Aspect() {
00050                         group = grp;
00051                         aspectType = gat;
00052                 };
00053 
00054                 virtual void init(){};
00055                 virtual void tick(double dt){};
00056 
00057         };
00058 
00059 }
00060 
00061 #endif /* ASPECT_H_ */

Generated on Fri Dec 13 14:54:15 2013 for FastECSLent by  doxygen 1.5.4