text: #ifndef __MODULE_H__
  #define __MODULE_H__
  
  #include "SString.h"
  
  #include "PugiXml/src/pugixml.hpp"
  
  class App;
  struct Collider;
  class GuiControl;
  
  class Module
  {
  public:
  
  	Module(bool startEnabled = true) : active(false) 
  	{
  		isEnabled = startEnabled;
  	}
  	
  	void Init()
  	{
  		active = true;
  	}
  
  	// Called before render is available
  	// TODO 5: Sending config file to all modules
  	virtual bool Awake(pugi::xml_node&)
  	{
  		return true;
  	}
  
  	// Called before the first frame
  	virtual bool Start()
  	{
  		return true;
  	}
  
  	// Called each loop iteration
  	virtual bool PreUpdate()
  	{
  		return true;
  	}
  
  	// Called each loop iteration
  	virtual bool Update(float dt)
  	{
  		return true;
  	}
  
  	// Called each loop iteration
  	virtual bool PostUpdate()
  	{
  		return true;
  	}
  
  	// Called before quitting
  	virtual bool CleanUp()
  	{
  		active = false;
  		isEnabled = false;
  		return true;
  	}
  
  	// Switches isEnabled and calls Start() method
  	void Enable()
  	{
  		if (!isEnabled)
  		{
  			isEnabled = true;
  			Start();
  		}
  	}
  
  	// Switches isEnabled and calls CleanUp() method
  	void Disable()
  	{
  		if (isEnabled)
  		{
  			isEnabled = false;
  			CleanUp();
  		}
  	}
  
  	inline bool IsEnabled() const { return isEnabled; }
  
  	// L02: DONE 2: Create new virtual methods to Load / Save state
  	virtual bool LoadState(pugi::xml_node&)
  	{
  		return true;
  	}
  
  	virtual bool SaveState(pugi::xml_node&) const
  	{
  		return true;
  	}
  
  	virtual bool OnCollision(Collider* c1, Collider* c2)
  	{
  		return true;
  	}
  
  	virtual bool OnGuiMouseClickEvent(GuiControl* control)
  	{
  		return true;
  	}
  	
  public:
  
  	SString name;
  	bool active;
  
  private:
  	bool isEnabled = true;
  };
  
  #endif // __MODULE_H__