Skip to content

Commit

Permalink
[#26]: Fix rendering of Animation Points and change the texture
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobDomagala committed Mar 6, 2023
1 parent f4be801 commit 7d03a7c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions editor/Editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ Editor::LoadLevel(const std::string& levelPath)
for (const auto& point : animationPoints)
{
auto editorObject = std::make_shared< EditorObject >(
*this, point.m_end, glm::ivec2(20, 20), "Default128.png", point.GetID());
*this, point.m_end, glm::ivec2(20, 20), "NodeSprite.png", point.GetID());
editorObject->SetName("Animationpoint" + object->GetName());

m_editorObjects.push_back(editorObject);
Expand Down Expand Up @@ -679,7 +679,7 @@ Editor::AddObject(Object::TYPE objectType)
m_currentSelectedGameObject->GetPosition()
+ static_cast< glm::vec2 >(m_currentSelectedGameObject->GetSize()));
newObject = std::make_shared< EditorObject >(*this, newNode.m_end, glm::ivec2(20, 20),
"Default128.png", newNode.GetID());
"NodeSprite.png", newNode.GetID());

m_editorObjects.push_back(newObject);
animatablePtr->ResetAnimation();
Expand Down
5 changes: 5 additions & 0 deletions editor/EditorObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,11 @@ EditorObject::Render()
}
break;

case Object::TYPE::ANIMATION_POINT: {
m_sprite.Render();
}
break;

default: {
}
}
Expand Down

0 comments on commit 7d03a7c

Please sign in to comment.