Skip to content

Instantly share code, notes, and snippets.

@mihaisebea
Last active February 25, 2018 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mihaisebea/f70bdd6acc698e5d94dfefc6e0138782 to your computer and use it in GitHub Desktop.
Save mihaisebea/f70bdd6acc698e5d94dfefc6e0138782 to your computer and use it in GitHub Desktop.
class Profiler
{
Profiler& GetInstance() { return s_instance; }
public :
void Update()
{
Debugger::GetInstance().Update();
Logger::GetInstance().Log("Profiler updating")
}
};
class Debugger
{
public:
Debugger& GetInstance() { return s_instance; }
void Update()
{
Logger::GetInstance().Log("Debugger updating")
}
};
class Logger
{
public:
Logger& GetInstance() { return s_instance; }
void Log(...)
{
printf();
}
};
class Game()
{
public:
void Update()
{
Profiler::GetInstance().Update();
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment