Testing some enemies

This commit is contained in:
2023-03-30 18:29:56 -07:00
parent 033a8864c1
commit 3bdf44994c
19 changed files with 348 additions and 70 deletions

View File

@ -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, ",");

View File

@ -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;