| 1738 | |
| 1739 | template <vkb::BindingType bindingType> |
| 1740 | inline void VulkanSample<bindingType>::update_scene(float delta_time) |
| 1741 | { |
| 1742 | if (scene) |
| 1743 | { |
| 1744 | // Update scripts |
| 1745 | if (scene->has_component<sg::Script>()) |
| 1746 | { |
| 1747 | auto scripts = scene->get_components<sg::Script>(); |
| 1748 | |
| 1749 | for (auto script : scripts) |
| 1750 | { |
| 1751 | script->update(delta_time); |
| 1752 | } |
| 1753 | } |
| 1754 | |
| 1755 | // Update animations |
| 1756 | if (scene->has_component<sg::Animation>()) |
| 1757 | { |
| 1758 | auto animations = scene->get_components<sg::Animation>(); |
| 1759 | |
| 1760 | for (auto animation : animations) |
| 1761 | { |
| 1762 | animation->update(delta_time); |
| 1763 | } |
| 1764 | } |
| 1765 | } |
| 1766 | } |
| 1767 | |
| 1768 | template <vkb::BindingType bindingType> |
| 1769 | inline void VulkanSample<bindingType>::update_stats(float delta_time) |