Add DMv3 stubs, add reflection warning

This commit is contained in:
Vulpovile
2023-11-04 20:15:07 -07:00
parent 53427dd385
commit e8eef916b0
23 changed files with 982 additions and 1491 deletions

View File

@@ -0,0 +1,64 @@
#include "Instance.h"
using namespace B3D;
#pragma once
// Instances
//#include "WorkspaceInstance.h"
#include "LevelInstance.h"
//#include "PartInstance.h"
//#include "SelectionService.h"
//#include "GuiRootInstance.h"
//#include "ThumbnailGeneratorInstance.h"
//#include "XplicitNgine/XplicitNgine.h"
//#include "SoundService.h"
//#include "LightingInstance.h"
// Libraries
//#include "rapidxml/rapidxml.hpp"
namespace B3D {
class DataModelInstance : public Instance
{
public:
DataModelInstance(void);
~DataModelInstance(void);
void setMessage(std::string);
void setMessageBrickCount();
void clearMessage();
void drawMessage(RenderDevice*);
// Instance getters
// WorkspaceInstance* getWorkspace();
LevelInstance* getLevel();
// XplicitNgine* getEngine();
// ThumbnailGeneratorInstance* getThumbnailGenerator();
// SoundService* getSoundService();
// LightingInstance* getLighting();
std::string message;
bool showMessage;
//Should probably not be here???
G3D::GFontRef font;
// GuiRootInstance* getGuiRoot();
// SelectionService* getSelectionService();
// PartInstance* makePart();
void clearLevel();
void toggleRun();
bool isRunning();
// void resetEngine();
private:
bool isBrickCount;
Color3 DataModelInstance::bcToRGB(short bc);
// Instances
// WorkspaceInstance* workspace;
LevelInstance* level;
// GuiRootInstance* guiRoot;
// SelectionService* selectionService;
// ThumbnailGeneratorInstance* thumbnailGenerator;
// XplicitNgine* xplicitNgine;
// SoundService* soundService;
// LightingInstance* lightingInstance;
bool running;
};
}

View File

View File

@@ -5,8 +5,11 @@
#include "Reflection/ReflectionProperty.h"
#include <G3DAll.h>
namespace B3D
{
class DataModelInstance;
class Instance
{
public:
@@ -33,9 +36,13 @@ namespace B3D
void removeChild(Instance*);
void clearChildren();
Instance* getParent();
DataModelInstance * getParentDataModel(void);
//Variables
Reflection::ReflectionProperty<std::string> name;
bool canDelete;
protected:
//Constructor
//Used specifically to identify an instance class by an instance class,
@@ -45,5 +52,6 @@ namespace B3D
//Variables
Reflection::ReflectionDataTable * dataTable;
Instance * parent;
DataModelInstance * parentDataModel;
};
}

View File

@@ -0,0 +1,28 @@
#pragma once
#include "Instance.h"
namespace B3D{
class LevelInstance : public Instance
{
public:
//Constructors
LevelInstance(void);
~LevelInstance(void);
//Functions
void winCondition();
void loseCondition();
void pauseCondition();
void drawCondition();
void Step(SimTime sdt);
//Values
Reflection::ReflectionProperty<bool> highScoreIsGood;
Reflection::ReflectionProperty<int> timerUpAction;
Reflection::ReflectionProperty<int> timerAffectsScore;
Reflection::ReflectionProperty<bool> runOnOpen;
Reflection::ReflectionProperty<float> timer;
Reflection::ReflectionProperty<int> score;
Reflection::ReflectionProperty<std::string> winMessage;
Reflection::ReflectionProperty<std::string> loseMessage;
};
}

View File

View File