initial commit
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
#ifndef _MODEL_H
|
||||
#define _MODEL_H
|
||||
|
||||
#include "ModelBase.h"
|
||||
#include "AsteroidsEnums.h"
|
||||
|
||||
namespace asteroids {
|
||||
|
||||
class Model : public Engine::ModelBase {
|
||||
public:
|
||||
virtual void Process();
|
||||
int DoLoadLevel (const char* filename);
|
||||
int DoSaveLevel (const char* filename);
|
||||
|
||||
void SetGameState (const GameState &state) {
|
||||
mLastGameState = mGameState;
|
||||
mGameState = state;
|
||||
};
|
||||
GameState GetGameState () { return mGameState; };
|
||||
|
||||
int GetPlayerLives () { return mPlayerLives; };
|
||||
|
||||
float GetWorldWidth ();
|
||||
float GetWorldHeight ();
|
||||
|
||||
protected:
|
||||
/** \brief Initializes the system */
|
||||
virtual int OnInit (int argc, char* argv[]);
|
||||
virtual void OnRegisterCommands ();
|
||||
|
||||
virtual void OnCreateEntity (const int type, const unsigned int id);
|
||||
virtual void OnKillEntity (const Engine::EntityBase *entity);
|
||||
|
||||
private:
|
||||
/** \brief Keeps a list of all asteroids */
|
||||
std::vector<unsigned int> mAsteroids;
|
||||
|
||||
GameState mGameState;
|
||||
GameState mLastGameState;
|
||||
|
||||
int mPlayerLives;
|
||||
int mLevel;
|
||||
|
||||
friend class View;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // _MODEL_H
|
||||
Reference in New Issue
Block a user