Added C# -> Trenchbrom entity definition with reflection system
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
#include <string>
|
||||
|
||||
enum class ClassPropertyType {
|
||||
String,
|
||||
Integer,
|
||||
Float,
|
||||
Boolean,
|
||||
String,
|
||||
Float,
|
||||
Integer,
|
||||
AABB,
|
||||
Choices,
|
||||
Color,
|
||||
@@ -20,4 +20,5 @@ struct ClassProperty {
|
||||
std::string name;
|
||||
ClassPropertyType type;
|
||||
std::string description;
|
||||
std::string value;
|
||||
};
|
||||
@@ -112,8 +112,19 @@ namespace Nuake {
|
||||
line += "(";
|
||||
if (p.type == ClassPropertyType::Integer)
|
||||
line += "integer";
|
||||
if (p.type == ClassPropertyType::String)
|
||||
line += "string";
|
||||
line += ") : ";
|
||||
line += "\"" + p.description + "\"";
|
||||
line += " : ";
|
||||
if (p.type == ClassPropertyType::String)
|
||||
{
|
||||
line += " \"" + p.value + "\" ";
|
||||
}
|
||||
else if (p.type == ClassPropertyType::Integer)
|
||||
{
|
||||
line += p.value;
|
||||
}
|
||||
line += "\n";
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user