Instances call constructor of base class

This commit is contained in:
andreja6
2018-10-24 11:02:13 -07:00
parent ea072e424a
commit 07a2eb4d98
7 changed files with 10 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ ButtonListener* listener = NULL;
BaseButtonInstance::BaseButtonInstance(void)
{
Instance::Instance();
listener = NULL;
}

View File

@@ -6,6 +6,7 @@
DataModelInstance::DataModelInstance(void)
{
Instance::Instance();
workspace = new WorkspaceInstance();
guiRoot = new Instance();
children.push_back(workspace);

View File

@@ -2,7 +2,7 @@
ImageButtonInstance::ImageButtonInstance(G3D::TextureRef newImage, G3D::TextureRef overImage = NULL, G3D::TextureRef downImage = NULL, G3D::TextureRef disableImage = NULL)
{
BaseButtonInstance::BaseButtonInstance();
image = newImage;
openGLID = image->getOpenGLID();
image_ovr = overImage;

View File

@@ -4,6 +4,7 @@
PhysicalInstance::PhysicalInstance(void)
{
Instance::Instance();
name = "Default PhysicalInstance";
className = "Part";
canCollide = true;
@@ -23,6 +24,7 @@ PhysicalInstance::PhysicalInstance(void)
PhysicalInstance::PhysicalInstance(const PhysicalInstance &oinst)
{
Instance::Instance(oinst);
name = oinst.name;
className = "Part";
canCollide = oinst.canCollide;

View File

@@ -3,6 +3,7 @@
TextButtonInstance::TextButtonInstance(void)
{
BaseButtonInstance::BaseButtonInstance();
boxBegin = Vector2(0,0);
boxEnd = Vector2(0,0);
fontLocationRelativeTo = Vector2(0,0);

View File

@@ -3,7 +3,9 @@
WorkspaceInstance::WorkspaceInstance(void)
{
className = "Workspace";
Instance::Instance();
name = "Instance";
className = "Level";
timer = 60.0F;
score = 0;
}

View File

@@ -9,4 +9,5 @@ public:
int score;
WorkspaceInstance(void);
~WorkspaceInstance(void);
};