/**
Level constructor
\param name of the level
- \param loadBehavior the Loading Behavior for this level (Run once).
- \param updateBehavior the Updating Behavior for this level (Run every loop).
+ \param loadBehave the Loading Behavior for this level (Run when loading).
+ \param updateBehave the Updating Behavior for this level (Run every loop).
+ \param endBehave the Unloading Behavior for this level (when leaving level).
+ \param winCond Returns a boolean telling the level that it shuold unload.
*/
Level(string name, Condition winCond, Behavior loadBehave = DoNothing, Behavior updateBehave = DoNothing, Behavior endBehave = DoNothing);
~Level();
void unload();/**< Runs load action*/
void addSprite(Sprite* sp);/**< add a Sprite to the list of sprites \param sp Sprite to add */
Sprite* getSprite(string name);/**< gets the first sprite with the given name \param name Name of the sprite \return Pointer to the requested Sprite */
- void removeSprite(Sprite* sp);/**< remove the Sprite sp from the list of sprites \param ps Sprite to remove */
+ void removeSprite(Sprite* sp);/**< remove the Sprite sp from the list of sprites \param sp Sprite to remove */
void addAnimation(Animation anim);/**< add a Actor to the list of sprites \param anim The actor to add */
Animation* getAnimation(string name);/**< get a Actor* to the list of sprites \param name Name of the actor \return Pointer to the actor we requested or null */
void removeAnimation(Animation anim);/**< remove an Actor to the list of sprites \param anim The actor to add */
#include "Game.h"
#include "Level.h"
#include "SDL_ttf.h"
-///\file this file should contain all Behaviors for Levels
+///\file LevelFns.h this file should contain all Behaviors for Levels
void LevelWorldLoad(){
Level* l = Game::game()->LoadingLevel;
#include "fns.h"
#include "LevelFns.h"
-///\file this file should contain implementations for loading resources
+///\file LoadResources.cpp this file should contain implementations for loading resources
void Game::LoadResources(){
mLevels.push_back(new Level("World", NeverEnd, LevelWorldLoad, LevelWorldUpdate));
<ClInclude Include="Actor.h" />
<ClInclude Include="Animation.h" />
<ClInclude Include="Background.h" />
- <ClInclude Include="Behavior.h" />
<ClInclude Include="Behaviors.h" />
<ClInclude Include="Collision.h" />
<ClInclude Include="fns.h" />