Fixed spelling error
This commit is contained in:
@@ -53,7 +53,7 @@ private:
|
||||
bool OnPause(const dd::Events::Pause &event);
|
||||
bool OnLifebuoy(const dd::Events::Lifebuoy &event);
|
||||
|
||||
struct LifeBuoyInfo
|
||||
struct LifebuoyInfo
|
||||
{
|
||||
EntityID Entity;
|
||||
float TimeToLive = 15.f;
|
||||
@@ -62,7 +62,7 @@ private:
|
||||
float m_LeftEdge = -3.8f;
|
||||
float m_RightEdge = 3.8f;
|
||||
float m_DownEdge = -9.2f;
|
||||
std::list<LifeBuoyInfo> m_LifeBuoys;
|
||||
std::list<LifebuoyInfo> m_Lifebuoys;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -43,13 +43,13 @@ void dd::Systems::LifebuoySystem::Initialize()
|
||||
|
||||
void dd::Systems::LifebuoySystem::Update(double dt)
|
||||
{
|
||||
for (auto it = m_LifeBuoys.begin(); it != m_LifeBuoys.end();) {
|
||||
for (auto it = m_Lifebuoys.begin(); it != m_Lifebuoys.end();) {
|
||||
it->TimeToLive -= dt;
|
||||
auto transformComponent = m_World->GetComponent<Components::Transform>(it->Entity);
|
||||
|
||||
if (transformComponent->Position.y < m_DownEdge) {
|
||||
m_World->RemoveEntity(it->Entity);
|
||||
m_LifeBuoys.erase(it++);
|
||||
m_Lifebuoys.erase(it++);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -110,9 +110,9 @@ bool dd::Systems::LifebuoySystem::OnLifebuoy(const dd::Events::Lifebuoy &event)
|
||||
physics->CollisionType = CollisionType::Type::Dynamic;
|
||||
transform->Position = glm::vec3(0.f, 0.f, -10.f);
|
||||
transform->Velocity = glm::vec3(20.f, 3.f, 0.f);
|
||||
LifeBuoyInfo info;
|
||||
LifebuoyInfo info;
|
||||
info.Entity = ent;
|
||||
m_LifeBuoys.push_back(info);
|
||||
m_Lifebuoys.push_back(info);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user