Implemented initial concept of Objects and GC
This commit is contained in:
parent
1dca4a91d9
commit
76ffb658db
13 changed files with 599 additions and 140 deletions
|
@ -1,9 +1,36 @@
|
|||
#include "Flux.h"
|
||||
#include "Framework/Object.h"
|
||||
|
||||
int main (int argc, char** argv)
|
||||
class SandboxObject : public Object
|
||||
{
|
||||
Flux::FluxEngine engine;
|
||||
engine.Start();
|
||||
|
||||
return 0;
|
||||
public:
|
||||
SandboxObject() = default;
|
||||
virtual ~SandboxObject() = default;
|
||||
|
||||
virtual void Init() override
|
||||
{
|
||||
Object::Init();
|
||||
LOG_INFO("SandboxObject Initialized: {0}", GetName());
|
||||
}
|
||||
};
|
||||
|
||||
class Sandbox : public FluxEngine
|
||||
{
|
||||
public:
|
||||
Sandbox() = default;
|
||||
virtual ~Sandbox() = default;
|
||||
|
||||
virtual void Init() override
|
||||
{
|
||||
FluxEngine::Init();
|
||||
|
||||
std::shared_ptr<SandboxObject> Obj = Object::NewObject<SandboxObject>();
|
||||
}
|
||||
};
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
std::unique_ptr<Sandbox> app = FluxEngine::CreateApplication<Sandbox>();
|
||||
app->Init();
|
||||
return app->Start();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue