51 lines
774 B
C++
51 lines
774 B
C++
#ifndef APPLICATION_H_
|
|
#define APPLICATION_H_
|
|
|
|
#include "sigslot.h"
|
|
#include "common.h"
|
|
|
|
#include "Game.h"
|
|
#include "Schedule.h"
|
|
#include "Network.h"
|
|
#include "Config.h"
|
|
|
|
namespace gln {
|
|
|
|
class Application: public sigslot::has_slots<> {
|
|
public:
|
|
Application();
|
|
virtual ~Application();
|
|
virtual void initialize(Config &config);
|
|
virtual void update();
|
|
virtual void shutdown();
|
|
|
|
bool isRunning();
|
|
virtual void start();
|
|
virtual void stop();
|
|
|
|
inline bool isMaster() {
|
|
return master;
|
|
}
|
|
void setMaster(bool master);
|
|
|
|
inline Game *getGame() {
|
|
return &game;
|
|
}
|
|
|
|
private:
|
|
bool running;
|
|
double lastTime;
|
|
Schedule gameUpdateSchudule;
|
|
bool master;
|
|
|
|
protected:
|
|
Game game;
|
|
Network network;
|
|
double dt;
|
|
double time;
|
|
};
|
|
|
|
} // namespace grln
|
|
|
|
#endif /* APPLICATION_H_ */
|