1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#include "Falling.h" #include <raylib.h> #include "Generator.h" Falling::Falling() : m_speed {40} { } void Falling::update(const float dt, Vector2& position, Generator& generator) { position.y += dt * m_speed; if (position.y > 600) generator.toggle(false); }