/********************************************************************
*
* File: fsCHogLevel.h
*
* Purpose: Create and control game entities.
*
*********************************************************************/
#ifndef gfCSimpleLevelComponenthdr
#define gfCSimpleLevelComponenthdr
#include <vector>
#include <fsCore/fsStr.h>
#include "../gfIHogLevel.h"
#include "components/gfIMinigameLogic.h"
#include "src/fsCEntityFactory.h"
class gfCSimpleLevelComponent : public gfIHogLevel
{
friend class fsCComponentFactory;
public:
static const fsCUniqueId mTypeId;
void listenersDeregisterDo() override;
void listenersRegisterDo() override;
fsBool messageProcessDo(const fsCUniqueId& pMessageType,
const fsIMessageDispatcher::sMessageParameters& pParam) override;
protected:
static fsIComponent* create(fsCEntity* pParent);
void updateDo(fsS32 pDeltaMs) override;
void actAdvanceDo() override;
fsBool devCheatKeyTestDo(fsS32 pTypedChar) override;<--- Function in derived class
fsBool releaseCheatKeyTest(fsS32 pTypedChar) override;
fsBool navigateTapHandle(const fsStr& pTarget) override;
void doLevelCreate() override;
void doLevelStateRestore() override;
gfCSimpleLevelComponent(fsCEntity* pParent);
~gfCSimpleLevelComponent() override;
private:
// map: home state choice and the test mode where tapping a state completes it
// gfIHogLevel::mapLevelGet() compares the scene root entity name, which is always "sceneRootEntity" here
fsBool onMapGet() const;
void mapStateFinishedMark();
void mapReload();
void mapProgressReset();
fsBool mapTapHandle(const fsStr& pState);
fsStr mHomeConfirmState;
fsStr mHomeConfirmMessage;
fsBool mHomePromptShown;
};
#endif