diff options
author | tom <tombarrett@siu.edu> | 2017-01-21 08:58:12 -0600 |
---|---|---|
committer | tom <tombarrett@siu.edu> | 2017-01-21 08:58:12 -0600 |
commit | a9281bfcf21861e621a3243ecb633a299c8d8e52 (patch) | |
tree | 7d4687fd9a8f40e806e6b7c8803c0e87fcae6639 /src/list.cpp | |
parent | ccb66c8d6d175b1bd3d8ecaa540e80baac5181b6 (diff) |
-took basic math functions and put it into functions.hpp
-spaced various lines
-reorganized variables by datatype
-implemented reproduction
-reorganized pathing so once a target is set, the creature checks if that same target is near every cycle
Diffstat (limited to 'src/list.cpp')
-rw-r--r-- | src/list.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/list.cpp b/src/list.cpp index 5309109..d49f97a 100644 --- a/src/list.cpp +++ b/src/list.cpp @@ -40,6 +40,13 @@ void List::Behavior() list<Entity*> N = getNear(*it); it->giveN(N); it->Behavior(); + if(it->getPregnancyReady()){ + SDL_Rect Rect = it->getRect(); + Rect.h = Rect.w = CREATURE_SIZE_START; + Creature X(main,Rect); + C.push_back(X); + it->hadPregnancy(); + } } for(list<Resource>::iterator it = R.begin(); it!=R.end(); it++) |