GameState.h
上传用户:zhj2929
上传日期:2022-07-23
资源大小:28772k
文件大小:1k
- #ifndef _GAME_STATE_H_
- #define _GAME_STATE_H_
- #include "../../JGE/include/JApp.h"
- #include "../../JGE/include/JGE.h"
- #include "../../JGE/include/JSprite.h"
- #include "../../JGE/include/JLBFont.h"
- #define FADING_SPEED 0.35f
- enum _gameSates
- {
- GAME_STATE_LOGO,
- GAME_STATE_SPLASH,
- GAME_STATE_HELP,
- GAME_STATE_LOADING,
- GAME_STATE_PLAY,
- GAME_STATE_END,
- };
- class GameApp;
- class GameState
- {
- protected:
- GameApp* mApp;
- JGE* mEngine;
-
- JLBFont* mPrint;
- public:
- GameState(GameApp* app) : mApp(app)
- {
- mEngine = mApp->GetJGE();
-
- mPrint=new JLBFont("f3",16,true);
- }
- virtual ~GameState() {}
- virtual void Create() {}
- virtual void Destroy() {}
- virtual void Start() {}
- virtual void End() {}
- virtual void setI(int j) {};
-
- virtual void Update() = 0;
- virtual void Render() = 0;
- JGE* GetJGE() { return mEngine; }
- };
- #endif