resolve comments

This commit is contained in:
Aaron Kimbre 2022-05-18 06:36:21 -05:00
parent 9169d844e2
commit 813aca9d20
2 changed files with 7 additions and 7 deletions

View File

@ -18,15 +18,15 @@ SimplePhysicsComponent::SimplePhysicsComponent(uint32_t componentID, Entity* par
m_Rotation = m_Parent->GetDefaultRotation();
m_IsDirty = true;
std::u16string climbable_type = m_Parent->GetVar<std::u16string>(u"climbable");
const auto& climbable_type = m_Parent->GetVar<std::u16string>(u"climbable");
if (climbable_type == u"wall") {
SetClimbableType(CLIMBABLE_TYPE_WALL);
SetClimbableType(eClimbableType::CLIMBABLE_TYPE_WALL);
} else if (climbable_type == u"ladder") {
SetClimbableType(CLIMBABLE_TYPE_LADDER);
SetClimbableType(eClimbableType::CLIMBABLE_TYPE_LADDER);
} else if (climbable_type == u"wallstick") {
SetClimbableType(CLIMBABLE_TYPE_WALL_STICK);
SetClimbableType(eClimbableType::CLIMBABLE_TYPE_WALL_STICK);
} else {
SetClimbableType(CLIMBABLE_TYPE_NOT);
SetClimbableType(eClimbableType::CLIMBABLE_TYPE_NOT);
}
}

View File

@ -14,7 +14,7 @@
class Entity;
enum eClimbableType : int32_t {
enum class eClimbableType : int32_t {
CLIMBABLE_TYPE_NOT = 0,
CLIMBABLE_TYPE_LADDER,
CLIMBABLE_TYPE_WALL,
@ -146,7 +146,7 @@ private:
/**
* Whether or not the entity is climbable
*/
eClimbableType m_ClimbableType = CLIMBABLE_TYPE_NOT;
eClimbableType m_ClimbableType = eClimbableType::CLIMBABLE_TYPE_NOT;
};
#endif // SIMPLEPHYSICSCOMPONENT_H