C# Entity Scrips now working(OnInit, update, destroy) [ Broke reloading]
- added UI button to generate a .sln in the games folder - added UI for adding new component and drag n drop .cs file - added modular Core API module system
This commit is contained in:
39
Nuake/src/Scene/Components/NetScriptComponent.h
Normal file
39
Nuake/src/Scene/Components/NetScriptComponent.h
Normal file
@@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
#include "src/Core/Core.h"
|
||||
#include "src/Core/FileSystem.h"
|
||||
#include "src/Core/Logger.h"
|
||||
#include "src/Resource/Serializable.h"
|
||||
#include "src/Resource/File.h"
|
||||
|
||||
namespace Nuake {
|
||||
|
||||
class NetScriptComponent
|
||||
{
|
||||
public:
|
||||
std::string ScriptPath;
|
||||
std::string Class;
|
||||
|
||||
json Serialize()
|
||||
{
|
||||
BEGIN_SERIALIZE();
|
||||
SERIALIZE_VAL(ScriptPath);
|
||||
SERIALIZE_VAL(Class);
|
||||
END_SERIALIZE();
|
||||
}
|
||||
|
||||
bool Deserialize(const json& j)
|
||||
{
|
||||
if (j.contains("ScriptPath"))
|
||||
{
|
||||
ScriptPath = j["ScriptPath"];
|
||||
}
|
||||
|
||||
if (j.contains("Class"))
|
||||
{
|
||||
Class = j["Class"];
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user