Proper theming controls added, attributes are now an inheritable interface for anything.

This commit is contained in:
2023-10-03 02:34:26 -05:00
parent bff7eabef5
commit 999855c6e8
24 changed files with 289 additions and 122 deletions
-35
View File
@@ -401,41 +401,6 @@ void Monster::SetSize(float newSize,bool immediate){
}
}
float&Monster::GetFloat(Attribute a){
if(attributes.count(a)==0){
attributes[a]=0.f;
}
return std::get<float>(attributes[a]);
}
int&Monster::GetInt(Attribute a){
if(attributes.count(a)==0){
attributes[a]=0;
}
return std::get<int>(attributes[a]);
}
std::string&Monster::GetString(Attribute a){
if(attributes.count(a)==0){
attributes[a]="";
}
return std::get<std::string>(attributes[a]);
}
bool&Monster::GetBool(Attribute a){
if(attributes.count(a)==0){
attributes[a]=false;
}
return std::get<bool>(attributes[a]);
}
vf2d&Monster::GetVf2d(Attribute a){
if(attributes.count(a)==0){
attributes[a]=vf2d{};
}
return std::get<vf2d>(attributes[a]);
}
void Monster::SetZ(float z){
this->z=z;
}