Testing some enemies
This commit is contained in:
@ -33,6 +33,11 @@ namespace Dawn {
|
||||
return v;
|
||||
};
|
||||
|
||||
static inline std::string intParser(std::string v, std::string *error) {
|
||||
v = stringTrim(v);
|
||||
return v;
|
||||
}
|
||||
|
||||
static inline std::string vec2Parser(std::string v, std::string *error) {
|
||||
// Split string by comma into two strings that we pass into float
|
||||
auto split = stringSplit(v, ",");
|
||||
|
@ -57,6 +57,8 @@ int32_t PrefabComponentParser::onParse(
|
||||
parser = vec2Parser;
|
||||
} else if(type.find("vec3") != std::string::npos) {
|
||||
parser = vec3Parser;
|
||||
} else if(type == "int32_t" || type == "int") {
|
||||
parser = intParser;
|
||||
} else if(type.find("*") == (type.size() - 1)) {
|
||||
type = type.substr(0, type.size() - 1);
|
||||
parser = rawParser;
|
||||
|
Reference in New Issue
Block a user