Proper theming controls added, attributes are now an inheritable interface for anything.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user