From: drumsetmonkey Date: Mon, 14 Dec 2015 13:43:28 +0000 (-0500) Subject: Merge branch 'master' of http://github.com/tcsullivan/gamedev X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=840cf5f0d3fc60aceb95385010eac02ae6c95dcc;p=clyne%2Fgamedev.git Merge branch 'master' of http://github.com/tcsullivan/gamedev --- 840cf5f0d3fc60aceb95385010eac02ae6c95dcc diff --cc include/entities.h index 141d29a,30947f5..1abe886 --- a/include/entities.h +++ b/include/entities.h @@@ -31,53 -31,10 +31,54 @@@ enum GENDER enum MOB_SUB { MS_RABBIT = 1, MS_BIRD, - MS_TRIGGER + MS_TRIGGER, + MS_DOOR }; +enum BUILD_SUB{ + TOWN_HALL = 1, + HOUSE, + HOUSE2, + HOUSE3, + HOUSE4, + FOUNTAIN +}; + +class Particles{ +public: + vec2 loc; + float width; + float height; + float velx; + float vely; + Color color; + int duration; + bool canMove; + Particles(float x, float y, float w, float h, float vx, float vy, Color c, int d){ + loc.x = (x); + loc.y = (y); + width = (w); + height = (h); + velx = vx; + vely = vy; + color.red = (c.red); + color.green = (c.green); + color.blue = (c.blue); + duration = d; + } + ~Particles(){} + void draw(){ + glColor3f(color.red,color.green,color.blue); + glRectf(loc.x,loc.y,loc.x+width,loc.y+height); + } + bool kill(float delta){ + duration -= delta; + if(duration <= 0) + return true; + else return false; + } +}; + class Entity{ public: Inventory *inv;