- fixed GLEW shader initialization segfault
- began working on bird mob
- improved world scenery
+
+10/27/2015:
+===========
+
+ - added a parallax background layer
+ - gained knowledge on sprite creation
+ - created tree and mountain sprites
+ - created a decent bird AI
void Mob::wander(int timeRun){
static int direction; //variable to decide what direction the entity moves
+ static unsigned int hey=0,hi=0;
switch(subtype){
case MS_RABBIT:
if(!ticksToUse){
ticksToUse--; //removes one off of the entities timer
break;
case MS_BIRD:
- if(loc.y<=init_y-.2)vel.y+=.005*deltaTime; // TODO handle direction
+ if(loc.y<=init_y-.2)vel.y=.02*deltaTime; // TODO handle direction
+ vel.x=.02*deltaTime;
+ if(++hey==200){hey=0;hi^=1;}
+ if(hi)vel.x*=-1;
break;
default:
break;
entity.push_back(mob.back());
mob.back()->spawn(200,100);
- mob.push_back(new Mob(2));
+ mob.push_back(new Mob(MS_BIRD));
entity.push_back(mob.back());
- mob.back()->spawn(200,100);
+ mob.back()->spawn(-500,500);
/*
* Link all the entities that were just created to the initial world, and setup a test AI function.