Add some (badly) generated platforms that will scroll
down whenever the player's top side depasses the middle of the screen. WiP.
This commit is contained in:
parent
976d34f17e
commit
4a3a0a4782
13 changed files with 251 additions and 55 deletions
|
@ -19,36 +19,31 @@
|
|||
|
||||
#ifndef id17908979556C47F8A978688BBE4A9D22
|
||||
|
||||
#include "sizenotifiable.hpp"
|
||||
#include <queue>
|
||||
#include <memory>
|
||||
|
||||
namespace cloonel {
|
||||
class Platform;
|
||||
class SDLMain;
|
||||
class Texture;
|
||||
class GameplayScene;
|
||||
class Mover;
|
||||
|
||||
class PlatformSystem {
|
||||
public:
|
||||
PlatformSystem ( void ) = delete;
|
||||
PlatformSystem ( const char* parTexturePath, SDLMain* parSDLMain, GameplayScene* parScene );
|
||||
PlatformSystem ( const char* parTexturePath, SDLMain* parSDLMain, GameplayScene* parScene, float parMaxDistance, Mover& parMover );
|
||||
PlatformSystem ( const PlatformSystem& ) = delete;
|
||||
PlatformSystem ( PlatformSystem&& parOther ) = delete;
|
||||
~PlatformSystem ( void ) noexcept;
|
||||
PlatformSystem& operator= ( const PlatformSystem& ) = delete;
|
||||
|
||||
void Prepare ( void );
|
||||
void AddDrawables ( void );
|
||||
void Destroy ( void ) noexcept;
|
||||
void SpawnPlatforms ( void );
|
||||
void GarbageCollect ( void );
|
||||
|
||||
private:
|
||||
SizeNotifiable<regbehaviuors::AutoRegister> m_sizeRatio;
|
||||
std::queue<Platform> m_platforms;
|
||||
const std::unique_ptr<Texture> m_texture;
|
||||
SDLMain* const m_sdlmain;
|
||||
GameplayScene* const m_scene;
|
||||
struct LocalData;
|
||||
|
||||
const std::unique_ptr<LocalData> m_localdata;
|
||||
};
|
||||
} //namespace cloonel
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue